public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/42208]  New: gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib
@ 2009-11-28 19:43 howarth at nitro dot med dot uc dot edu
  2009-11-28 19:53 ` [Bug target/42208] " howarth at nitro dot med dot uc dot edu
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2009-11-28 19:43 UTC (permalink / raw)
  To: gcc-bugs

While trying to walk through the unwinder under darwin9 in current gcc trunk, I
discovered that we are now linking against multiple libgcc in all of the shared
libraries...

otool -L libffi.4.dylib 
libffi.4.dylib:
        /sw/lib/gcc4.5/lib/libffi.4.dylib (compatibility version 5.0.0, current
version 5.1.0)
        /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version
1.0.0)
        /sw/lib/gcc4.5/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 111.1.4)

except for /usr/lib/libgcc_s.1.dylib itself. This is very bad and breaks the
ability to 
walk through the unwinder in darwin9 (which works in gcc 4.4.2 that doesn't
show
this problem).


-- 
           Summary: gcc trunk incorrectly linking against
                    /usr/lib/libgcc_s.1.dylib
           Product: gcc
           Version: 4.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: howarth at nitro dot med dot uc dot edu
 GCC build triplet: x86_64-apple-darwin*
  GCC host triplet: x86_64-apple-darwin*
GCC target triplet: x86_64-apple-darwin*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42208


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/42208] gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib
  2009-11-28 19:43 [Bug target/42208] New: gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib howarth at nitro dot med dot uc dot edu
@ 2009-11-28 19:53 ` howarth at nitro dot med dot uc dot edu
  2009-11-28 20:04 ` howarth at nitro dot med dot uc dot edu
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2009-11-28 19:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from howarth at nitro dot med dot uc dot edu  2009-11-28 19:53 -------
/sw/src/fink.build/gcc45-4.4.999-20091127/darwin_objdir/./gcc/xgcc
-B/sw/src/fink.build/gcc45-4.4.999-20091127/darwin_objdir/./gcc/
-B/sw/lib/gcc4.5/x86_64-apple-darwin9.8.0/bin/
-B/sw/lib/gcc4.5/x86_64-apple-darwin9.8.0/lib/ -isystem
/sw/lib/gcc4.5/x86_64-apple-darwin9.8.0/include -isystem
/sw/lib/gcc4.5/x86_64-apple-darwin9.8.0/sys-include -dynamiclib -o
.libs/libssp.0.dylib .libs/ssp.o .libs/gets-chk.o .libs/memcpy-chk.o
.libs/memmove-chk.o .libs/mempcpy-chk.o .libs/memset-chk.o .libs/snprintf-chk.o
.libs/sprintf-chk.o .libs/stpcpy-chk.o .libs/strcat-chk.o .libs/strcpy-chk.o
.libs/strncat-chk.o .libs/strncpy-chk.o .libs/vsnprintf-chk.o
.libs/vsprintf-chk.o -v -install_name /sw/lib/gcc4.5/lib/libssp.0.dylib
-compatibility_version 1 -current_version 1.0 -Wl,-single_module 
Reading specs from
/sw/src/fink.build/gcc45-4.4.999-20091127/darwin_objdir/./gcc/specs
COLLECT_GCC=/sw/src/fink.build/gcc45-4.4.999-20091127/darwin_objdir/gcc/xgcc
COLLECT_LTO_WRAPPER=/sw/src/fink.build/gcc45-4.4.999-20091127/darwin_objdir/./gcc/lto-wrapper
Target: x86_64-apple-darwin9.8.0
Configured with: ../gcc-4.5-20091127/configure --prefix=/sw
--prefix=/sw/lib/gcc4.5 --mandir=/sw/share/man --infodir=/sw/share/info
--enable-languages=c,c++,fortran,objc,obj-c++,java --with-gmp=/sw
--with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-mpc=/sw
--with-system-zlib --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--disable-libjava-multilib
Thread model: posix
gcc version 4.5.0 20091127 (experimental) (GCC) 
COMPILER_PATH=/sw/src/fink.build/gcc45-4.4.999-20091127/darwin_objdir/./gcc/
LIBRARY_PATH=/sw/src/fink.build/gcc45-4.4.999-20091127/darwin_objdir/./gcc/:/usr/lib/
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.5.8'
'-B/sw/src/fink.build/gcc45-4.4.999-20091127/darwin_objdir/./gcc/'
'-B/sw/lib/gcc4.5/x86_64-apple-darwin9.8.0/bin/'
'-B/sw/lib/gcc4.5/x86_64-apple-darwin9.8.0/lib/' '-isystem'
'/sw/lib/gcc4.5/x86_64-apple-darwin9.8.0/include' '-isystem'
'/sw/lib/gcc4.5/x86_64-apple-darwin9.8.0/sys-include' '-Zdynamiclib' '-o'
'.libs/libssp.0.dylib' '-v' '-Zinstall_name'
'/sw/lib/gcc4.5/lib/libssp.0.dylib' '-compatibility_version' '1'
'-current_version' '1.0' '-mtune=generic'
 /sw/src/fink.build/gcc45-4.4.999-20091127/darwin_objdir/./gcc/collect2
-dynamic -dylib -dylib_compatibility_version 1 -dylib_current_version 1.0 -arch
x86_64 -dylib_install_name /sw/lib/gcc4.5/lib/libssp.0.dylib
-macosx_version_min 10.5.8 -weak_reference_mismatches non-weak -o
.libs/libssp.0.dylib -ldylib1.10.5.o
-L/sw/src/fink.build/gcc45-4.4.999-20091127/darwin_objdir/./gcc .libs/ssp.o
.libs/gets-chk.o .libs/memcpy-chk.o .libs/memmove-chk.o .libs/mempcpy-chk.o
.libs/memset-chk.o .libs/snprintf-chk.o .libs/sprintf-chk.o .libs/stpcpy-chk.o
.libs/strcat-chk.o .libs/strcpy-chk.o .libs/strncat-chk.o .libs/strncpy-chk.o
.libs/vsnprintf-chk.o .libs/vsprintf-chk.o -single_module -lgcc_s.10.5
-lgcc_ext.10.5 -lgcc -lSystem
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.5.8'
'-B/sw/src/fink.build/gcc45-4.4.999-20091127/darwin_objdir/./gcc/'
'-B/sw/lib/gcc4.5/x86_64-apple-darwin9.8.0/bin/'
'-B/sw/lib/gcc4.5/x86_64-apple-darwin9.8.0/lib/' '-isystem'
'/sw/lib/gcc4.5/x86_64-apple-darwin9.8.0/include' '-isystem'
'/sw/lib/gcc4.5/x86_64-apple-darwin9.8.0/sys-include' '-Zdynamiclib' '-o'
'.libs/libssp.0.dylib' '-v' '-Zinstall_name'
'/sw/lib/gcc4.5/lib/libssp.0.dylib' '-compatibility_version' '1'
'-current_version' '1.0' '-mtune=generic'

/sw/src/fink.build/gcc44-4.4.2-1000/darwin_objdir/./gcc/xgcc
-B/sw/src/fink.build/gcc44-4.4.2-1000/darwin_objdir/./gcc/
-B/sw/lib/gcc4.4/x86_64-apple-darwin9/bin/
-B/sw/lib/gcc4.4/x86_64-apple-darwin9/lib/ -isystem
/sw/lib/gcc4.4/x86_64-apple-darwin9/include -isystem
/sw/lib/gcc4.4/x86_64-apple-darwin9/sys-include -dynamiclib -o
.libs/libssp.0.dylib .libs/ssp.o .libs/gets-chk.o .libs/memcpy-chk.o
.libs/memmove-chk.o .libs/mempcpy-chk.o .libs/memset-chk.o .libs/snprintf-chk.o
.libs/sprintf-chk.o .libs/stpcpy-chk.o .libs/strcat-chk.o .libs/strcpy-chk.o
.libs/strncat-chk.o .libs/strncpy-chk.o .libs/vsnprintf-chk.o
.libs/vsprintf-chk.o -install_name /sw/lib/gcc4.4/lib/libssp.0.dylib -v
-compatibility_version 1 -current_version 1.0 -Wl,-single_module
Reading specs from
/sw/src/fink.build/gcc44-4.4.2-1000/darwin_objdir/./gcc/specs
Target: x86_64-apple-darwin9
Configured with: ../gcc-4.4.2/configure --prefix=/sw --prefix=/sw/lib/gcc4.4
--mandir=/sw/share/man --infodir=/sw/share/info
--enable-languages=c,c++,fortran,objc,java --with-gmp=/sw
--with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw --with-system-zlib
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--disable-libjava-multilib --build=x86_64-apple-darwin9
--host=x86_64-apple-darwin9 --target=x86_64-apple-darwin9
Thread model: posix
gcc version 4.4.2 (GCC) 
COMPILER_PATH=/sw/src/fink.build/gcc44-4.4.2-1000/darwin_objdir/./gcc/
LIBRARY_PATH=/sw/src/fink.build/gcc44-4.4.2-1000/darwin_objdir/./gcc/:/usr/lib/
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.5.8'
'-B/sw/src/fink.build/gcc44-4.4.2-1000/darwin_objdir/./gcc/'
'-B/sw/lib/gcc4.4/x86_64-apple-darwin9/bin/'
'-B/sw/lib/gcc4.4/x86_64-apple-darwin9/lib/' '-isystem'
'/sw/lib/gcc4.4/x86_64-apple-darwin9/include' '-isystem'
'/sw/lib/gcc4.4/x86_64-apple-darwin9/sys-include' '-Zdynamiclib' '-o'
'.libs/libssp.0.dylib' '-Zinstall_name' '/sw/lib/gcc4.4/lib/libssp.0.dylib'
'-v' '-compatibility_version' '1' '-current_version' '1.0' '-mtune=generic'
 /sw/src/fink.build/gcc44-4.4.2-1000/darwin_objdir/./gcc/collect2 -dynamic
-dylib -dylib_compatibility_version 1 -dylib_current_version 1.0 -arch x86_64
-dylib_install_name /sw/lib/gcc4.4/lib/libssp.0.dylib -macosx_version_min
10.5.8 -weak_reference_mismatches non-weak -o .libs/libssp.0.dylib
-ldylib1.10.5.o -L/sw/src/fink.build/gcc44-4.4.2-1000/darwin_objdir/./gcc
.libs/ssp.o .libs/gets-chk.o .libs/memcpy-chk.o .libs/memmove-chk.o
.libs/mempcpy-chk.o .libs/memset-chk.o .libs/snprintf-chk.o .libs/sprintf-chk.o
.libs/stpcpy-chk.o .libs/strcat-chk.o .libs/strcpy-chk.o .libs/strncat-chk.o
.libs/strncpy-chk.o .libs/vsnprintf-chk.o .libs/vsprintf-chk.o -single_module
-lgcc_s.10.5 -lgcc -lSystem
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.5.8'
'-B/sw/src/fink.build/gcc44-4.4.2-1000/darwin_objdir/./gcc/'
'-B/sw/lib/gcc4.4/x86_64-apple-darwin9/bin/'
'-B/sw/lib/gcc4.4/x86_64-apple-darwin9/lib/' '-isystem'
'/sw/lib/gcc4.4/x86_64-apple-darwin9/include' '-isystem'
'/sw/lib/gcc4.4/x86_64-apple-darwin9/sys-include' '-Zdynamiclib' '-o'
'.libs/libssp.0.dylib' '-Zinstall_name' '/sw/lib/gcc4.4/lib/libssp.0.dylib'
'-v' '-compatibility_version' '1' '-current_version' '1.0' '-mtune=generic'

Two sample linkages of which the top one in gcc trunk gets the extra libgcc.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42208


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/42208] gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib
  2009-11-28 19:43 [Bug target/42208] New: gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib howarth at nitro dot med dot uc dot edu
  2009-11-28 19:53 ` [Bug target/42208] " howarth at nitro dot med dot uc dot edu
