From 4b695c231a57896d5d4292f8fe2d71bd99bca5ed Mon Sep 17 00:00:00 2001 From: aj Date: Wed, 20 Nov 2002 15:18:53 +0000 Subject: [PATCH] * libtool.m4 (libtool_flags): Add patch from libtool CVS: Support linking of 32-bit libraries with ld on the x86-64, ppc64, s390x and sparc64 GNU/Linux systems. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59304 138bc75d-0d04-0410-961f-82ee72b054a4 --- ChangeLog | 78 +++++++++++++++++++++++++++++++++----------------------------- libtool.m4 | 42 +++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 859a4371d8e..1832fa493cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-11-19 Andreas Jaeger + + * libtool.m4 (libtool_flags): Add patch from libtool CVS: Support + linking of 32-bit libraries with ld on the x86-64, ppc64, s390x + and sparc64 GNU/Linux systems. + 2002-11-19 Nathan Sidwell * MAINTAINERS: Update email. @@ -1568,8 +1574,8 @@ Mon Apr 23 09:15:03 2001 Anthony Green 2000-12-13 Anthony Green * configure.in: Disable libgcj for any target not specifically - listed. Disable libgcj for x86 and Alpha Linux until compatible - with g++ abi. + listed. Disable libgcj for x86 and Alpha Linux until compatible + with g++ abi. 2000-12-13 Mike Stump @@ -2073,7 +2079,7 @@ Tue May 16 09:57:35 2000 Andrew Cagney Wed Apr 26 17:03:53 2000 Andrew Cagney : * Makefile.in (do-djunpack): New target. Update djunpack.bat with - current version information. Add to proto-toplev directory. + current version information. Add to proto-toplev directory. (gdb-taz): Build do-djunpack. 2000-05-15 David Edelsohn @@ -2117,9 +2123,9 @@ Sat May 6 21:12:55 CDT 2000 Jason Eckhardt Wed Apr 19 12:46:26 2000 Andrew Cagney * Makefile.in (taz, gdb-taz, gas.tar.bz2, binutils.tar.bz2, - gas+binutils.tar.bz2, libg++.tar.bz2, gnats.tar.bz2, gdb.tar.bz2, - dejagnu.tar.bz2, gdb+dejagnu.tar.bz2, insight.tar.bz2, - insight+dejagnu.tar.bz2, newlib.tar.bz2): Pass MD5PROG to sub-make. + gas+binutils.tar.bz2, libg++.tar.bz2, gnats.tar.bz2, gdb.tar.bz2, + dejagnu.tar.bz2, gdb+dejagnu.tar.bz2, insight.tar.bz2, + insight+dejagnu.tar.bz2, newlib.tar.bz2): Pass MD5PROG to sub-make. 2000-04-16 Dave Pitts @@ -2138,11 +2144,11 @@ Wed Apr 12 16:42:48 2000 Andrew Cagney (PACKAGE): Default to TOOL. (VER): Default to a shell script. (taz): Rewrite target. Move real work to do-proto-toplev. Include - md5 checksum generation. + md5 checksum generation. (do-proto-toplev): New target. Create $(PACKAGE)-$(VER) link. (do-tar-bz2): Delete creation of $(PACKAGE)-$(VER) link. (gdb.tar.bz2, dejagnu.tar.bz2, gdb+dejagnu.tar.bz2, - insight.tar.bz2): Use gdb-taz to create archive. + insight.tar.bz2): Use gdb-taz to create archive. Fri Apr 7 18:10:29 2000 Andrew Cagney @@ -2187,7 +2193,7 @@ Fri Mar 3 18:44:08 2000 Andrew Cagney (do-tar-bz2): Replace TOOL with PACKAGE. (gdb.tar.bz2): Remove GDBTK from GDB package. (gdb+dejagnu.tar.bz2, insight.tar.bz2, insight+dejagnu.tar.bz2, - dejagnu.tar.bz2): New packages. + dejagnu.tar.bz2): New packages. 2000-02-27 Andreas Jaeger @@ -2205,7 +2211,7 @@ Fri Mar 3 18:44:08 2000 Andrew Cagney Thu Feb 24 16:15:56 2000 Andrew Cagney * config.guess, config.sub: Updated to match config's 2000-02-15 - version. + version. 2000-02-23 Linas Vepstas @@ -2566,7 +2572,7 @@ Wed Mar 10 18:35:07 1999 Jeff Johnston Wed Mar 10 17:39:09 1999 Drew Moseley * configure.in: Added bsp support to arm-*-coff and arm-*-elf - targets. + targets. 1999-03-02 Nick Clifton @@ -2694,7 +2700,7 @@ Thu Dec 17 01:22:30 1998 Jeffrey A Law (law@cygnus.com) Tue Dec 15 17:02:58 1998 Bob Manson * configure.in: Add cygmon for x86-coff and x86-elf. Configure - cygmon for all sparclite targets, regardless of object format. + cygmon for all sparclite targets, regardless of object format. 1998-12-15 Mark Salter @@ -3081,7 +3087,7 @@ Sat Jun 27 22:46:32 1998 Jeffrey A Law (law@cygnus.com) Wed Jun 24 16:01:59 1998 John Metzler * configure.in (noconfigdirs): Add configure pattern for mips tx39 - cygmon + cygmon Tue Jun 23 22:42:32 1998 Mark Alexander @@ -3733,7 +3739,7 @@ Mon Sep 29 00:38:08 1997 Aaron Jackson Wed Sep 24 18:06:27 1997 Stu Grossman * configure.in (d30v): Remove tcl, tk, expect, gdb, itcl, tix, db, - sn, and gnuserv from noconfigdirs. + sn, and gnuserv from noconfigdirs. Wed Sep 24 15:18:32 1997 Ian Lance Taylor @@ -3753,7 +3759,7 @@ Thu Sep 18 21:43:23 1997 Alexandre Oliva Thu Sep 18 15:37:42 1997 Andrew Cagney * configure (tooldir): enable_gdbtk=YES for cygwin32, NO for - windows. Consistent with gdb/configure. + windows. Consistent with gdb/configure. 1997-09-15 02:37 Ulrich Drepper @@ -3934,13 +3940,13 @@ Tue Aug 5 12:12:44 1997 Andrew Cagney Mon Aug 4 22:59:02 1997 Andrew Cagney * Makefile.in (CC_FOR_TARGET): When winsup/Makefile present, - correctly specify the target build directory $(TARGET_SUBDIR)/winsup - for libraries. + correctly specify the target build directory $(TARGET_SUBDIR)/winsup + for libraries. Mon Aug 4 12:40:24 1997 Jason Merrill * Makefile.in (EXTRA_GCC_FLAGS): Fix handling of macros with values - separated by spaces. + separated by spaces. Thu Jul 31 19:49:49 1997 Ian Lance Taylor @@ -4071,7 +4077,7 @@ Mon Jun 16 11:11:10 1997 Ian Lance Taylor $(DEFAULT_YACC). * configure.in: Build itl, db, sn, etc., when building for native - cygwin32. + cygwin32. * Makefile.in (LD): New variable. (EXTRA_HOST_FLAGS): Pass down LD. @@ -4084,7 +4090,7 @@ Mon Jun 16 11:10:35 1997 Philip Blundell Fri Jun 13 10:22:56 1997 Bob Manson * configure.in (targargs): Strip out any supplied --build argument - before adding our own. Always add --build. + before adding our own. Always add --build. Thu Jun 12 21:12:28 1997 Bob Manson @@ -4279,7 +4285,7 @@ Tue Feb 25 18:46:14 1997 Stan Shebs Tue Feb 25 13:19:14 1997 Andrew Cagney * configure.in (noconfigdirs): Disable target-newlib, - target-examples and target-libiberty for d30v. + target-examples and target-libiberty for d30v. Fri Feb 21 17:56:25 1997 Martin M. Hunt @@ -4292,7 +4298,7 @@ Fri Feb 21 20:58:51 1997 Michael Meissner Sun Feb 16 15:41:09 1997 Andrew Cagney * configure.in (d30v-*): Remove sim directory from list of - unsupported d30v directories + unsupported d30v directories Tue Feb 18 17:32:42 1997 Martin M. Hunt @@ -4475,7 +4481,7 @@ Fri Nov 8 11:34:58 1996 David J. MacKenzie LynxOs is not a hardware supplier. * config.guess: Contributions from bug-gnu-utils to add support for: - OpenBSD like NetBSD. + OpenBSD like NetBSD. Stratus systems. More Pyramid systems. i[n>4]86 Intel chips. @@ -4616,7 +4622,7 @@ Wed Oct 2 15:52:36 1996 Klaus Kaempf Tue Oct 1 01:28:41 1996 James G. Smith * configure.in (noconfigdirs): Don't build libgloss for arm-coff - targets. + targets. Mon Sep 30 14:24:01 1996 Stan Shebs @@ -4843,7 +4849,7 @@ Sun Jun 23 22:41:54 1996 Geoffrey Noer Sat Jun 22 11:39:01 1996 Jason Merrill * Makefile.in (TARGET_SUBDIR): Move comment to previous line so we - don't get ". ". + don't get ". ". Fri Jun 21 17:24:48 1996 Jim Wilson @@ -5290,7 +5296,7 @@ Fri Dec 29 07:56:11 1995 Michael Meissner * Makefile.in (EXTRA_GCC_FLAGS): If any of the make variables LANGUAGES, BOOT_CFLAGS, STMP_FIXPROTO, LIMITS_H_TEST, LIBGCC1_TEST, LIBGCC2_CFLAGS, LIBGCC2_INCLUDES, and ENQUIRE are - non-empty, pass them on to the GCC make. + non-empty, pass them on to the GCC make. (all-bootstrap): New rule that is like all-gcc, except it executes the GCC bootstrap rule instead of the GCC all rule. @@ -5370,7 +5376,7 @@ Mon Dec 4 12:38:15 1995 Ian Lance Taylor Thu Nov 30 14:45:25 1995 J.T. Conklin * config/mt-v810 (CC_FOR_TARGET): Add -ansi flag. NEC compiler - defaults to K&R mode, but doesn't have varargs.h, so we have to + defaults to K&R mode, but doesn't have varargs.h, so we have to compile in ANSI mode. Thu Nov 30 16:57:33 1995 Per Bothner @@ -5482,15 +5488,15 @@ Mon Nov 13 12:34:20 1995 Stan Shebs * mpw-config.in: Configure grez if targeting Mac. * config.sub: Accept pmac and pmac-mpw as names for PowerMacs, - accept mpw and mac-mpw as names for m68k Macs, change macos7 to - just macos. + accept mpw and mac-mpw as names for m68k Macs, change macos7 to + just macos. * configure.in: Configure grez resource compiler if targeting Mac. * Makefile.in (all-grez, install-grez): New targets. Wed Nov 8 17:33:51 1995 Jason Merrill * configure: CXX defaults to gcc, not g++. If we find - gcc in the path, set CC to gcc -O2. + gcc in the path, set CC to gcc -O2. Tue Nov 7 15:45:17 1995 Ian Lance Taylor @@ -5540,8 +5546,8 @@ Wed Nov 1 12:23:20 1995 Ian Lance Taylor Tue Oct 31 17:52:39 1995 J.T. Conklin * configure.in (host_makefile_frag): Use m68k-sun-sunos* instead - of m68k-sun-* when selecting mh-sun3 to avoid matching NetBSD/sun3 - systems. + of m68k-sun-* when selecting mh-sun3 to avoid matching NetBSD/sun3 + systems. Tue Oct 31 16:57:32 1995 Jim Wilson @@ -5819,7 +5825,7 @@ Thu Sep 7 20:03:41 1995 Ken Raeburn Fri Sep 1 08:06:58 1995 James G. Smith * config.sub: recognise mips64vr4300 and mips64vr4300el as valid - targets. + targets. Wed Aug 30 21:06:50 1995 Jason Molenda (crash@phydeaux.cygnus.com) @@ -6813,8 +6819,8 @@ Tue Apr 26 18:11:33 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) Mon Apr 25 15:06:34 1994 Stan Shebs (shebs@andros.cygnus.com) - * configure.in (*-*-lynxos*): Don't configure newlib for either - native or cross Lynx. + * configure.in (*-*-lynxos*): Don't configure newlib for either + native or cross Lynx. Sat Apr 16 11:58:16 1994 Doug Evans (dje@canuck.cygnus.com) @@ -8559,7 +8565,7 @@ Thu Aug 27 13:04:42 1992 Brendan Kehoe (brendan@rtl.cygnus.com) Mon Aug 24 14:05:14 1992 Ian Lance Taylor (ian@cygnus.com) - * config.sub, configure.in: accept OSE68000 and OSE68k. + * config.sub, configure.in: accept OSE68000 and OSE68k. * Makefile.in: don't create all directories for ``make install''; let the subdirectories create the ones they need. diff --git a/libtool.m4 b/libtool.m4 index 3f452bcba28..99149ffe140 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -175,6 +175,48 @@ ia64-*-hpux*) rm -rf conftest* ;; +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" -- 2.11.0