Give ICC its preferred, documented form of the no-strict-aliasing
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 11 Sep 2007 19:50:25 +0000 (19:50 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 11 Sep 2007 19:50:25 +0000 (19:50 +0000)
switch, viz '-fno-alias'.  Since we have a separate code path here
anyway, it's just as easy to cooperate.

configure
configure.in

index f814cfb1548de218233ddad3f5410c31dda45641..4a88b724c31041f83a75e5970076c7b97a3c6dda 100755 (executable)
--- a/configure
+++ b/configure
@@ -3120,11 +3120,11 @@ echo "${ECHO_T}no" >&6
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
-  # Not clear if this is needed, but seems like a good idea
-  echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5
-echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6
+  # ICC prefers to spell the no-strict-aliasing switch like this
+  echo "$as_me:$LINENO: checking if $CC supports -fno-alias" >&5
+echo $ECHO_N "checking if $CC supports -fno-alias... $ECHO_C" >&6
 pgac_save_CFLAGS=$CFLAGS
-CFLAGS="$pgac_save_CFLAGS -fno-strict-aliasing"
+CFLAGS="$pgac_save_CFLAGS -fno-alias"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
index 1a33620b78fc8bdfcdb6320451507d69e60f1c36..b91cd7950719da6f330db4c4857165c6ba8c65b9 100644 (file)
@@ -291,8 +291,8 @@ elif test "$ICC" = yes; then
   # Intel's compiler has a bug/misoptimization in checking for
   # division by NAN (NaN == 0), -mp1 fixes it, so add it to the CFLAGS.
   PGAC_PROG_CC_CFLAGS_OPT([-mp1])
-  # Not clear if this is needed, but seems like a good idea
-  PGAC_PROG_CC_CFLAGS_OPT([-fno-strict-aliasing])
+  # ICC prefers to spell the no-strict-aliasing switch like this
+  PGAC_PROG_CC_CFLAGS_OPT([-fno-alias])
 elif test x"${CC}" = x"xlc"; then
   # AIX xlc has to have strict aliasing turned off too
   PGAC_PROG_CC_CFLAGS_OPT([-qnoansialias])