From: Mark Andrews Date: Fri, 16 Oct 2009 04:27:07 +0000 (+0000) Subject: 2714. [port] aix/powerpc: 'asm("ics");' needs non standard assembler X-Git-Tag: v9.5.2-P1~1^5~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67b97c83c178b405e6dcf3a74dd59a6ab2988bc6;p=thirdparty%2Fbind9.git 2714. [port] aix/powerpc: 'asm("ics");' needs non standard assembler flags. --- diff --git a/CHANGES b/CHANGES index 9e78f90f53f..580b394d96d 100644 --- 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. diff --git a/configure.in b/configure.in index 5d39005ad68..17f6cb9855c 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl esyscmd([sed "s/^/# /" COPYRIGHT])dnl AC_DIVERT_POP()dnl -AC_REVISION($Revision: 1.432.60.35 $) +AC_REVISION($Revision: 1.432.60.36 $) AC_INIT(lib/dns/name.c) AC_PREREQ(2.59) @@ -2228,7 +2228,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