[FFmpeg-devel] [PATCH] Enable building 64bit FFmpeg on MacOSX

Reimar Döffinger Reimar.Doeffinger
Mon Mar 17 12:10:26 CET 2008


On Mon, Mar 17, 2008 at 12:52:58PM +0200, ?smail D?nmez wrote:
> On Mon, Mar 17, 2008 at 12:34 PM, M?ns Rullg?rd <mans at mansr.com> wrote:
> >
> >  Diego Biurrun wrote:
> >  > On Mon, Mar 17, 2008 at 11:28:30AM +0200, ?smail D?nmez wrote:
> >  >>
> >  >> On Mon, Mar 17, 2008 at 11:25 AM, Diego Biurrun <diego at biurrun.de> wrote:
> >  >> > On Sat, Mar 15, 2008 at 05:03:22PM +0200, ?smail D?nmez wrote:
> >  >> >  > To workaround this attached patch checks if CFLAGS contains -m64 and
> >  >> >  > then sets 64bit flags. This is similar to already existing -m32 check
> >  >> >  > in configure.
> >  >> >
> >  >> >  I'd rather have you find a proper solution, this is quite ugly...
> >  >>
> >  >> Suggestions welcome.
> >  >
> >  > Mans?
> >  >
> >  > I have no better solutions available, so I'll apply your patch if you
> >  > update it to match HEAD again.  Unless somebody has better ideas...
> >
> >  The correct way would be to try compiling something that will fail on
> >  one arch or the other.  It's a trivial bit of assembler (use %rax or so),
> >  but there is plain C code using the HAVE_FAST_64BIT flag, which would
> >  get the wrong value if inline asm is not supported.  Another possibility
> >  might be to check the size of long and/or pointer types (using nm).
> 
> How does the attached patch look?

Seems ugly to me, maybe better check compilation of something like

int test[sizeof(intptr_t) - 7];

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list