public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
@ 2009-10-06 15:46 developer at sandoe-acoustics dot co dot uk
2009-10-06 15:57 ` [Bug target/41605] " developer at sandoe-acoustics dot co dot uk
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2009-10-06 15:46 UTC (permalink / raw)
To: gcc-bugs
if libgcc (for example) is linked statically the eh comes from the static link,
however, other libraries (e.g. libfortran or libstdc++) which are still linked
dynamically can refer to a different eh in libSystem.
The same problem can occur when libgfortran/libstdc++/libgcc are linked
statically and libgomp remains dynamic.
--
Summary: Static linking of libgcc/libgfortran/libstdc++ can cause
inconsistent symbol resolution.
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: developer at sandoe-acoustics dot co dot uk
GCC build triplet: *-apple-darwin*
GCC host triplet: *-apple-darwin*
GCC target triplet: *-apple-darwin*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
@ 2009-10-06 15:57 ` developer at sandoe-acoustics dot co dot uk
2009-10-06 17:08 ` developer at sandoe-acoustics dot co dot uk
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2009-10-06 15:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from developer at sandoe-acoustics dot co dot uk 2009-10-06 15:56 -------
Created an attachment (id=18727)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18727&action=view)
make sure that static linking of libraries is consistent
this patch provides:
(a) new spec with direct resolution for libgomp that provides a static version
LINK_COMMAND_SPECS for darwin and darwin9+
(b) file replacement specs for libstdc++.
dependencies:
if static libgcc => link libgomp, libgfortran, libstdc++ statically
if static libstdc++ || libgfortran || libgcc link libgomp statically.
bootstrapped on powerpc-apple-darwin8, i686-apple-darwin9.
object checked by hand with otool for correct library refs, reg-tested for
check-target-libgomp {m32,m64}{-static-libgcc,
static-libgfortran,static-libstdc++,}
Note static-libstdc++ will not work without changes on PR4194/PR4196
log:
*gcc/config/darwin.h(LINK_COMMAND_SPEC): Resolve fopenmp specifically
for target
(LINK_SPEC): replace dynamic libraries by static equivalents where
necessary
*gcc/config/darwin9.h(LINK_COMMAND_SPEC): Resolve fopenmp specifically
for target
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
2009-10-06 15:57 ` [Bug target/41605] " developer at sandoe-acoustics dot co dot uk
@ 2009-10-06 17:08 ` developer at sandoe-acoustics dot co dot uk
2009-10-08 16:36 ` mrs at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2009-10-06 17:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from developer at sandoe-acoustics dot co dot uk 2009-10-06 17:07 -------
Created an attachment (id=18729)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18729&action=view)
provide -B options to allow spec replacement like libxx.a%s.
you will need this for the testsuite to find the static libs.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
2009-10-06 15:57 ` [Bug target/41605] " developer at sandoe-acoustics dot co dot uk
2009-10-06 17:08 ` developer at sandoe-acoustics dot co dot uk
@ 2009-10-08 16:36 ` mrs at gcc dot gnu dot org
2009-10-08 16:44 ` mrs at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mrs at gcc dot gnu dot org @ 2009-10-08 16:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from mrs at gcc dot gnu dot org 2009-10-08 16:36 -------
These two look ok to me. The testsuite should be glanced at by Janis to double
check.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
` (2 preceding siblings ...)
2009-10-08 16:36 ` mrs at gcc dot gnu dot org
@ 2009-10-08 16:44 ` mrs at gcc dot gnu dot org
2009-10-14 11:20 ` developer at sandoe-acoustics dot co dot uk
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mrs at gcc dot gnu dot org @ 2009-10-08 16:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mrs at gcc dot gnu dot org 2009-10-08 16:44 -------
Oh, if one wanted to, one could have libgcc_s forward the EH calls into
/usr/lib/libgcc_s.1.dylib by dlopening it and then doing dlsym on the symbols
and calling them. This would `fix' the programs that linked against a gcc
libgcc_s file that uses EH when run on a system that has EH on the system.
With that technology, I think all the mismatching here, just goes away.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
` (3 preceding siblings ...)
2009-10-08 16:44 ` mrs at gcc dot gnu dot org
@ 2009-10-14 11:20 ` developer at sandoe-acoustics dot co dot uk
2009-10-14 13:28 ` mrs at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2009-10-14 11:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from developer at sandoe-acoustics dot co dot uk 2009-10-14 11:20 -------
(In reply to comment #4)
> Oh, if one wanted to, one could have libgcc_s forward the EH calls into
> /usr/lib/libgcc_s.1.dylib by dlopening it and then doing dlsym on the symbols
> and calling them. This would `fix' the programs that linked against a gcc
> libgcc_s file that uses EH when run on a system that has EH on the system.
> With that technology, I think all the mismatching here, just goes away.
note1: the dependent fixes for static-libstdc++ are 41594/41596.
Would you accept the solution proposed here as suitable at present?
Noting that eh forwarding could be a useful enhancement at some future time?
Even with potential forwarding of eh it is still desirable to enable a
statically linked executable for those cases where such is useful [excepting
that libSystem is always dynamic].
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
` (4 preceding siblings ...)
2009-10-14 11:20 ` developer at sandoe-acoustics dot co dot uk
@ 2009-10-14 13:28 ` mrs at gcc dot gnu dot org
2009-12-22 22:12 ` janis at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mrs at gcc dot gnu dot org @ 2009-10-14 13:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from mrs at gcc dot gnu dot org 2009-10-14 13:28 -------
See comment #3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
` (5 preceding siblings ...)
2009-10-14 13:28 ` mrs at gcc dot gnu dot org
@ 2009-12-22 22:12 ` janis at gcc dot gnu dot org
2009-12-31 1:35 ` davek at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: janis at gcc dot gnu dot org @ 2009-12-22 22:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from janis at gcc dot gnu dot org 2009-12-22 22:11 -------
Subject: Bug 41605
Author: janis
Date: Tue Dec 22 22:11:27 2009
New Revision: 155408
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155408
Log:
2009-12-22 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
gcc/
PR target/41605
* lib/g++.exp: Provide -B options to allow for link spec %s
substitutions for static libraries.
libstdc++-v3/
PR target/41605
* testsuite/libstdc++-abi/abi.exp: Provide -B options to allow for
link spec %s substitutions for static libraries.
* testsuite/lib/libstdc++.exp: Ditto
libgomp/
PR target/41605
* testsuite/lib/libgomp.exp: Provide -B options to allow for
link spec %s substitutions for static libraries.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/lib/g++.exp
trunk/libgomp/ChangeLog
trunk/libgomp/testsuite/lib/libgomp.exp
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/lib/libstdc++.exp
trunk/libstdc++-v3/testsuite/libstdc++-abi/abi.exp
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
` (6 preceding siblings ...)
2009-12-22 22:12 ` janis at gcc dot gnu dot org
@ 2009-12-31 1:35 ` davek at gcc dot gnu dot org
2009-12-31 11:40 ` howarth at nitro dot med dot uc dot edu
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: davek at gcc dot gnu dot org @ 2009-12-31 1:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from davek at gcc dot gnu dot org 2009-12-31 01:35 -------
Subject: Bug 41605
Author: davek
Date: Thu Dec 31 01:35:24 2009
New Revision: 155534
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155534
Log:
2009-12-31 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
PR target/41605
* config/darwin.h (LINK_COMMAND_SPEC): Resolve fopenmp specifically
for target.
(LINK_SPEC): Replace dynamic libraries by static equivalents where
necessary.
* config/darwin9.h (LINK_COMMAND_SPEC): Resolve fopenmp specifically
for target.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/darwin.h
trunk/gcc/config/darwin9.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
` (7 preceding siblings ...)
2009-12-31 1:35 ` davek at gcc dot gnu dot org
@ 2009-12-31 11:40 ` howarth at nitro dot med dot uc dot edu
2009-12-31 17:07 ` developer at sandoe-acoustics dot co dot uk
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2009-12-31 11:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from howarth at nitro dot med dot uc dot edu 2009-12-31 11:39 -------
I am now seeing...
FAIL: gfortran.dg/gomp/recursion1.f90 -Os execution test
at r155534 that wasn't present at r155526 so the proposed
fix appears to have caused a gfortran regression on x86_64-apple-darwin10.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
` (8 preceding siblings ...)
2009-12-31 11:40 ` howarth at nitro dot med dot uc dot edu
@ 2009-12-31 17:07 ` developer at sandoe-acoustics dot co dot uk
2009-12-31 20:42 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2009-12-31 17:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from developer at sandoe-acoustics dot co dot uk 2009-12-31 17:07 -------
(In reply to comment #9)
> FAIL: gfortran.dg/gomp/recursion1.f90 -Os execution test
There are two problems:
1) there is a problem with specifying -fopenmp twice on the CL
gfortran.dg/gomp/gomp.exp specifies it and so does the testcase (but I guess
we should be robust to this)?
2) there needs to be a -B for libgomp in the gfortran.dg/gomp section of the
testsuite.
===
I don't think there's any problem with the actual code generated by the patch,
it seems to be substituting as required.
I'll look into making sure that there's only one -fopenmp on the CL ....
... and supplying the missing -B /path/to/libgomp
gfortran.dg/gomp/recursion1.f9 is a new test - (29th of Dec) and thrown up a
problem not seen before
you can regress the patch if you like - but I'd prefer to fix the testsuite
problems...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
` (9 preceding siblings ...)
2009-12-31 17:07 ` developer at sandoe-acoustics dot co dot uk
@ 2009-12-31 20:42 ` jakub at gcc dot gnu dot org
2010-01-02 22:51 ` kargl at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-12-31 20:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jakub at gcc dot gnu dot org 2009-12-31 20:42 -------
dg-do run gomp testcases don't belong into gcc/testsuite/*.dg/gomp/, but to
libgomp/testsuite/libgomp.*/
Please move recursion1.f90 there.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
` (10 preceding siblings ...)
2009-12-31 20:42 ` jakub at gcc dot gnu dot org
@ 2010-01-02 22:51 ` kargl at gcc dot gnu dot org
2010-01-03 22:46 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-01-02 22:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from kargl at gcc dot gnu dot org 2010-01-02 22:51 -------
*** Bug 42583 has been marked as a duplicate of this bug. ***
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |danglin at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
` (11 preceding siblings ...)
2010-01-02 22:51 ` kargl at gcc dot gnu dot org
@ 2010-01-03 22:46 ` rguenth at gcc dot gnu dot org
2010-01-04 11:49 ` developer at sandoe-acoustics dot co dot uk
2010-01-22 9:39 ` developer at sandoe-acoustics dot co dot uk
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-01-03 22:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2010-01-03 22:45 -------
Is this bug now fixed?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
` (12 preceding siblings ...)
2010-01-03 22:46 ` rguenth at gcc dot gnu dot org
@ 2010-01-04 11:49 ` developer at sandoe-acoustics dot co dot uk
2010-01-22 9:39 ` developer at sandoe-acoustics dot co dot uk
14 siblings, 0 replies; 16+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2010-01-04 11:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from developer at sandoe-acoustics dot co dot uk 2010-01-04 11:49 -------
(In reply to comment #13)
> Is this bug now fixed?
AFAICT, yes - comment #9 is not the result of this patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/41605] Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution.
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
` (13 preceding siblings ...)
2010-01-04 11:49 ` developer at sandoe-acoustics dot co dot uk
@ 2010-01-22 9:39 ` developer at sandoe-acoustics dot co dot uk
14 siblings, 0 replies; 16+ messages in thread
From: developer at sandoe-acoustics dot co dot uk @ 2010-01-22 9:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from developer at sandoe-acoustics dot co dot uk 2010-01-22 09:38 -------
successful tests on darwin8/darwin9 and no further reported issues.
--
developer at sandoe-acoustics dot co dot uk changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41605
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2010-01-22 9:39 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-06 15:46 [Bug target/41605] New: Static linking of libgcc/libgfortran/libstdc++ can cause inconsistent symbol resolution developer at sandoe-acoustics dot co dot uk
2009-10-06 15:57 ` [Bug target/41605] " developer at sandoe-acoustics dot co dot uk
2009-10-06 17:08 ` developer at sandoe-acoustics dot co dot uk
2009-10-08 16:36 ` mrs at gcc dot gnu dot org
2009-10-08 16:44 ` mrs at gcc dot gnu dot org
2009-10-14 11:20 ` developer at sandoe-acoustics dot co dot uk
2009-10-14 13:28 ` mrs at gcc dot gnu dot org
2009-12-22 22:12 ` janis at gcc dot gnu dot org
2009-12-31 1:35 ` davek at gcc dot gnu dot org
2009-12-31 11:40 ` howarth at nitro dot med dot uc dot edu
2009-12-31 17:07 ` developer at sandoe-acoustics dot co dot uk
2009-12-31 20:42 ` jakub at gcc dot gnu dot org
2010-01-02 22:51 ` kargl at gcc dot gnu dot org
2010-01-03 22:46 ` rguenth at gcc dot gnu dot org
2010-01-04 11:49 ` developer at sandoe-acoustics dot co dot uk
2010-01-22 9:39 ` developer at sandoe-acoustics dot co dot uk
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).