public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jakub@redhat.com
Cc: joseph@codesourcery.com, joel.sherrill@OARcorp.com,
	gcc@gcc.gnu.org,        gcc-patches@gcc.gnu.org,
	ro@CeBiTec.Uni-Bielefeld.DE
Subject: Re: serious libgcc regression added recently
Date: Sat, 05 Nov 2011 03:23:00 -0000	[thread overview]
Message-ID: <20111104.224745.2103083695384872614.davem@davemloft.net> (raw)
In-Reply-To: <20111103082251.GV1052@tyan-ft48-01.lab.bos.redhat.com>

From: Jakub Jelinek <jakub@redhat.com>
Date: Thu, 3 Nov 2011 09:22:51 +0100

> I think much better would be to handle sparc*/s390*/powerpc* differently
> here, just using #ifdef __LP64__ test.  i?86/x86_64 is different because
> of the third weirdo multilib option.

I just tested and committed the following, it seemed to make no sense
to keep the case statement there and now the host_address should be
available to anyone who wants to make use of it in config.host

--------------------
[PATCH] Tweak libgcc configure test for 64-bit.

libgcc/

	* configure.ac: Test for 64-bit addresses on !x86 using __LP64__.
	* configure: Rebuild.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181000 138bc75d-0d04-0410-961f-82ee72b054a4
---
 libgcc/ChangeLog    |    5 +++++
 libgcc/configure    |   15 +++++----------
 libgcc/configure.ac |   15 +++++----------
 3 files changed, 15 insertions(+), 20 deletions(-)

diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index ec06a09..d3f091e 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-04  David S. Miller  <davem@davemloft.net>
+
+	* configure.ac: Test for 64-bit addresses on !x86 using __LP64__.
+	* configure: Rebuild.
+
 2011-11-04  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
 
 	* config/s390/t-crtstuff: Add -fPIC to CRTSTUFF_T_CFLAGS_S
diff --git a/libgcc/configure b/libgcc/configure
index 0f18037..1895a76 100644
--- a/libgcc/configure
+++ b/libgcc/configure
@@ -4609,21 +4609,16 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgcc_cv_cfi" >&5
 $as_echo "$libgcc_cv_cfi" >&6; }
 
-# Check 32bit or 64bit for x86 and sparc.
-case ${host} in
-i?86*-*-* | x86_64*-*-* | sparc*-*-*)
-  cat > conftest.c <<EOF
-#if defined(__x86_64__) || \
-    (defined(__sparc__) && defined(__arch64__))
+# Check 32bit or 64bit
+cat > conftest.c <<EOF
+#if defined(__x86_64__) || (!defined(__i386__) && defined(__LP64__))
 host_address=64
 #else
 host_address=32
 #endif
 EOF
-    eval `${CC-cc} -E conftest.c | grep host_address=`
-    rm -f conftest.c
-    ;;
-esac
+eval `${CC-cc} -E conftest.c | grep host_address=`
+rm -f conftest.c
 
 # Collect host-machine-specific information.
 . ${srcdir}/config.host
diff --git a/libgcc/configure.ac b/libgcc/configure.ac
index 5250be3..308038c 100644
--- a/libgcc/configure.ac
+++ b/libgcc/configure.ac
@@ -255,21 +255,16 @@ AC_CACHE_CHECK([whether assembler supports CFI directives], [libgcc_cv_cfi],
   [libgcc_cv_cfi=yes],
   [libgcc_cv_cfi=no])])
 
-# Check 32bit or 64bit for x86 and sparc.
-case ${host} in
-i?86*-*-* | x86_64*-*-* | sparc*-*-*)
-  cat > conftest.c <<EOF
-#if defined(__x86_64__) || \
-    (defined(__sparc__) && defined(__arch64__))
+# Check 32bit or 64bit
+cat > conftest.c <<EOF
+#if defined(__x86_64__) || (!defined(__i386__) && defined(__LP64__))
 host_address=64
 #else
 host_address=32
 #endif
 EOF
-    eval `${CC-cc} -E conftest.c | grep host_address=`
-    rm -f conftest.c
-    ;;
-esac
+eval `${CC-cc} -E conftest.c | grep host_address=`
+rm -f conftest.c
 
 # Collect host-machine-specific information.
 . ${srcdir}/config.host
-- 
1.7.6.401.g6a319

  parent reply	other threads:[~2011-11-05  2:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02 20:49 David Miller
2011-11-02 22:10 ` Joel Sherrill
2011-11-02 22:52   ` David Miller
2011-11-02 23:06     ` David Miller
2011-11-03  0:22       ` David Miller
2011-11-03  0:23         ` Andrew Pinski
2011-11-03  1:25           ` David Miller
2011-11-03  0:35         ` Joseph S. Myers
2011-11-03  0:32       ` Joseph S. Myers
2011-11-03  1:51         ` David Miller
2011-11-03  3:22           ` Joseph S. Myers
2011-11-03  4:53             ` David Miller
2011-11-03  9:00               ` Paolo Bonzini
2011-11-03  9:16               ` Jakub Jelinek
2011-11-04  7:50                 ` David Miller
2011-11-05  3:23                 ` David Miller [this message]
2011-11-03 14:17     ` Joel Sherrill

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=20111104.224745.2103083695384872614.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=joel.sherrill@OARcorp.com \
    --cc=joseph@codesourcery.com \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    /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).