From: Rainer Orth <ro@techfak.uni-bielefeld.de>
To: gcc-patches@gcc.gnu.org
Subject: 4.3/4.4 PATCH: Fix Solaris/x86 bootstrap with Sun ld (PR bootstrap/33100)
Date: Fri, 10 Oct 2008 14:53:00 -0000 [thread overview]
Message-ID: <18671.26770.804364.445962@manam.TechFak.Uni-Bielefeld.DE> (raw)
Solaris/x86 bootstrap with Sun ld has long been broken by a bug in Sun ld
which caused link failures for the amd64 libgcc_s.so.1.
The relevant bug
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6685125
has been fixed in recent versions of OpenSolaris, but there's no backport
to Solaris 10 yet. Therefore I'm offering the following workaround.
A proper fix would require to make the inclusion of i386/t-crtstuff
conditional on the result of an autoconf test, which doesn't seem to be
easily possible in the context of config.gcc. One might remove the
inclusion from config.gcc completely and handle it in libgcc/configure.ac
instead. I might try this if it is deemed worthwhile.
The test would look like this:
* minimal testcase:
.section .eh_frame,"a",@unwind
.zero 4
.section .jcr,"aw",@progbits
.zero 8
* assemble/link with
gcc -m64 -shared -o conftest.so conftest.s
* fails like this:
ld: fatal: unwind table: file /var/tmp//cc9VAy39.o: section .eh_frame: bad cie version 0: offset 0xfffffd7fffdff220
collect2: ld returned 1 exit status
With this patch, it is possible to bootstrap both mainline and the 4.3
branch without problems.
Ok for both?
Rainer
-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University
Fri Oct 10 16:27:14 2008 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
PR bootstrap/33100
* config.gcc (i[34567]86-*-solaris2*): Include i386/t-crtstuff
only with GNU ld.
Index: gcc/config.gcc
===================================================================
--- gcc/config.gcc (revision 140759)
+++ gcc/config.gcc (working copy)
@@ -1205,7 +1205,10 @@ i[34567]86-*-solaris2*)
*-*-solaris2.1[0-9]*)
tm_file="${tm_file} i386/x86-64.h i386/sol2-10.h"
tm_defines="${tm_defines} TARGET_BI_ARCH=1"
- tmake_file="$tmake_file i386/t-crtstuff i386/t-sol2-10"
+ tmake_file="$tmake_file i386/t-sol2-10"
+ if test x$gnu_ld = xyes; then
+ tmake_file="$tmake_file i386/t-crtstuff"
+ fi
need_64bit_hwint=yes
case X"${with_cpu}" in
Xgeneric|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx)
next reply other threads:[~2008-10-10 14:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-10 14:53 Rainer Orth [this message]
2008-11-05 16:05 ` Ian Lance Taylor
2008-11-05 17:12 ` Rainer Orth
2008-11-05 18:32 ` Ian Lance Taylor
2008-11-06 12:45 ` Rainer Orth
2008-11-19 17:41 ` Rainer Orth
2008-11-19 19:27 ` Ian Lance Taylor
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=18671.26770.804364.445962@manam.TechFak.Uni-Bielefeld.DE \
--to=ro@techfak.uni-bielefeld.de \
--cc=gcc-patches@gcc.gnu.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).