diff options
author | Ian Lance Taylor <iant@google.com> | 2014-10-15 15:32:41 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-10-15 15:32:41 +0000 |
commit | bb8c2886dbf838805777d2c7952f46bbeba7987f (patch) | |
tree | bdc1d44318ce5627cb6a73b6ef6d9337cf792b1d /libffi/configure | |
parent | 9e98c8c32cfb8633053f2663983e9fa845398e52 (diff) | |
download | gcc-bb8c2886dbf838805777d2c7952f46bbeba7987f.zip gcc-bb8c2886dbf838805777d2c7952f46bbeba7987f.tar.gz gcc-bb8c2886dbf838805777d2c7952f46bbeba7987f.tar.bz2 |
configure.ac: If the compiler supports -Qunused-arguments...
* configure.ac: If the compiler supports -Qunused-arguments, use
it when running the compiler on .s files.
* configure: Regenerated.
From-SVN: r216268
Diffstat (limited to 'libffi/configure')
-rwxr-xr-x | libffi/configure | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libffi/configure b/libffi/configure index efb62cd..4c53cf9 100755 --- a/libffi/configure +++ b/libffi/configure @@ -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 |