]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
configure.ac: If the compiler supports -Qunused-arguments...
authorIan Lance Taylor <iant@google.com>
Wed, 15 Oct 2014 15:32:41 +0000 (15:32 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 15 Oct 2014 15:32:41 +0000 (15:32 +0000)
* configure.ac: If the compiler supports -Qunused-arguments, use
it when running the compiler on .s files.
* configure: Regenerated.

From-SVN: r216268

libffi/ChangeLog
libffi/configure
libffi/configure.ac

index ee6c4769bd87b7d68b269e629b81b089b5e8090f..ed7f5556d94b9579c5b47f3d3a34b6275a733973 100644 (file)
@@ -1,3 +1,9 @@
+2014-10-15  Ian Lance Taylor  <iant@google.com>
+
+       * configure.ac: If the compiler supports -Qunused-arguments, use
+       it when running the compiler on .s files.
+       * configure: Regenerated.
+
 2014-09-11  Jakub Jelinek  <jakub@redhat.com>
 
        * src/powerpc/linux64.S: Emit .note.GNU-stack even when
index efb62cdeabd2736ff9f51852ec59454ad209b25d..4c53cf9d543f5bdebdff6d63e7e9bf8bed9e4313 100755 (executable)
@@ -12519,6 +12519,28 @@ $as_echo "#define HAVE_AS_CFI_PSEUDO_OP 1" >>confdefs.h
  fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Qunused-arguments" >&5
+$as_echo_n "checking if compiler supports -Qunused-arguments... " >&6; }
+if test "${libffi_cv_c_unused_arguments+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  CFLAGS_hold=$CFLAGS
+CFLAGS="$CFLAGS -Qunused-arguments"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+int i;
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  libffi_cv_c_unused_arguments=yes
+else
+  libffi_cv_c_unused_arguments=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS=$CFLAGS_hold
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_c_unused_arguments" >&5
+$as_echo "$libffi_cv_c_unused_arguments" >&6; }
+
 if test x$TARGET = xSPARC; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler and linker support unaligned pc related relocs" >&5
 $as_echo_n "checking assembler and linker support unaligned pc related relocs... " >&6; }
@@ -12604,9 +12626,14 @@ else
 
        libffi_cv_as_x86_pcrel=yes
        echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
+       CFLAGS_hold=$CFLAGS
+       if test "$libffi_cv_c_unused_arguments" = yes; then
+           CFLAGS="$CFLAGS -Qunused-arguments"
+       fi
        if $CC $CFLAGS -c conftest.s 2>&1 | $EGREP -i 'illegal|warning' > /dev/null; then
            libffi_cv_as_x86_pcrel=no
        fi
+       CFLAGS=$CFLAGS_hold
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_as_x86_pcrel" >&5
@@ -12732,9 +12759,14 @@ else
 
        libffi_cv_as_x86_64_unwind_section_type=yes
        echo '.section .eh_frame,"a",@unwind' > conftest.s
+       CFLAGS_hold=$CFLAGS
+       if test "$libffi_cv_c_unused_arguments" = yes; then
+           CFLAGS="$CFLAGS -Qunused-arguments"
+       fi
        if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
            libffi_cv_as_x86_64_unwind_section_type=no
        fi
+       CFLAGS=$CFLAGS_hold
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libffi_cv_as_x86_64_unwind_section_type" >&5
index a08feaa038194fa0ba5dbfd4a416ed829457a6bf..97d2641b0c9a9ef05576af58c97d2e3ee1ef1f85 100644 (file)
@@ -295,6 +295,15 @@ AC_C_BIGENDIAN
 
 GCC_AS_CFI_PSEUDO_OP
 
+AC_CACHE_CHECK([if compiler supports -Qunused-arguments],
+[libffi_cv_c_unused_arguments],
+[CFLAGS_hold=$CFLAGS
+CFLAGS="$CFLAGS -Qunused-arguments"
+AC_COMPILE_IFELSE([[int i;]],
+[libffi_cv_c_unused_arguments=yes],
+[libffi_cv_c_unused_arguments=no])
+CFLAGS=$CFLAGS_hold])
+
 if test x$TARGET = xSPARC; then
     AC_CACHE_CHECK([assembler and linker support unaligned pc related relocs],
        libffi_cv_as_sparc_ua_pcrel, [
@@ -331,9 +340,14 @@ if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64
        libffi_cv_as_x86_pcrel, [
        libffi_cv_as_x86_pcrel=yes
        echo '.text; foo: nop; .data; .long foo-.; .text' > conftest.s
+       CFLAGS_hold=$CFLAGS
+       if test "$libffi_cv_c_unused_arguments" = yes; then
+           CFLAGS="$CFLAGS -Qunused-arguments"
+       fi
        if $CC $CFLAGS -c conftest.s 2>&1 | $EGREP -i 'illegal|warning' > /dev/null; then
            libffi_cv_as_x86_pcrel=no
        fi
+       CFLAGS=$CFLAGS_hold
        ])
     if test "x$libffi_cv_as_x86_pcrel" = xyes; then
        AC_DEFINE(HAVE_AS_X86_PCREL, 1,
@@ -397,9 +411,14 @@ if test x$TARGET = xX86_64; then
        libffi_cv_as_x86_64_unwind_section_type, [
        libffi_cv_as_x86_64_unwind_section_type=yes
        echo '.section .eh_frame,"a",@unwind' > conftest.s
+       CFLAGS_hold=$CFLAGS
+       if test "$libffi_cv_c_unused_arguments" = yes; then
+           CFLAGS="$CFLAGS -Qunused-arguments"
+       fi
        if $CC $CFLAGS -c conftest.s 2>&1 | grep -i warning > /dev/null; then
            libffi_cv_as_x86_64_unwind_section_type=no
        fi
+       CFLAGS=$CFLAGS_hold
        ])
     if test "x$libffi_cv_as_x86_64_unwind_section_type" = xyes; then
        AC_DEFINE(HAVE_AS_X86_64_UNWIND_SECTION_TYPE, 1,