[FFmpeg-devel] [PATCH] Make libpostproc build both shared and static from the same objects

Måns Rullgård mans
Mon Jan 14 16:04:01 CET 2008


Olivier Galibert wrote:
> [Missed the parent mail, sorry, removing the attributions rather than fucking
> them up]
>
>> > > The attached patch makes libpostproc build the static archive using the
>> > > same (PIC) objects used for shared objects. This way it avoids compiling
>> > > the postprocess.c file twice for the same result (by default here at
>> > > least it gets -fPIC on both), and it also does not fail anymore to be
>> > > considered by make depend.
>> >
>> > It does not get -fPIC here on x86_32 while it does on PPC.
>> >
>> Yes, I have often wondered about this anomaly myself, but I'm not sure
>> what the original reason to handle things this way were.  Can anybody
>> enlighten us please?
>
> The cost of -fPIC is much higher on x86_32 than on PPC because of the
> number of registers.  So it's a good idea to avoid it when you can.
> x86_64 has more registers so it copes better.

Badger me on IRC tonight, and I just might cook up something to build
static libs without -fPIC, whether or not shared libs are also built.
Such a solution would of course double the build time when building
both lib types.

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




More information about the ffmpeg-devel mailing list