@ 2009-11-28 20:04 ` howarth at nitro dot med dot uc dot edu
  2009-11-28 20:28 ` howarth at nitro dot med dot uc dot edu
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2009-11-28 20:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from howarth at nitro dot med dot uc dot edu  2009-11-28 20:04 -------
A coarse regression check shows that this problem didn't exist on 20090928 but
did on 20090930.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42208


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/42208] gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib
  2009-11-28 19:43 [Bug target/42208] New: gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib howarth at nitro dot med dot uc dot edu
  2009-11-28 19:53 ` [Bug target/42208] " howarth at nitro dot med dot uc dot edu
  2009-11-28 20:04 ` howarth at nitro dot med dot uc dot edu
@ 2009-11-28 20:28 ` howarth at nitro dot med dot uc dot edu
  2009-11-28 21:09 ` howarth at nitro dot med dot uc dot edu
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2009-11-28 20:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from howarth at nitro dot med dot uc dot edu  2009-11-28 20:28 -------
This is weird. I tested r152433 and r152434 last week to pin down another
regression and neither show the issue. Either I have some misdated builds or
this issue has been latent at times. Will do a regression check for around Oct
3rd and 4th.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42208


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/42208] gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib
  2009-11-28 19:43 [Bug target/42208] New: gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib howarth at nitro dot med dot uc dot edu
                   ` (2 preceding siblings ...)
  2009-11-28 20:28 ` howarth at nitro dot med dot uc dot edu
