configure.ac : Don't enable stack protector for mingw* host_os.
authorErik de Castro Lopo <erikd@mega-nerd.com>
Fri, 8 Mar 2013 21:55:37 +0000 (08:55 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Fri, 8 Mar 2013 22:18:06 +0000 (09:18 +1100)
configure.ac

index b99f402..24696fe 100644 (file)
@@ -356,10 +356,6 @@ fi
 
 XIPH_GCC_VERSION
 
-XIPH_ADD_CFLAGS([-Wextra])
-XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
-XIPH_ADD_CFLAGS([-fstack-protector --param ssp-buffer-size=4])
-
 if test x$ac_cv_c_compiler_gnu = xyes ; then
        if test x$enable_gcc_werror = "xyes" ; then
                CFLAGS="-Wall -Wextra -Werror $CFLAGS"
@@ -374,6 +370,18 @@ if test x$ac_cv_c_compiler_gnu = xyes ; then
 fi
 
 
+XIPH_ADD_CFLAGS([-Wextra])
+XIPH_ADD_CFLAGS([-D_FORTIFY_SOURCE=2])
+
+case "$host_os" in
+       mingw32msvc | mingw32)
+               # Disable for MinGW. Had reports of it not working.
+               ;;
+       *)
+               XIPH_ADD_CFLAGS([-fstack-protector --param ssp-buffer-size=4])
+               ;;
+       esac
+
 #@@@
 AM_CONDITIONAL(FLaC__HAS_AS__TEMPORARILY_DISABLED, test "yes" = "no")
 AM_CONDITIONAL(FLaC__HAS_GAS__TEMPORARILY_DISABLED, test "yes" = "no")