[FFmpeg-devel] PIC and YASM

Reimar Döffinger Reimar.Doeffinger
Tue Nov 10 00:24:24 CET 2009


Ok, after all the discussion I have only one change left to suggest
(well, actually I had it suggested a few times, but I am not sure if
someone is against it or not):
Index: configure
===================================================================
--- configure   (revision 20491)
+++ configure   (working copy)
@@ -1876,6 +1876,11 @@
 
 enable $arch $subarch
 enabled spic && enable pic
+# This is the same check as used in libavutil/internal.h
+# to enable RIP-relative addressing for x86_64 inline asm.
+# This also makes compilation work out-of-the-box for systems
+# like hardened Gentoo where the compiler generates PIC/PIE by default.
+check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
 
 # OS specific
 case $target_os in
@@ -2236,7 +2241,6 @@
     test -n "$extern_prefix"  && append YASMFLAGS "-DPREFIX"
     case "$objformat" in
         elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
-        macho64)              append YASMFLAGS "-DPIC" ;;
     esac
     disabled yasm || { check_yasm "pabsw xmm0, xmm0" && enable yasm; }
 




More information about the ffmpeg-devel mailing list