[x264-devel] [PATCH] disable PIC in C code on Darwin

Guillaume POIRIER poirierg at gmail.com
Thu Oct 2 23:51:47 CEST 2008


Hello,

2008/10/2 Alexander Strange <astrange at ithinksw.com>:
> On Oct 1, 2008, at 9:13 AM, Guillaume POIRIER wrote:
>> 2008/9/29 Alexander Strange <astrange at ithinksw.com>:
>>>
>>> This fixes a major speed loss on Darwin vs. other systems and shouldn't
>>> affect building shared libraries.
>>
>> It appears to me that it does affect the build of shared libs:
>>
>> common/mc.c:0: warning: -mdynamic-no-pic overrides -fpic or -fPIC
>> common/predict.c:0: warning: -mdynamic-no-pic overrides -fpic or -fPIC
>> common/pixel.c:0: warning: -mdynamic-no-pic overrides -fpic or -fPIC
>> common/macroblock.c:0: warning: -mdynamic-no-pic overrides -fpic or -fPIC
>> common/frame.c:0: warning: -mdynamic-no-pic overrides -fpic or -fPIC
>> common/dct.c:0: warning: -mdynamic-no-pic overrides -fpic or -fPIC
>> [...]
>
> Sorry, I'd forgotten it overrides other flags.
> Could someone test this one on OS X 10.4+i386?

Has anyone tested this? superdump?


> I know it works on 10.5, but I think shared libraries with dynamic-no-pic
> are a feature of the new ld.

I can confirm that everything works alright here on 10.5.5 too, with
standard Xcode tools (not the iPhone one).


> This also makes configure assume Apple GCC a bit more, which isn't really
> important; I could write a check_cflags and fix some other lines if someone
> wants it.

Well, I'm not aware of anyone how has tried to compile x264 with any
compiler but GCC on Darwin.
Although Intel C compiler has been ported to Darwin, it's not free, so
I don't imagine that many people use it.

In fact, even on Linux, compiling with ICC requires to override
several GCC-specific flags (which is fine with me anyway).

Guillaume
-- 
One should not give up hope on imbeciles. With a little training, you
can make them into soldiers.
 -- Pierre Desproges


More information about the x264-devel mailing list