[FFmpeg-devel] PIC and YASM

Måns Rullgård mans
Sun Nov 8 14:47:20 CET 2009


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?

diff --git a/configure b/configure
index 748c5bf..5e27fc2 100755
--- a/configure
+++ b/configure
@@ -2231,7 +2231,7 @@ EOF
 
     YASMFLAGS="-f $objformat -DARCH_$(toupper $subarch)"
     enabled     x86_64        && append YASMFLAGS "-m amd64"
-    enabled_all x86_64 shared && append YASMFLAGS "-DPIC"
+    enabled_all x86_64 pic    && append YASMFLAGS "-DPIC"
     case "$objformat" in
         elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
         macho64)              append YASMFLAGS "-DPIC -DPREFIX" ;;


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



More information about the ffmpeg-devel mailing list