]> git.sesse.net Git - x264/commitdiff
Get rid of fPIC warnings when compiling a shared library on Windows
authorHenrik Gramner <henrik@gramner.com>
Sun, 24 May 2015 21:21:20 +0000 (23:21 +0200)
committerHenrik Gramner <henrik@gramner.com>
Sat, 25 Jul 2015 20:52:54 +0000 (22:52 +0200)
PIC is always enabled when compiling for Windows so gcc complains when using
-fPIC since it doesn't do anything.

configure

index d07832368cef887e9fa0a69f2d4694a194d44a5b..db116598fe94bc0a316042779a927197b7028af8 100755 (executable)
--- 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"