]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2071. [port] Test whether gcc accepts -fno-strict-aliasing.
authorMark Andrews <marka@isc.org>
Thu, 10 Aug 2006 01:55:05 +0000 (01:55 +0000)
committerMark Andrews <marka@isc.org>
Thu, 10 Aug 2006 01:55:05 +0000 (01:55 +0000)
                        [RT #16324]

CHANGES
configure.in
lib/bind/configure.in

diff --git a/CHANGES b/CHANGES
index fb898552a68cdd56383acd5257c0c9f46b27ed27..b97fc41782ab995dca371f544135bf0e462ecdb2 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2071.  [port]          Test whether gcc accepts -fno-strict-aliasing.
+                       [RT #16324]
+
 2070.  [bug]           The remote address was not always displayed when
                        reporting dispatch failures. [RT #16315]
 
index 22421346d83a768a33b9f968c026af67bed42845..83c5268327b3ae3e9655ae2001843ad250df3490 100644 (file)
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
 esyscmd([sed "s/^/# /" COPYRIGHT])dnl
 AC_DIVERT_POP()dnl
 
-AC_REVISION($Revision: 1.294.2.23.2.65 $)
+AC_REVISION($Revision: 1.294.2.23.2.66 $)
 
 AC_INIT(lib/dns/name.c)
 AC_PREREQ(2.13)
@@ -802,7 +802,18 @@ MKDEPCFLAGS="-M"
 IRIX_DNSSEC_WARNINGS_HACK=""
 
 if test "X$GCC" = "Xyes"; then
+       AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
+       SAVE_CFLAGS=$CFLAGS
+       CFLAGS=-fno-strict-aliasing
+       AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
+       CFLAGS=$SAVE_CFLAGS
+       if test "$FNOSTRICTALIASING" = "yes"; then
+               AC_MSG_RESULT(yes)
        STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing"
+       else
+               AC_MSG_RESULT(no)
+       STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
+       fi
        case "$host" in
        *-hp-hpux*)
                LDFLAGS="-Wl,+vnocompatwarnings $LDFLAGS"
index 069404c05095f6304554a3d065c6b8b5cd7d9255..0ccb918244df945ce84a1123c1dd8d68ca09cf52 100644 (file)
@@ -13,7 +13,7 @@
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-AC_REVISION($Revision: 1.83.2.5.2.29 $)
+AC_REVISION($Revision: 1.83.2.5.2.30 $)
 
 AC_INIT(resolv/herror.c)
 AC_PREREQ(2.13)
@@ -515,7 +515,18 @@ MKDEPCFLAGS="-M"
 IRIX_DNSSEC_WARNINGS_HACK=""
 
 if test "X$GCC" = "Xyes"; then
-       STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wpointer-arith -fno-strict-aliasing"
+        AC_MSG_CHECKING(if "$CC" supports -fno-strict-aliasing)
+        SAVE_CFLAGS=$CFLAGS
+        CFLAGS=-fno-strict-aliasing
+        AC_TRY_COMPILE(,, [FNOSTRICTALIASING=yes],[FNOSTRICTALIASING=no])
+        CFLAGS=$SAVE_CFLAGS
+        if test "$FNOSTRICTALIASING" = "yes"; then
+                AC_MSG_RESULT(yes)
+               STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith -fno-strict-aliasing"
+        else
+                AC_MSG_RESULT(no)
+               STD_CWARNINGS="$STD_CWARNINGS -W -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wformat -Wpointer-arith"
+        fi
 else
        case $host in
        *-dec-osf*)