[Ffmpeg-devel] [PATCH] Check for __PIC__ beside PIC to enable PIC-safe code

Michael Niedermayer michaelni
Sat Jul 1 22:13:50 CEST 2006


Hi

On Sat, Jul 01, 2006 at 10:00:48PM +0200, Diego 'Flameeyes' Petten? wrote:
> Okay, if defining __PIC__ isn't acceptable, this patch checks for both PIC and 
> __PIC__ when entering the section that needs to be PIC-safe.
> The reason for pushing the change in the source files rather than in the build 
> system is simply to not require mangling of the sources when imported in 
> other projects (xine-lib, xdtv).

other projects just need to #define PIC if __PIC__ is defined, no other
change is needed, in no case do they need to mangle the libav* source


> That's why checking inside the configure for __PIC__ presence and then 
> defining PIC isn't going to help.
> 
> Hope this version will be liked more than the other.

of course not, its still a mess
just add #ifdef __PIC__ #define PIC #endif to a central header, config.h or
common.h maybe if you really want this in the source and not the build system


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list