public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Dominik Vogt <vogt@linux.vnet.ibm.com>
To: libffi-discuss@sourceware.org
Subject: [PATCH 7/7] Merge of gcc patches
Date: Tue, 18 Nov 2014 10:21:00 -0000	[thread overview]
Message-ID: <20141118102051.GH26714@linux.vnet.ibm.com> (raw)
In-Reply-To: <20141118101743.GA26714@linux.vnet.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 64 bytes --]

Patch 7.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany

[-- Attachment #2: 0007-ChangeLog --]
[-- Type: text/plain, Size: 195 bytes --]

ChangeLog
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.

[-- Attachment #3: 0007-configure.ac-If-the-compiler-supports-Qunused-argume.patch --]
[-- Type: text/x-diff, Size: 2233 bytes --]

From dd32f429246bdfb929d5bebd1aa268d5eecd8de4 Mon Sep 17 00:00:00 2001
From: ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 15 Oct 2014 15:32:41 +0000
Subject: [PATCH 7/7] configure.ac: If the compiler supports
 -Qunused-arguments,

use it when running the compiler on .s files.
---
 configure.ac | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/configure.ac b/configure.ac
index afad32c..b662f39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -367,6 +367,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, [
@@ -403,9 +412,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=no
 	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 > /dev/null 2>&1; then
 	    libffi_cv_as_x86_pcrel=yes
 	fi
+	CFLAGS=$CFLAGS_hold
 	])
     if test "x$libffi_cv_as_x86_pcrel" = xyes; then
 	AC_DEFINE(HAVE_AS_X86_PCREL, 1,
@@ -489,10 +503,15 @@ EOF
 	libffi_cv_as_x86_64_unwind_section_type=no
 	# we ensure that we can compile _and_ link an assembly file containing an @unwind section
 	# since the compiler can support it and not the linker (ie old binutils)
+	CFLAGS_hold=$CFLAGS
+	if test "$libffi_cv_c_unused_arguments" = yes; then
+	    CFLAGS="$CFLAGS -Qunused-arguments"
+	fi
 	if $CC -Wa,--fatal-warnings $CFLAGS -c conftest1.s > /dev/null 2>&1 && \
            $CC conftest2.c conftest1.o > /dev/null 2>&1 ; then
 	    libffi_cv_as_x86_64_unwind_section_type=yes
 	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,
-- 
1.8.4.2


  parent reply	other threads:[~2014-11-18 10:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18 10:17 [PATCH 0/7] " Dominik Vogt
2014-11-18 10:18 ` [PATCH 2/7] " Dominik Vogt
2014-11-18 10:34   ` Richard Henderson
2014-11-18 10:18 ` [PATCH 1/7] " Dominik Vogt
2014-11-18 10:33   ` Richard Henderson
2014-11-18 13:13     ` Richard Henderson
2014-11-18 10:19 ` [PATCH 3/7] " Dominik Vogt
2014-11-18 10:40   ` Richard Henderson
2014-11-18 10:19 ` [PATCH 4/7] " Dominik Vogt
2014-11-18 10:41   ` Richard Henderson
2014-11-18 10:20 ` [PATCH 5/7] " Dominik Vogt
2014-11-18 10:42   ` Richard Henderson
2014-11-18 10:20 ` [PATCH 6/7] " Dominik Vogt
2014-11-18 10:36   ` Richard Henderson
2014-11-18 11:06     ` Dominik Vogt
2014-11-18 11:34       ` Richard Henderson
2014-11-18 11:57         ` Dominik Vogt
2014-11-18 10:21 ` Dominik Vogt [this message]
2014-11-18 10:37   ` [PATCH 7/7] " Richard Henderson
2014-11-18 10:32 ` [PATCH 0/7] " Richard Henderson
2014-11-18 10:47 ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141118102051.GH26714@linux.vnet.ibm.com \
    --to=vogt@linux.vnet.ibm.com \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).