@ 2009-11-28 21:09 ` howarth at nitro dot med dot uc dot edu
  2009-11-28 21:21 ` howarth at nitro dot med dot uc dot edu
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2009-11-28 21:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from howarth at nitro dot med dot uc dot edu  2009-11-28 21:09 -------
Doh! I bet this is caused by Iain's libgcc_ext patch. 

http://gcc.gnu.org/viewcvs/trunk/libgcc/config/t-slibgcc-darwin?r1=154282&r2=154281&pathrev=154282

Specifically the section...

INSTALL_FILES=libgcc_s.10.4.dylib libgcc_s.10.5.dylib libgcc_s.1.dylib
+# we're only going to build the stubs if the target slib is /usr/lib
+# there is no other case in which they're useful in a live system.
+ifeq (/usr/lib,$(shlib_slibdir))
+LGCC_STUBS = libgcc_s.10.4.dylib libgcc_s.10.5.dylib
+else
+LGCC_STUBS =
+endif

I don't think this was properly thought through. By not building the stubs, the
ones in /usr/lib get used and we start linking in two different libgcc's.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42208


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/42208] gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib
  2009-11-28 19:43 [Bug target/42208] New: gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib howarth at nitro dot med dot uc dot edu
                   ` (3 preceding siblings ...)
  2009-11-28 21:09 ` howarth at nitro dot med dot uc dot edu
