]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix multilib build of libgcc on Linux/sparc.
authorDavid S. Miller <davem@davemloft.net>
Thu, 3 Nov 2011 06:07:39 +0000 (06:07 +0000)
committerDavid S. Miller <davem@gcc.gnu.org>
Thu, 3 Nov 2011 06:07:39 +0000 (23:07 -0700)
* configure.ac: Set host_address on sparc too.
* configure: Regenerate.
* config.host: Add sparc/t-linux64 and sparc/t-softmul conditionally
based upon host_address.
* config/sparc/t-linux64: Set CRTSTUFF_T_CFLAGS unconditionally.

From-SVN: r180818

libgcc/ChangeLog
libgcc/config.host
libgcc/config/sparc/t-linux64
libgcc/configure
libgcc/configure.ac

index a18ce2cd392091565e685170cdaa78f93742ac70..1365813ff1a7611f17bfbcd8bf103864dd43066f 100644 (file)
@@ -1,3 +1,11 @@
+2011-11-02  David S. Miller  <davem@davemloft.net>
+
+       * configure.ac: Set host_address on sparc too.
+       * configure: Regenerate.
+       * config.host: Add sparc/t-linux64 and sparc/t-softmul conditionally
+       based upon host_address.
+       * config/sparc/t-linux64: Set CRTSTUFF_T_CFLAGS unconditionally.
+
 2011-11-02  Jason Merrill  <jason@redhat.com>
 
        * config/rs6000/t-ppccomm: Add missing \.
index 05f084b70a09d469bea5ecae70d2fc88c9b0d593..c62e8308c95f5b1e4ba9f810302a9297a24fd718 100644 (file)
@@ -1008,7 +1008,10 @@ sparc-*-elf*)
        extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
        ;;
 sparc-*-linux*)                # SPARC's running GNU/Linux, libc6
-       tmake_file="${tmake_file} t-crtfm sparc/t-linux64"
+       tmake_file="${tmake_file} t-crtfm"
+       if test "${host_address}" = 64; then
+               tmake_file="$tmake_file sparc/t-linux64"
+       fi
        case ${host} in
        *-leon*)
                tmake_file="${tmake_file} t-fdpbit"
@@ -1021,7 +1024,9 @@ sparc-*-linux*)           # SPARC's running GNU/Linux, libc6
        *-leon[3-9]*)
                ;;
        *)
-               tmake_file="$tmake_file sparc/t-softmul"
+               if test "${host_address}" = 32; then
+                       tmake_file="$tmake_file sparc/t-softmul"
+               fi
                ;;
        esac
        extra_parts="$extra_parts crtfastmath.o"
@@ -1052,7 +1057,13 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*)
        ;;
 sparc64-*-linux*)              # 64-bit SPARC's running GNU/Linux
        extra_parts="$extra_parts crtfastmath.o"
-       tmake_file="${tmake_file} t-crtfm sparc/t-linux sparc/t-linux64"
+       tmake_file="${tmake_file} t-crtfm sparc/t-linux"
+       if test "${host_address}" = 64; then
+               tmake_file="${tmake_file} sparc/t-linux64"
+       fi
+       if test "${host_address}" = 32; then
+               tmake_file="${tmake_file} sparc/t-softmul"
+       fi
        md_unwind_header=sparc/linux-unwind.h
        ;;
 sparc64-*-netbsd*)
index ca4a8929163c493bcdad5a3dad27c7a7dc5e5535..6583fe25ac797be6eeed68e42873c28e358797d8 100644 (file)
@@ -1,2 +1 @@
-CRTSTUFF_T_CFLAGS = `if test x$$($(CC) -print-multi-os-directory) \
-                       = x../lib64; then echo -mcmodel=medany; fi`
+CRTSTUFF_T_CFLAGS = -mcmodel=medany
index 0d91645ed67bc660de3122bc7fee7ada07d14983..0f18037e796052f8976771dfa55a1780e5911bb1 100644 (file)
@@ -4609,11 +4609,12 @@ 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.
+# Check 32bit or 64bit for x86 and sparc.
 case ${host} in
-i?86*-*-* | x86_64*-*-*)
+i?86*-*-* | x86_64*-*-* | sparc*-*-*)
   cat > conftest.c <<EOF
-#ifdef __x86_64__
+#if defined(__x86_64__) || \
+    (defined(__sparc__) && defined(__arch64__))
 host_address=64
 #else
 host_address=32
index a505257ac2334a6c9f6cf620cf2cf65767e27f37..5250be3b59e8c1459ccf841cbb0fbb8481f60bd7 100644 (file)
@@ -255,11 +255,12 @@ 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.
+# Check 32bit or 64bit for x86 and sparc.
 case ${host} in
-i?86*-*-* | x86_64*-*-*)
+i?86*-*-* | x86_64*-*-* | sparc*-*-*)
   cat > conftest.c <<EOF
-#ifdef __x86_64__
+#if defined(__x86_64__) || \
+    (defined(__sparc__) && defined(__arch64__))
 host_address=64
 #else
 host_address=32