[FFmpeg-cvslog] r20497 - trunk/configure

Måns Rullgård mans
Sun Nov 15 20:43:55 CET 2009


Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:

> On Sun, Nov 15, 2009 at 12:02:39PM +0000, M?ns Rullg?rd wrote:
>> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
>> > On Sun, Nov 15, 2009 at 01:58:12AM -0500, Alexander Strange wrote:
>> >> The compiler defaults to PIC, so that check runs 'enable pic'.
>> >> 
>> >> After that, -mdynamic-no-pic, which turns it off again, is under ! 'enabled_any pic shared', so it's not added.
>> >
>> > Hm. It was specifically for that check I put this before it, however I
>> > misread the condition.
>> 
>> What does that flag do anyway?
>
> info gcc says:
> `-mdynamic-no-pic'
>      On Darwin and Mac OS X systems, compile code so that it is not
>      relocatable, but that its external references are relocatable.  The
>      resulting code is suitable for applications, but not shared
>      libraries.
>
> Basically it's the closest you can get to non-PIC on OSX I think.
> However, as the docs say it only can be done for a static build (or
> more precisely for the binaries), however if you do not create a PIE
> binary there is no point to respect --enable-pic IMO, or is there
> something I miss?

--enable-pic is supposed to use PIC regardless of other settings.  It
is useful to people who want to "statically" link lavc into a shared
lib.  E.g. VLC does such things.

>> >> Maybe it shouldn't be using the same variable for PIC being
>> >> detected and the user specifically requesting it, but that won't
>> >> fix this check, which either needs to not run for Darwin or to run
>> >> after the flag is added.
>> >
>> > Why is adding that flag conditional on PIC anyway?
>> 
>> IIRC it was supposed to do something allowing non-pic code in shared
>> libs.  Now that doesn't make much sense if, as you say, PIC is always
>> on with that compiler.
>> 
>> So which way is it?
>
> No, it is supposed to allow avoiding some of the cost of PIC for binaries
> by using PIC only where necessary (I think something like ebx must have
> a specific value when calling system functions etc.).

Does not adding that flag break anything.  If not, screw OSX and
remove the hack.  Nobody is forced to use OSX anyway, so they have
only themselves to blame if it's slow.

-- 
M?ns Rullg?rd
mans at mansr.com



More information about the ffmpeg-cvslog mailing list