[x264-devel] Get rid of fPIC warnings when compiling a shared library on Windows

Henrik Gramner git at videolan.org
Sun Jul 26 22:26:31 CEST 2015


x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Sun May 24 23:21:20 2015 +0200| [3f8c8eb1758d0fa890538eba6f5e699c93dc1304] | committer: Henrik Gramner

Get rid of fPIC warnings when compiling a shared library on Windows

PIC is always enabled when compiling for Windows so gcc complains when using
-fPIC since it doesn't do anything.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=3f8c8eb1758d0fa890538eba6f5e699c93dc1304
---

 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index d078323..db11659 100755
--- a/configure
+++ b/configure
@@ -1104,7 +1104,7 @@ fi
 cc_check "stdint.h" "" "uint32_t test_vec __attribute__ ((vector_size (16))) = {0,1,2,3};" && define HAVE_VECTOREXT
 
 if [ "$pic" = "yes" ] ; then
-    CFLAGS="$CFLAGS -fPIC"
+    [ "$SYS" != WINDOWS -a "$SYS" != CYGWIN ] && CFLAGS="$CFLAGS -fPIC"
     ASFLAGS="$ASFLAGS -DPIC"
     # resolve textrels in the x86 asm
     cc_check stdio.h "-shared -Wl,-Bsymbolic" && SOFLAGS="$SOFLAGS -Wl,-Bsymbolic"



More information about the x264-devel mailing list