@ 2009-11-28 21:21 ` howarth at nitro dot med dot uc dot edu
  2009-11-28 21:41 ` howarth at nitro dot med dot uc dot edu
  2009-12-23 14:10 ` howarth at nitro dot med dot uc dot edu
  6 siblings, 0 replies; 8+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2009-11-28 21:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from howarth at nitro dot med dot uc dot edu  2009-11-28 21:21 -------
Testing...

Index: libgcc/config/t-slibgcc-darwin
===================================================================
--- libgcc/config/t-slibgcc-darwin      (revision 154730)
+++ libgcc/config/t-slibgcc-darwin      (working copy)
@@ -26,13 +26,8 @@
 SHLIB_MKMAP_OPTS = -v leading_underscore=1
 SHLIB_MAPFILES += $(gcc_srcdir)/libgcc-std.ver

-# we're only going to build the stubs if the target slib is /usr/lib
-# there is no other case in which they're useful in a live system.
-ifeq (/usr/lib,$(shlib_slibdir))
+# Must always build stubs so that FSF libgcc is used.
 LGCC_STUBS = libgcc_s.10.4.dylib libgcc_s.10.5.dylib
-else
-LGCC_STUBS =
-endif

 LGCC_FILES = libgcc_s.$(SHLIB_SOVERSION)$(SHLIB_EXT)
 LGCC_FILES += $(LGCC_STUBS)

against current gcc trunk.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42208


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/42208] gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib
  2009-11-28 19:43 [Bug target/42208] New: gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib howarth at nitro dot med dot uc dot edu
                   ` (4 preceding siblings ...)
  2009-11-28 21:21 ` howarth at nitro dot med dot uc dot edu
@ 2009-11-28 21:41 ` howarth at nitro dot med dot uc dot edu
  2009-12-23 14:10 ` howarth at nitro dot med dot uc dot edu
  6 siblings, 0 replies; 8+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2009-11-28 21:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from howarth at nitro dot med dot uc dot edu  2009-11-28 21:41 -------
Iain says this was intended behavior, but I'll rerun it past Mike Stump to make
certain that he fully understood this would happen (as he doesn't actually
build FSF gcc anymore).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42208


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug target/42208] gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib
  2009-11-28 19:43 [Bug target/42208] New: gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib howarth at nitro dot med dot uc dot edu
                   ` (5 preceding siblings ...)
  2009-11-28 21:41 ` howarth at nitro dot med dot uc dot edu
@ 2009-12-23 14:10 ` howarth at nitro dot med dot uc dot edu
  6 siblings, 0 replies; 8+ messages in thread
From: howarth at nitro dot med dot uc dot edu @ 2009-12-23 14:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from howarth at nitro dot med dot uc dot edu  2009-12-23 14:10 -------
Current behavior is correct.


-- 

howarth at nitro dot med dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42208


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-12-23 14:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-28 19:43 [Bug target/42208] New: gcc trunk incorrectly linking against /usr/lib/libgcc_s.1.dylib howarth at nitro dot med dot uc dot edu
2009-11-28 19:53 ` [Bug target/42208] " howarth at nitro dot med dot uc dot edu
2009-11-28 20:04 ` howarth at nitro dot med dot uc dot edu
2009-11-28 20:28 ` howarth at nitro dot med dot uc dot edu
2009-11-28 21:09 ` howarth at nitro dot med dot uc dot edu
2009-11-28 21:21 ` howarth at nitro dot med dot uc dot edu
2009-11-28 21:41 ` howarth at nitro dot med dot uc dot edu
2009-12-23 14:10 ` howarth at nitro dot med dot uc dot edu

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).