public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/64900] New: gotools don't link on Solaris 11/x86
@ 2015-02-02 14:28 ro at gcc dot gnu.org
2015-02-02 14:29 ` [Bug go/64900] " ro at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2015-02-02 14:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64900
Bug ID: 64900
Summary: gotools don't link on Solaris 11/x86
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: go
Assignee: ian at airs dot com
Reporter: ro at gcc dot gnu.org
CC: cmang at google dot com
Host: i?86-*-solaris2.11
Target: i?86-*-solaris2.11
Build: i?86-*-solaris2.11
Unfortunately, the fix for PR go/64738 (not linking gotools statically) caused
Solaris 11/x86 bootstrap with gas/gld to fail:
/vol/gcc/bin/gld-2.24: gofmt: hidden symbol `_Unwind_GetLanguageSpecificData'
in
/var/gcc/regression/trunk/11-gcc-gas-gld/build/./gcc/libgcc_eh.a(unwind-dw2.o)
is referenced by DSO
/vol/gcc/bin/gld-2.24: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [gofmt] Error 1
Adding -static-libgo back in does restore it. Strangely, this is neither an
issue on Solaris 10/x86 with gas/gld nor on Solaris 11/SPARC with gas/gld.
Rainer
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/64900] gotools don't link on Solaris 11/x86
2015-02-02 14:28 [Bug go/64900] New: gotools don't link on Solaris 11/x86 ro at gcc dot gnu.org
@ 2015-02-02 14:29 ` ro at gcc dot gnu.org
2015-02-03 19:25 ` ian at airs dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2015-02-02 14:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64900
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |5.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/64900] gotools don't link on Solaris 11/x86
2015-02-02 14:28 [Bug go/64900] New: gotools don't link on Solaris 11/x86 ro at gcc dot gnu.org
2015-02-02 14:29 ` [Bug go/64900] " ro at gcc dot gnu.org
@ 2015-02-03 19:25 ` ian at airs dot com
2015-02-04 15:55 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ian at airs dot com @ 2015-02-03 19:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64900
--- Comment #1 from Ian Lance Taylor <ian at airs dot com> ---
Normally libgo.so will get the symbol _Unwind_GetLanguageSpecificData from
libgcc_s.so. The first step here is to find out why that didn't happen. Was
libgo.so not linked against libgcc_s.so? Does libgcc_s.so not define
_Unwind_GetLanguageSpecificData?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/64900] gotools don't link on Solaris 11/x86
2015-02-02 14:28 [Bug go/64900] New: gotools don't link on Solaris 11/x86 ro at gcc dot gnu.org
2015-02-02 14:29 ` [Bug go/64900] " ro at gcc dot gnu.org
2015-02-03 19:25 ` ian at airs dot com
@ 2015-02-04 15:55 ` ro at CeBiTec dot Uni-Bielefeld.DE
2015-02-04 16:44 ` ian at airs dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2015-02-04 15:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64900
--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #1 from Ian Lance Taylor <ian at airs dot com> ---
> Normally libgo.so will get the symbol _Unwind_GetLanguageSpecificData from
> libgcc_s.so. The first step here is to find out why that didn't happen. Was
> libgo.so not linked against libgcc_s.so? Does libgcc_s.so not define
It wasn't: it turns out that Solaris 11/SPARC and x86 differ in their
libgcc spec (sparc vs. x86):
*libgcc:
-%{static|static-libgcc:-lgcc
-lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!s
hared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s
-lgcc}}%{shared:%{shared-lib
gcc:-lgcc_s}%{!shared-libgcc:-lgcc}}}}
+%{static|static-libgcc:-lgcc
-lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libg
cc:-lgcc --as-needed -lgcc_s --no-as-needed}%{shared-libgcc:-lgcc_s%{!shared:
-l
gcc}}}}
On x86, --as-needed support in gld was disabled due to binutils PR
ld/12320 (cf. gcc/configure.ac), thus libgcc_s is only linked with
-shared when explicitly specifying -shared-libgcc.
> _Unwind_GetLanguageSpecificData?
It does.
The following patch allowed me to correctly link libgo.so with
libgcc_s.so, and as expected, gotools also link without problems:
diff --git a/libgo/Makefile.am b/libgo/Makefile.am
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -1991,7 +1991,8 @@ libgo_go_objs = \
unicode/utf8.lo
libgo_ldflags = \
- -version-info $(libtool_VERSION) $(PTHREAD_CFLAGS) $(AM_LDFLAGS)
+ -version-info $(libtool_VERSION) -Wc,-shared-libgcc \
+ $(PTHREAD_CFLAGS) $(AM_LDFLAGS)
libgo_libadd = \
$(libgo_go_objs) ../libbacktrace/libbacktrace.la \
Rainer
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/64900] gotools don't link on Solaris 11/x86
2015-02-02 14:28 [Bug go/64900] New: gotools don't link on Solaris 11/x86 ro at gcc dot gnu.org
` (2 preceding siblings ...)
2015-02-04 15:55 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2015-02-04 16:44 ` ian at airs dot com
2015-04-22 11:59 ` jakub at gcc dot gnu.org
2015-07-16 9:12 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: ian at airs dot com @ 2015-02-04 16:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64900
--- Comment #3 from Ian Lance Taylor <ian at airs dot com> ---
Unfortunately that patch breaks the build on x86 GNU/Linux. The problem is
that the split-stack support (the __morestack symbol) must be linked into the
shared library directly, not via -lgcc_s. So it's necessary to link with -lgcc
also. The correct link on x86 GNU/Linux is -lgcc -lgcc_s, but using
-shared-libgcc only links with -lgcc_s.
I think -lgcc -lgcc_s should also work on x86 Solaris, as the problematic
symbol is in -lgcc_eh, not -lgcc. But I'm not sure about the best way to get
that, as not all systems support -lgcc_s.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/64900] gotools don't link on Solaris 11/x86
2015-02-02 14:28 [Bug go/64900] New: gotools don't link on Solaris 11/x86 ro at gcc dot gnu.org
` (3 preceding siblings ...)
2015-02-04 16:44 ` ian at airs dot com
@ 2015-04-22 11:59 ` jakub at gcc dot gnu.org
2015-07-16 9:12 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-04-22 11:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64900
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|5.0 |5.2
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 5.1 has been released.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug go/64900] gotools don't link on Solaris 11/x86
2015-02-02 14:28 [Bug go/64900] New: gotools don't link on Solaris 11/x86 ro at gcc dot gnu.org
` (4 preceding siblings ...)
2015-04-22 11:59 ` jakub at gcc dot gnu.org
@ 2015-07-16 9:12 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-07-16 9:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64900
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|5.2 |5.3
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 5.2 is being released, adjusting target milestone to 5.3.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-16 9:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-02 14:28 [Bug go/64900] New: gotools don't link on Solaris 11/x86 ro at gcc dot gnu.org
2015-02-02 14:29 ` [Bug go/64900] " ro at gcc dot gnu.org
2015-02-03 19:25 ` ian at airs dot com
2015-02-04 15:55 ` ro at CeBiTec dot Uni-Bielefeld.DE
2015-02-04 16:44 ` ian at airs dot com
2015-04-22 11:59 ` jakub at gcc dot gnu.org
2015-07-16 9:12 ` rguenth at gcc dot gnu.org
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).