]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2714. [port] aix/powerpc: 'asm("ics");' needs non standard assembler
authorMark Andrews <marka@isc.org>
Fri, 16 Oct 2009 04:23:41 +0000 (04:23 +0000)
committerMark Andrews <marka@isc.org>
Fri, 16 Oct 2009 04:23:41 +0000 (04:23 +0000)
                        flags.

CHANGES
configure.in

diff --git a/CHANGES b/CHANGES
index a5d31ec308c101daf1e4d1fe21e55c515d3afd98..65c04418fe03e381a9a0af8d2cd8f0ec35b0d408 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2714.  [port]          aix/powerpc: 'asm("ics");' needs non standard assembler
+                       flags.
+
 2713.  [bug]           powerpc: atomic operations missing asm("ics") /
                        __isync() calls.
 
index 1d0e5cafcd4c782dc580d5b6082a63b26dbb0385..4c353fca6fcf22a47bda806cdb6ebc3b03d71e5a 100644 (file)
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
 esyscmd([sed "s/^/# /" COPYRIGHT])dnl
 AC_DIVERT_POP()dnl
 
-AC_REVISION($Revision: 1.457.26.12 $)
+AC_REVISION($Revision: 1.457.26.13 $)
 
 AC_INIT(lib/dns/name.c)
 AC_PREREQ(2.59)
@@ -2223,7 +2223,37 @@ AC_ARG_ENABLE(atomic,
                        enable_atomic="autodetect")
 case "$enable_atomic" in
        yes|''|autodetect)
-               use_atomic=yes
+               case "$host" in
+               powerpc-ibm-aix*)
+                       if test "X$GCC" = "Xyes"; then
+                               AC_MSG_CHECKING([if asm("isc"); works])
+                               AC_TRY_COMPILE(,[
+                               main() { asm("ics"); exit(0); }
+                               ],
+                               [AC_MSG_RESULT(yes)
+                                use_atomic=yes],
+                               [
+                               saved_cflags="$CFLAGS"
+                               CFLAGS="$CFLAGS -Wa,-many"
+                               AC_TRY_RUN([
+                               main() { asm("ics"); exit(0); }
+                               ],
+                               [AC_MSG_RESULT([yes, required -Wa,-many])
+                                use_atomic=yes],
+                               [AC_MSG_RESULT([no, use_atomic disabled])
+                                CFLAGS="$saved_cflags"
+                                use_atomic=no],
+                               [AC_MSG_RESULT([cross compile, assume yes])
+                                CFLAGS="$saved_cflags"
+                                use_atomic=yes])
+                               ]
+                               )
+                       fi
+                       ;;
+               *)
+                       use_atomic=yes
+                       ;;
+               esac
                ;;
        no)
                use_atomic=no