[FFmpeg-devel] [PATCH] mipsen require compilation with -DPIC since gcc-4.3

Reinhard Tartler siretart
Tue Sep 23 12:19:34 CEST 2008


M?ns Rullg?rd <mans at mansr.com> writes:

> That is inaccurate.  If I understood the discussion correctly, gcc
> always supported non-PIC, but PIC was default prior to 4.3.

No, according to the gcc changelog I quoted before, until gcc-4.2
non-PIC was not supported at all, neither for libraries nor for
executables and defaulted to '-mshared-code'. Gcc 4.3 introduces support
for non-PIC executables and defaults to '-mno-shared-code' unless
overriden by '-fpic, -fPIC, -fpie or -fPIE.' [1].


> Building entirely statically linked MIPS executables has been supported
> by gcc/ld since the beginning of time, or at least since I started doing
> it on a daily basis years ago.

No one questioned that. Your static versions of ffmpeg however were
implicitly compiled position independent. This default has changed with
gcc-4.3.


>> What would be a good commit message for this?  My current draft is:
>>
>> Add MIPS to list of architectures requiring PIC flags.
>> gcc used to do this automatically because non-PIC builds were not
>> supported.  Starting with gcc 4.3 non-PIC static builds are
>> supported and the flag has to be passed explicitly.

that seems accurate to me.


[1] http://gcc.gnu.org/gcc-4.3/changes.html

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4





More information about the ffmpeg-devel mailing list