From d277092d10c486f94d159f65a37c7cd492d00652 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Tue, 16 Aug 2011 17:09:27 +0000 Subject: * Added -fno-strict-aliasing detection to configure.in (-fstrict-aliasing is added through -O2), since the code is not aliasing safe and causes warnings with gcc. - This also fixes a missing line in the pre-built configure script (since r14870). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14935 54d463be-8e91-2dee-dedb-b68131a5f0ec --- configure.in | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 197a4a4ed..a9e4c289a 100644 --- a/configure.in +++ b/configure.in @@ -424,6 +424,22 @@ AC_LINK_IFELSE( AC_SUBST([WITH_PLUGINS]) +# +# -O2 implies -fstrict-aliasing, but the code is not safe for that +# +AC_MSG_CHECKING([whether $CC supports -fno-strict-aliasing]) +OLD_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS -fno-strict-aliasing" +AC_COMPILE_IFELSE( + [int foo;], + [AC_MSG_RESULT([yes])], + [ + AC_MSG_RESULT([no]) + CFLAGS="$OLD_CFLAGS" + ] +) + + # # DB_MANUAL_CAST_TO_UNION # -- cgit v1.2.3-60-g2f50