summaryrefslogtreecommitdiff
path: root/libffi/configure.ac
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-15 15:32:41 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-15 15:32:41 +0000
commit3a4c5379799b896220ac84e917f3eb5a5e5f61de (patch)
treebdc1d44318ce5627cb6a73b6ef6d9337cf792b1d /libffi/configure.ac
parent5df43a998372f91f936c0f49d96dc268e7f80e4d (diff)
downloadgcc-3a4c5379799b896220ac84e917f3eb5a5e5f61de.tar.gz
* configure.ac: If the compiler supports -Qunused-arguments, use
it when running the compiler on .s files. * configure: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216268 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/configure.ac')
-rw-r--r--libffi/configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/libffi/configure.ac b/libffi/configure.ac
index a08feaa0381..97d2641b0c9 100644
--- a/libffi/configure.ac
+++ b/libffi/configure.ac
@@ -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,