[FFmpeg-devel] PIC and YASM
Sun Nov 8 15:35:06 CET 2009
Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> On Sun, Nov 08, 2009 at 01:47:20PM +0000, M?ns Rullg?rd wrote:
>> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
>> > Hello,
>> > I have been trying to figure out some compilation issues with hardened
>> > gentoo on AMD64 and they all come down to YASM.
>> > Several issues:
>> > -DPIC is and must be added explicitly to the yasm flags.
>> > in particular:
>> > --enable-pic will not add -DPIC to YASMFLAGS, nor will the enable_pic
>> > function. --enable-shared will though.
>> That's easy to fix. Does this work better?
> Probably, though why not just put it in the enable_pic function?
Why litter a generic function with x86-specifics?
> (x86inc.asm will unset it by itself where it is not supported)
> I also suspect that my proposal will allow to get rid of that
> "enable pic" hack for OpenBSD
OpenBSD requires PIC. Always. End of story.
> and the macho64 special-case.
I don't know the story behind that one.
> Not to mention the Haiku/Zeta case that just looks very strange,
> if not to say wrong (adding -DPIC but not doing enable_pic?).
Francois promised to clean that up. We're still waiting...
> However that darwin case means the check would have to be done earlier
> (to get -mdynamic-no-pic):
> Index: configure
> --- configure (revision 20469)
> +++ configure (working copy)
> @@ -1876,6 +1876,7 @@
> enable $arch $subarch
> enabled spic && enable pic
> +check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
what is the purpose of this?
mans at mansr.com
More information about the ffmpeg-devel