User account creation filtered due to spam.

Bug 15178 - [3.4/4.0 Regression] Solaris 9/x86 fails linking after stage 3
Summary: [3.4/4.0 Regression] Solaris 9/x86 fails linking after stage 3
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.0
: P1 critical
Target Milestone: 3.4.1
Assignee: Jakub Jelinek
URL:
Keywords: build, patch, wrong-code
Depends on:
Blocks:
 
Reported: 2004-04-27 20:05 UTC by Markus Doehr
Modified: 2004-09-13 14:15 UTC (History)
4 users (show)

See Also:
Host:
Target: i386-pc-solaris2.10
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-04-27 22:44:39


Attachments
pr15178.patch (506 bytes, patch)
2004-06-09 14:01 UTC, Jakub Jelinek
Details | Diff
pr15178.patch take 2 (508 bytes, patch)
2004-06-09 14:28 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Doehr 2004-04-27 20:05:11 UTC
mkdir .libs/libstdc++.lax/libsupc++convenience.a
(cd .libs/libstdc++.lax/libsupc++convenience.a && ar x
/home/doehrm/gcc-3.4.0/compile/i386-p
c-solaris2.9/libstdc++-v3/src/../libsupc++/.libs/libsupc++convenience.a)
/home/doehrm/gcc-3.4.0/compile/gcc/xgcc -shared-libgcc
-B/home/doehrm/gcc-3.4.0/compile/gcc/
 -nostdinc++
-L/home/doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3/src -L/home/do
ehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3/src/.libs
-B/opt/gcc34/i386-pc-solari
s2.9/bin/ -B/opt/gcc34/i386-pc-solaris2.9/lib/ -isystem
/opt/gcc34/i386-pc-solaris2.9/includ
e -isystem /opt/gcc34/i386-pc-solaris2.9/sys-include -shared -nostdlib 
/home/doehrm/gcc-3.4
.0/compile/gcc/crti.o /usr/ccs/lib/values-Xa.o
/home/doehrm/gcc-3.4.0/compile/gcc/crtbegin.o
  .libs/allocator.o .libs/codecvt.o .libs/complex_io.o .libs/ctype.o
.libs/debug.o .libs/deb
ug_list.o .libs/functexcept.o .libs/globals_locale.o .libs/globals_io.o
.libs/ios.o .libs/io
s_failure.o .libs/ios_init.o .libs/ios_locale.o .libs/limits.o .libs/list.o
.libs/locale.o .
libs/locale_init.o .libs/locale_facets.o .libs/localename.o .libs/stdexcept.o
.libs/strstrea
m.o .libs/tree.o .libs/allocator-inst.o .libs/concept-inst.o
.libs/fstream-inst.o .libs/ext-
inst.o .libs/io-inst.o .libs/istream-inst.o .libs/locale-inst.o
.libs/locale-misc-inst.o .li
bs/misc-inst.o .libs/ostream-inst.o .libs/sstream-inst.o .libs/streambuf-inst.o
.libs/string
-inst.o .libs/valarray-inst.o .libs/wlocale-inst.o .libs/wstring-inst.o
.libs/atomicity.o .l
ibs/codecvt_members.o .libs/collate_members.o .libs/ctype_members.o
.libs/messages_members.o
 .libs/monetary_members.o .libs/numeric_members.o .libs/time_members.o
.libs/basic_file.o .l
ibs/c++locale.o .libs/libstdc++.lax/libmath.a/stubs.o
.libs/libstdc++.lax/libmath.a/copysign
f.o .libs/libstdc++.lax/libmath.a/signbit.o
.libs/libstdc++.lax/libmath.a/signbitf.o  .libs/
libstdc++.lax/libsupc++convenience.a/del_op.o
.libs/libstdc++.lax/libsupc++convenience.a/del
_opnt.o .libs/libstdc++.lax/libsupc++convenience.a/del_opv.o
.libs/libstdc++.lax/libsupc++co
nvenience.a/del_opvnt.o .libs/libstdc++.lax/libsupc++convenience.a/eh_alloc.o
.libs/libstdc+
+.lax/libsupc++convenience.a/eh_aux_runtime.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_
catch.o .libs/libstdc++.lax/libsupc++convenience.a/eh_exception.o
.libs/libstdc++.lax/libsup
c++convenience.a/eh_globals.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_personality.o .l
ibs/libstdc++.lax/libsupc++convenience.a/eh_term_handler.o
.libs/libstdc++.lax/libsupc++conv
enience.a/eh_terminate.o .libs/libstdc++.lax/libsupc++convenience.a/eh_throw.o
.libs/libstdc
++.lax/libsupc++convenience.a/eh_type.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_unex_h
andler.o .libs/libstdc++.lax/libsupc++convenience.a/guard.o
.libs/libstdc++.lax/libsupc++con
venience.a/new_handler.o .libs/libstdc++.lax/libsupc++convenience.a/new_op.o
.libs/libstdc++
.lax/libsupc++convenience.a/new_opnt.o
.libs/libstdc++.lax/libsupc++convenience.a/new_opv.o 
.libs/libstdc++.lax/libsupc++convenience.a/new_opvnt.o
.libs/libstdc++.lax/libsupc++convenie
nce.a/pure.o .libs/libstdc++.lax/libsupc++convenience.a/tinfo.o
.libs/libstdc++.lax/libsupc+
+convenience.a/tinfo2.o .libs/libstdc++.lax/libsupc++convenience.a/vec.o
.libs/libstdc++.lax
/libsupc++convenience.a/vterminate.o
.libs/libstdc++.lax/libsupc++convenience.a/cp-demangle.
o   -L/home/doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3/src
-L/home/doehrm/gcc-
3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3/src/.libs -lm
../libmath/.libs/libmath.a -lm .
./libsupc++/.libs/libsupc++convenience.a -lm
-L/home/doehrm/gcc-3.4.0/compile/gcc -L/usr/ccs
/bin -L/usr/ccs/lib -lgcc_s -lgcc_s -lm -lgcc_s -lgcc_s   -lc
/home/doehrm/gcc-3.4.0/compile
/gcc/crtend.o /home/doehrm/gcc-3.4.0/compile/gcc/crtn.o  -Wl,-h
-Wl,libstdc++.so.6 -o .libs/
libstdc++.so.6.0.0
Textverschiebung beibehalten                    referenziert
    gegen Symbol                    Offset      in Datei
.LTHUNK12                           0xe         .libs/fstream-inst.o
.LTHUNK12                           0xe         .libs/sstream-inst.o
.LTHUNK13                           0xe         .libs/fstream-inst.o
.LTHUNK13                           0x1a        .libs/sstream-inst.o
.LTHUNK14                           0xe         .libs/fstream-inst.o
.LTHUNK14                           0xe         .libs/sstream-inst.o
.LTHUNK15                           0xe         .libs/fstream-inst.o
.LTHUNK15                           0x1a        .libs/sstream-inst.o
.LTHUNK17                           0x1a        .libs/fstream-inst.o
.LTHUNK17                           0x1a        .libs/sstream-inst.o
.LTHUNK21                           0x1a        .libs/fstream-inst.o
.LTHUNK21                           0x1a        .libs/sstream-inst.o
.LTHUNK22                           0xe         .libs/fstream-inst.o
.LTHUNK22                           0xe         .libs/sstream-inst.o
.LTHUNK23                           0x1a        .libs/fstream-inst.o
.LTHUNK23                           0x1a        .libs/sstream-inst.o
.LTHUNK0                            0xe         .libs/strstream.o
.LTHUNK0                            0xe         .libs/io-inst.o
.LTHUNK0                            0xe         .libs/fstream-inst.o
.LTHUNK0                            0xe         .libs/istream-inst.o
.LTHUNK0                            0xe         .libs/ostream-inst.o
.LTHUNK0                            0xe         .libs/sstream-inst.o
.LTHUNK2                            0xe         .libs/strstream.o
.LTHUNK2                            0xe         .libs/io-inst.o
.LTHUNK2                            0xe         .libs/fstream-inst.o
.LTHUNK2                            0xe         .libs/istream-inst.o
.LTHUNK2                            0xe         .libs/ostream-inst.o
.LTHUNK2                            0xe         .libs/sstream-inst.o
.LTHUNK4                            0xe         .libs/strstream.o
.LTHUNK4                            0xe         .libs/fstream-inst.o
.LTHUNK4                            0xe         .libs/io-inst.o
.LTHUNK4                            0xe         .libs/sstream-inst.o
.LTHUNK6                            0xe         .libs/strstream.o
.LTHUNK6                            0xe         .libs/fstream-inst.o
.LTHUNK6                            0xe         .libs/io-inst.o
.LTHUNK6                            0xe         .libs/sstream-inst.o
.LTHUNK7                            0xe         .libs/strstream.o
.LTHUNK7                            0xe         .libs/fstream-inst.o
.LTHUNK7                            0x1a        .libs/io-inst.o
.LTHUNK7                            0xe         .libs/sstream-inst.o
.LTHUNK8                            0xe         .libs/strstream.o
.LTHUNK8                            0xe         .libs/fstream-inst.o
.LTHUNK8                            0xe         .libs/sstream-inst.o
.LTHUNK9                            0x1a        .libs/strstream.o
.LTHUNK9                            0x1a        .libs/fstream-inst.o
.LTHUNK9                            0x1a        .libs/sstream-inst.o
.LTHUNK10                           0xe         .libs/strstream.o
.LTHUNK10                           0xe         .libs/fstream-inst.o
.LTHUNK10                           0xe         .libs/sstream-inst.o
.LTHUNK11                           0x1a        .libs/strstream.o
.LTHUNK11                           0x1a        .libs/fstream-inst.o
.LTHUNK11                           0x1a        .libs/sstream-inst.o
.LTHUNK3                            0x6         .libs/strstream.o
.LTHUNK3                            0x1a        .libs/io-inst.o
.LTHUNK3                            0x1a        .libs/fstream-inst.o
.LTHUNK3                            0xe         .libs/istream-inst.o
.LTHUNK3                            0xe         .libs/ostream-inst.o
.LTHUNK3                            0xe         .libs/sstream-inst.o
.LTHUNK5                            0xe         .libs/strstream.o
.LTHUNK5                            0xe         .libs/fstream-inst.o
.LTHUNK5                            0x1a        .libs/io-inst.o
.LTHUNK5                            0xe         .libs/sstream-inst.o
.LTHUNK19                           0x1a        .libs/fstream-inst.o
.LTHUNK19                           0x1a        .libs/sstream-inst.o
.LTHUNK16                           0xe         .libs/fstream-inst.o
.LTHUNK16                           0xe         .libs/sstream-inst.o
.LTHUNK20                           0xe         .libs/fstream-inst.o
.LTHUNK20                           0xe         .libs/sstream-inst.o
.LTHUNK1                            0x6         .libs/strstream.o
.LTHUNK1                            0x1a        .libs/io-inst.o
.LTHUNK1                            0x1a        .libs/fstream-inst.o
.LTHUNK1                            0xe         .libs/istream-inst.o
.LTHUNK1                            0xe         .libs/ostream-inst.o
.LTHUNK1                            0xe         .libs/sstream-inst.o
.LTHUNK18                           0xe         .libs/fstream-inst.o
.LTHUNK18                           0xe         .libs/sstream-inst.o
ld: Schwerer Fehler: Verschiebungen verbleiben gegen zuweisbare, aber
nicht-schreibbare Bere
iche
collect2: ld returned 1 exit status
gmake[4]: *** [libstdc++.la] Error 1
gmake[4]: Leaving directory
`/home/doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3/
src'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory
`/home/doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3'
gmake[2]: *** [all] Error 2


doehrm@penelope ~/gcc-3.4.0/compile>uname -a
SunOS penelope 5.9 Generic_112234-12 i86pc i386 i86pc

I used

doehrm@penelope ~/gcc-3.4.0/compile>cc -V
cc: Sun WorkShop 6 update 2 C 5.3 Patch 111680-09 2003/05/18
usage: cc [ options] files.  Use 'cc -flags' for details

to bootstrap the compiler.

The configuration was done using

../configure --prefix=/opt/gcc34 --enable-shared --enable-languages=c,c++
Comment 1 Andrew Pinski 2004-04-27 20:56:20 UTC
LTHUNK cannot be produced by GCC, are you sure that you are bootstrapping?
Also are you using the native as or GNU binutils's as?
Also did you follow <http://gcc.gnu.org/install/specific.html#*-*-solaris2*>?
Comment 2 Markus Doehr 2004-04-27 21:40:07 UTC
I have done this very often with Forte 6U2 on other systems but never on Solaris 9.

Ok, starting from scratch...

doehrm@penelope ~>echo $PATH
/usr/ccs/bin:/opt/gnu/bin:/opt/SUNWspro/bin:/usr/bin:/etc:.

doehrm@penelope ~>which ld
/usr/ccs/bin/ld

doehrm@penelope ~>cc -V
cc: Sun WorkShop 6 update 2 C 5.3 Patch 111680-09 2003/05/18
usage: cc [ options] files.  Use 'cc -flags' for details

doehrm@penelope ~>cd gcc-3.4.0
doehrm@penelope ~/gcc-3.4.0>cd compile
doehrm@penelope ~/gcc-3.4.0/compile>rm -rf *
doehrm@penelope ~/gcc-3.4.0/compile>/export/home/doehrm/gcc-3.4.0/configure
--prefix=/opt/gcc34 --enable-shared --enable-languages=c,c++

[...]
checking whether to enable maintainer-specific portions of Makefiles... no
updating cache ./config.cache
creating ./config.status
creating Makefile
doehrm@penelope ~/gcc-3.4.0/compile>gmake bootstrap

[...]
****after stage-2****
checking for /home/doehrm/gcc-3.4.0/compile/gcc/xgcc option to produce PIC...
-fPIC -DPIC
checking if /home/doehrm/gcc-3.4.0/compile/gcc/xgcc PIC flag -fPIC -DPIC
works... yes
checking if /home/doehrm/gcc-3.4.0/compile/gcc/xgcc static flag -static works... yes
finding the maximum length of command line arguments... 393217
checking if /home/doehrm/gcc-3.4.0/compile/gcc/xgcc supports -c -o file.o... yes
[...]
****compiling libstdc++*****
/bin/sh ../libtool --tag CXX --mode=link /home/doehrm/gcc-3.4.0/compile/gcc/xgcc
-shared-libgcc -B/home/doehrm/gc
c-3.4.0/compile/gcc/ -nostdinc++
-L/home/doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3/src -L/home/doe
hrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3/src/.libs
-B/opt/gcc34/i386-pc-solaris2.9/bin/ -B/opt/gcc34
/i386-pc-solaris2.9/lib/ -isystem /opt/gcc34/i386-pc-solaris2.9/include -isystem
/opt/gcc34/i386-pc-solaris2.9/sy
s-include   -fno-implicit-templates -Wall -W -Wwrite-strings -Wcast-qual 
-fdiagnostics-show-location=once  -ffun
ction-sections -fdata-sections   -o libstdc++.la -rpath /opt/gcc34/lib
-version-info 6:0:0  -lm  allocator.lo cod
ecvt.lo complex_io.lo ctype.lo debug.lo debug_list.lo functexcept.lo
globals_locale.lo globals_io.lo ios.lo ios_f
ailure.lo ios_init.lo ios_locale.lo limits.lo list.lo locale.lo locale_init.lo
locale_facets.lo localename.lo std
except.lo strstream.lo tree.lo allocator-inst.lo concept-inst.lo fstream-inst.lo
ext-inst.lo io-inst.lo istream-i
nst.lo locale-inst.lo locale-misc-inst.lo misc-inst.lo ostream-inst.lo
sstream-inst.lo streambuf-inst.lo string-i
nst.lo valarray-inst.lo wlocale-inst.lo wstring-inst.lo atomicity.lo
codecvt_members.lo collate_members.lo ctype_
members.lo messages_members.lo monetary_members.lo numeric_members.lo
time_members.lo basic_file.lo c++locale.lo 
../libmath/libmath.la ../libsupc++/libsupc++convenience.la -lm 
rm -fr .libs/libstdc++.lax
mkdir .libs/libstdc++.lax
rm -fr .libs/libstdc++.lax/libmath.a
mkdir .libs/libstdc++.lax/libmath.a
(cd .libs/libstdc++.lax/libmath.a && ar x
/home/doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3/src/../l
ibmath/.libs/libmath.a)
rm -fr .libs/libstdc++.lax/libsupc++convenience.a
mkdir .libs/libstdc++.lax/libsupc++convenience.a
(cd .libs/libstdc++.lax/libsupc++convenience.a && ar x
/home/doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc+
+-v3/src/../libsupc++/.libs/libsupc++convenience.a)
/home/doehrm/gcc-3.4.0/compile/gcc/xgcc -shared-libgcc
-B/home/doehrm/gcc-3.4.0/compile/gcc/ -nostdinc++ -L/home/
doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3/src
-L/home/doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/
libstdc++-v3/src/.libs -B/opt/gcc34/i386-pc-solaris2.9/bin/
-B/opt/gcc34/i386-pc-solaris2.9/lib/ -isystem /opt/gc
c34/i386-pc-solaris2.9/include -isystem
/opt/gcc34/i386-pc-solaris2.9/sys-include -shared -nostdlib  /home/doehrm
/gcc-3.4.0/compile/gcc/crti.o /usr/ccs/lib/values-Xa.o
/home/doehrm/gcc-3.4.0/compile/gcc/crtbegin.o  .libs/alloc
ator.o .libs/codecvt.o .libs/complex_io.o .libs/ctype.o .libs/debug.o
.libs/debug_list.o .libs/functexcept.o .lib
s/globals_locale.o .libs/globals_io.o .libs/ios.o .libs/ios_failure.o
.libs/ios_init.o .libs/ios_locale.o .libs/l
imits.o .libs/list.o .libs/locale.o .libs/locale_init.o .libs/locale_facets.o
.libs/localename.o .libs/stdexcept.
o .libs/strstream.o .libs/tree.o .libs/allocator-inst.o .libs/concept-inst.o
.libs/fstream-inst.o .libs/ext-inst.
o .libs/io-inst.o .libs/istream-inst.o .libs/locale-inst.o
.libs/locale-misc-inst.o .libs/misc-inst.o .libs/ostre
am-inst.o .libs/sstream-inst.o .libs/streambuf-inst.o .libs/string-inst.o
.libs/valarray-inst.o .libs/wlocale-ins
t.o .libs/wstring-inst.o .libs/atomicity.o .libs/codecvt_members.o
.libs/collate_members.o .libs/ctype_members.o 
.libs/messages_members.o .libs/monetary_members.o .libs/numeric_members.o
.libs/time_members.o .libs/basic_file.o
 .libs/c++locale.o .libs/libstdc++.lax/libmath.a/stubs.o
.libs/libstdc++.lax/libmath.a/copysignf.o .libs/libstdc+
+.lax/libmath.a/signbit.o .libs/libstdc++.lax/libmath.a/signbitf.o 
.libs/libstdc++.lax/libsupc++convenience.a/de
l_op.o .libs/libstdc++.lax/libsupc++convenience.a/del_opnt.o
.libs/libstdc++.lax/libsupc++convenience.a/del_opv.o
 .libs/libstdc++.lax/libsupc++convenience.a/del_opvnt.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_alloc.o .li
bs/libstdc++.lax/libsupc++convenience.a/eh_aux_runtime.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_catch.o .l
ibs/libstdc++.lax/libsupc++convenience.a/eh_exception.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_globals.o .
libs/libstdc++.lax/libsupc++convenience.a/eh_personality.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_term_han
dler.o .libs/libstdc++.lax/libsupc++convenience.a/eh_terminate.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_th
row.o .libs/libstdc++.lax/libsupc++convenience.a/eh_type.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_unex_han
dler.o .libs/libstdc++.lax/libsupc++convenience.a/guard.o
.libs/libstdc++.lax/libsupc++convenience.a/new_handler.
o .libs/libstdc++.lax/libsupc++convenience.a/new_op.o
.libs/libstdc++.lax/libsupc++convenience.a/new_opnt.o .libs
/libstdc++.lax/libsupc++convenience.a/new_opv.o
.libs/libstdc++.lax/libsupc++convenience.a/new_opvnt.o .libs/libs
tdc++.lax/libsupc++convenience.a/pure.o
.libs/libstdc++.lax/libsupc++convenience.a/tinfo.o .libs/libstdc++.lax/li
bsupc++convenience.a/tinfo2.o .libs/libstdc++.lax/libsupc++convenience.a/vec.o
.libs/libstdc++.lax/libsupc++conve
nience.a/vterminate.o .libs/libstdc++.lax/libsupc++convenience.a/cp-demangle.o 
 -L/home/doehrm/gcc-3.4.0/compile
/i386-pc-solaris2.9/libstdc++-v3/src
-L/home/doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3/src/.libs -
lm ../libmath/.libs/libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm
-L/home/doehrm/gcc-3.4.0/compile/
gcc -L/usr/ccs/bin -L/usr/ccs/lib -lgcc_s -lgcc_s -lm -lgcc_s -lgcc_s   -lc
/home/doehrm/gcc-3.4.0/compile/gcc/cr
tend.o /home/doehrm/gcc-3.4.0/compile/gcc/crtn.o  -Wl,-h -Wl,libstdc++.so.6 -o
.libs/libstdc++.so.6.0.0
Textverschiebung beibehalten                    referenziert
    gegen Symbol                    Offset      in Datei
.LTHUNK12                           0xe         .libs/fstream-inst.o
.LTHUNK12                           0xe         .libs/sstream-inst.o
.LTHUNK13                           0xe         .libs/fstream-inst.o
.LTHUNK13                           0x1a        .libs/sstream-inst.o
.LTHUNK14                           0xe         .libs/fstream-inst.o
.LTHUNK14                           0xe         .libs/sstream-inst.o
.LTHUNK15                           0xe         .libs/fstream-inst.o
.LTHUNK15                           0x1a        .libs/sstream-inst.o
.LTHUNK17                           0x1a        .libs/fstream-inst.o
.LTHUNK17                           0x1a        .libs/sstream-inst.o
.LTHUNK21                           0x1a        .libs/fstream-inst.o
.LTHUNK21                           0x1a        .libs/sstream-inst.o
.LTHUNK22                           0xe         .libs/fstream-inst.o
.LTHUNK22                           0xe         .libs/sstream-inst.o
.LTHUNK23                           0x1a        .libs/fstream-inst.o
.LTHUNK23                           0x1a        .libs/sstream-inst.o
.LTHUNK0                            0xe         .libs/strstream.o
.LTHUNK0                            0xe         .libs/io-inst.o
.LTHUNK0                            0xe         .libs/fstream-inst.o
.LTHUNK0                            0xe         .libs/istream-inst.o
.LTHUNK0                            0xe         .libs/ostream-inst.o
.LTHUNK0                            0xe         .libs/sstream-inst.o
.LTHUNK2                            0xe         .libs/strstream.o
.LTHUNK2                            0xe         .libs/io-inst.o
.LTHUNK2                            0xe         .libs/fstream-inst.o
.LTHUNK2                            0xe         .libs/istream-inst.o
.LTHUNK2                            0xe         .libs/ostream-inst.o
.LTHUNK2                            0xe         .libs/sstream-inst.o
.LTHUNK4                            0xe         .libs/strstream.o
.LTHUNK4                            0xe         .libs/fstream-inst.o
.LTHUNK4                            0xe         .libs/io-inst.o
.LTHUNK4                            0xe         .libs/sstream-inst.o
.LTHUNK6                            0xe         .libs/strstream.o
.LTHUNK6                            0xe         .libs/fstream-inst.o
.LTHUNK6                            0xe         .libs/io-inst.o
.LTHUNK6                            0xe         .libs/sstream-inst.o
.LTHUNK7                            0xe         .libs/strstream.o
.LTHUNK7                            0xe         .libs/fstream-inst.o
.LTHUNK7                            0x1a        .libs/io-inst.o
.LTHUNK7                            0xe         .libs/sstream-inst.o
.LTHUNK8                            0xe         .libs/strstream.o
.LTHUNK8                            0xe         .libs/fstream-inst.o
.LTHUNK8                            0xe         .libs/sstream-inst.o
.LTHUNK9                            0x1a        .libs/strstream.o
.LTHUNK9                            0x1a        .libs/fstream-inst.o
.LTHUNK9                            0x1a        .libs/sstream-inst.o
.LTHUNK10                           0xe         .libs/strstream.o
.LTHUNK10                           0xe         .libs/fstream-inst.o
.LTHUNK10                           0xe         .libs/sstream-inst.o
.LTHUNK11                           0x1a        .libs/strstream.o
.LTHUNK11                           0x1a        .libs/fstream-inst.o
.LTHUNK11                           0x1a        .libs/sstream-inst.o
.LTHUNK3                            0x6         .libs/strstream.o
.LTHUNK3                            0x1a        .libs/io-inst.o
.LTHUNK3                            0x1a        .libs/fstream-inst.o
.LTHUNK3                            0xe         .libs/istream-inst.o
.LTHUNK3                            0xe         .libs/ostream-inst.o
.LTHUNK3                            0xe         .libs/sstream-inst.o
.LTHUNK5                            0xe         .libs/strstream.o
.LTHUNK5                            0xe         .libs/fstream-inst.o
.LTHUNK5                            0x1a        .libs/io-inst.o
.LTHUNK5                            0xe         .libs/sstream-inst.o
.LTHUNK19                           0x1a        .libs/fstream-inst.o
.LTHUNK19                           0x1a        .libs/sstream-inst.o
.LTHUNK16                           0xe         .libs/fstream-inst.o
.LTHUNK16                           0xe         .libs/sstream-inst.o
.LTHUNK20                           0xe         .libs/fstream-inst.o
.LTHUNK20                           0xe         .libs/sstream-inst.o
.LTHUNK1                            0x6         .libs/strstream.o
.LTHUNK1                            0x1a        .libs/io-inst.o
.LTHUNK1                            0x1a        .libs/fstream-inst.o
.LTHUNK1                            0xe         .libs/istream-inst.o
.LTHUNK1                            0xe         .libs/ostream-inst.o
.LTHUNK1                            0xe         .libs/sstream-inst.o
.LTHUNK18                           0xe         .libs/fstream-inst.o
.LTHUNK18                           0xe         .libs/sstream-inst.o
ld: Schwerer Fehler: Verschiebungen verbleiben gegen zuweisbare, aber
nicht-schreibbare Bereiche
collect2: ld returned 1 exit status
gmake[4]: *** [libstdc++.la] Error 1
gmake[4]: Leaving directory
`/home/doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3/src'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory
`/home/doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory
`/home/doehrm/gcc-3.4.0/compile/i386-pc-solaris2.9/libstdc++-v3'
gmake[1]: *** [all-target-libstdc++-v3] Error 2
gmake[1]: Leaving directory `/home/doehrm/gcc-3.4.0/compile'
gmake: *** [bootstrap] Error 2


So it seems that bootstrapping with native compiler on Solaris 9/x86 does not
work...
Comment 3 Rainer Orth 2004-04-27 22:11:35 UTC
Subject: Re:  New: Solaris 9/x86 fails linking after stage 3

I've observed the same problem both on Solaris 10/x86 (always) and on
Solaris 9/x86 with assembler patch 115114-01 installed.  A minimal testcase
is

	.weak	_weakfunc
_weakfunc:
	.set	.LTHUNK0,_weakfunc
_func:
	jmp	.LTHUNK0

With the old 7.0 (i.e. pre-patch) assembler, one gets no text relocations,
with the 7.1 one (Solaris 9 patch and Solaris 10), elfdump -r reports:

Relocation: .rel.text
        type                       offset              section   with respect to
        R_386_PC32                       0x1             .rel.text      .LTHUNK0  

I've opened Bug Id 4950651 for this issue, but the bug was closed claiming
this was expected behavior (and necessary to fix another bug, Id 4818485).

The suggested fix was to add

	.local  .LTHUNK0

to the testcase.

While this fixes the testcase, I don't know if this is correct for g++ in
general (and haven't tried to implement this for real).  Anyway, this is a
change from GCC 3.3 to 3.4, i.e. the 3.3 branch used to bootstrap correctly
even with the new assembler.

	Rainer
Comment 4 Andrew Pinski 2004-04-27 22:44:38 UTC
Thanks Rainer Orth for the explaination.
Comment 5 Rainer Orth 2004-04-27 22:55:03 UTC
Subject: Re:  [3.4/3.5 Regression] Solaris 9/x86 fails linking after stage 3

This LTHUNK stuff was introduced by this patch:

	http://gcc.gnu.org/ml/gcc-patches/2003-06/msg02603.html

Maybe Jakub can have a look.

	Rainer
Comment 6 Andreas M. Kirchwitz 2004-05-18 15:27:12 UTC
I've stumbled across the same problem here on a new
Sun Fire V20z with Solaris 9 4/04 (entire distribution).
Instead of using SUN's cc, I used the pre-built gcc 3.4.0
(including required libiconv) from www.sunfreeware.com
to build my own gcc 3.4.0 (honouring all installation
instructions).

While some people suggested to install GNU binutils (as, ld),
neither version 2.14 nor 2.15 compiles successfully. Bad luck,
but I haven't done further investigation on this new issue
because I'd prefer to get it to work with /usr/ccs/bin/{as,ld}
anyway. ;-)

What I'm really wondering about is how the guys on
www.sunfreeware.com did the build.
http://www.sunfreeware.com/gcc.html cannot be accurate,
because calling "configure" with a relative path no longer
works in GCC 3.4.0 and without the fixes in "libffi/configure"
(ac_cv_header_sys_mman_h, ac_cv_func_mmap) it won't compile
in standard configuration.

Still wondering ... ;-)

Greetings, Andreas
Comment 7 Markus Doehr 2004-05-18 15:34:28 UTC
even more confusing is:

gnu@sapdb ~>gcc -v
Lese Spezifikationen von /opt/gcc34/lib/gcc/i386-pc-solaris2.8/3.4.0/specs
Konfiguriert mit: ../configure --enable-shared --enable-languages=c,c++ --prefix
=/opt/gcc34 --with-threads=posix
Thread-Modell: posix
gcc-Version 3.4.0

gnu@sapdb ~>uname -a
SunOS sapdb 5.8 Generic_117001-03 i86pc i386 i86pc

bootstrapped with same cc as originally reported...
Comment 8 Rainer Orth 2004-05-18 16:25:09 UTC
Subject: Re:  [3.4/3.5 Regression] Solaris 9/x86 fails linking after stage 3

amk at krell dot zikzak dot de writes:

> I've stumbled across the same problem here on a new
> Sun Fire V20z with Solaris 9 4/04 (entire distribution).
> Instead of using SUN's cc, I used the pre-built gcc 3.4.0
> (including required libiconv) from www.sunfreeware.com
> to build my own gcc 3.4.0 (honouring all installation
> instructions).

I suppose the www.sunfreeware.com guys did the build on Solaris 9/x86
without the assembler patch 115114-01: this introduced as 7.1, compared to
as 7.0 as distributed with Solaris 9 FCS.  It may be (but I've not checked)
that some S9 update integrated that patch.  This is also currently my
workaround for this problem: keep a copy of as 7.0 around and use that one.

> While some people suggested to install GNU binutils (as, ld),
> neither version 2.14 nor 2.15 compiles successfully. Bad luck,
> but I haven't done further investigation on this new issue
> because I'd prefer to get it to work with /usr/ccs/bin/{as,ld}
> anyway. ;-)

Same here, although I have been able to build binutils 2.14 and 2.15 on
Solaris 10/x86 without problems.

	Rainer
Comment 9 Rainer Orth 2004-05-18 16:29:00 UTC
Subject: Re:  [3.4/3.5 Regression] Solaris 9/x86 fails linking after stage 3

markus dot doehr at siegenia-aubi dot com writes:

> even more confusing is:
> 
> gnu@sapdb ~>gcc -v
> Lese Spezifikationen von /opt/gcc34/lib/gcc/i386-pc-solaris2.8/3.4.0/specs
> Konfiguriert mit: ../configure --enable-shared --enable-languages=c,c++ --prefix
> =/opt/gcc34 --with-threads=posix
> Thread-Modell: posix
> gcc-Version 3.4.0
> 
> gnu@sapdb ~>uname -a
> SunOS sapdb 5.8 Generic_117001-03 i86pc i386 i86pc
> 
> bootstrapped with same cc as originally reported...

What do you find confusing about this one?  AFAIK there is no issue on
Solaris 8/x86, only Solaris 9/x86 patch 115114-01 introduced the change
which broke gcc bootstrap, together with Jakub's patch identified in
Comment #5.

	Rainer
Comment 10 Mark Mitchell 2004-05-28 22:03:13 UTC
Jakub --

Since your patch seems to the culprit, please assign this patch to yourself and
develop a fix.

Thanks,

-- Mark
Comment 11 Jakub Jelinek 2004-05-28 22:18:08 UTC
I'll look into this after the Summit.
Comment 12 Jakub Jelinek 2004-06-09 14:01:00 UTC
Created attachment 6502 [details]
pr15178.patch

I have nowhere to test this.
Can anyone with access to Solaris/x86 please give this a shot?
Comment 13 Markus Doehr 2004-06-09 14:22:36 UTC
I tried this but unfortunately it's giving me syntax errors:

that's what I have in sol2.h


/* The Solaris assembler does not support .quad.  Do not use it.  */
#undef ASM_QUAD

/* The Solaris assembler wants a .local for non-exported aliases. */
#define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET)   \
  do {                                                  \
    const char *declname =                              \
      IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL))); \
    ASM_OUTPUT_DEF ((FILE), declname,                   \
                    IDENTIFIER_POINTER (TARGET));       \
    if (! TREE_PUBLIC (DECL))                           \
      {                                                 \
        fprintf ((FILE), "%s", LOCAL_ASM_OP);           \
        assemble_name ((FILE), declname);               \
        fprintf ((FILE), "\n");                         \
     }
  } while (0)


This is the output:

cc -c   -g  -DIN_GCC     -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -I.
-I/export/home/doehrm/gcc-3.4.0/gcc -I/export/home/doehrm/gcc-
3.4.0/gcc/. -I/export/home/doehrm/gcc-3.4.0/gcc/../include -I../intl
/export/home/doehrm/gcc-3.4.0/gcc/genconstants.c -o genconstan
ts.o
"/export/home/doehrm/gcc-3.4.0/gcc/system.h", line 537: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/config/i386/sol2.h", line 81: syntax error
before or at: }
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 1070: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 1518: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 1601: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 1648: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 1667: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 1671: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 1723: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 1734: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 1735: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 2127: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 2169: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 2206: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 2236: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 2304: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/rtl.h", line 2333: warning: _Bool is a
keyword in ISO C99
"/export/home/doehrm/gcc-3.4.0/gcc/genconstants.c", line 50: cannot recover from
previous errors
cc: acomp failed for /export/home/doehrm/gcc-3.4.0/gcc/genconstants.c
gmake[3]: *** [genconstants.o] Error 2
gmake[3]: Leaving directory `/home/doehrm/gcc-3.4.0/compile/gcc'
gmake[2]: *** [stage1_build] Error 2
gmake[2]: Leaving directory `/home/doehrm/gcc-3.4.0/compile/gcc'
gmake[1]: *** [restrap] Error 2
gmake[1]: Leaving directory `/home/doehrm/gcc-3.4.0/compile/gcc'
gmake: *** [restrap] Error 2

Line 81 is the last line.
Comment 14 Rainer Orth 2004-06-09 14:26:50 UTC
Subject: Re:  [3.4/3.5 Regression] Solaris 9/x86 fails linking after stage 3

markus dot doehr at siegenia-aubi dot com writes:

> I tried this but unfortunately it's giving me syntax errors:

there are two, both trivial to fix:

> /* The Solaris assembler wants a .local for non-exported aliases. */
> #define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET)   \
>   do {                                                  \
>     const char *declname =                              \
>       IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL))); \
						      ^ superfluous paren
>     ASM_OUTPUT_DEF ((FILE), declname,                   \
>                     IDENTIFIER_POINTER (TARGET));       \
>     if (! TREE_PUBLIC (DECL))                           \
>       {                                                 \
>         fprintf ((FILE), "%s", LOCAL_ASM_OP);           \
>         assemble_name ((FILE), declname);               \
>         fprintf ((FILE), "\n");                         \
>      }
						          ^ missing \
>   } while (0)

with those changes, bootstrap on i386-pc-solaris2.10 with native (7.1
based) as is under way.

	Rainer
Comment 15 Jakub Jelinek 2004-06-09 14:28:19 UTC
Created attachment 6503 [details]
pr15178.patch take 2

Oops, 2 typos.
Comment 16 Markus Doehr 2004-06-09 14:55:03 UTC
worksforme:

doehrm@penelope ~/gcc-3.4.0/compile>gcc -v
Lese Spezifikationen von /opt/gcc34/lib/gcc/i386-pc-solaris2.9/3.4.0/specs
Konfiguriert mit: /export/home/doehrm/gcc-3.4.0/configure --prefix=/opt/gcc34
--enable-languages=c,c++ --with-threads=posix --enabl
e-threads=posix --enable-shared
Thread-Modell: posix
gcc-Version 3.4.0

doehrm@penelope ~/gcc-3.4.0/compile>as -V
as: Sun Compiler Common 9.0 Patch 115114-02 2004/02/09

thanx :-)
Comment 17 Andrew Pinski 2004-06-09 17:59:03 UTC
Reopening as this is not fixed yet.
Comment 18 Andrew Pinski 2004-06-09 17:59:47 UTC
Patch submitted here: <http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00529.html>.
Comment 19 Rainer Orth 2004-06-09 19:16:05 UTC
Subject: Re:  [3.4/3.5 Regression] Solaris 9/x86 fails linking after stage 3

jakub at gcc dot gnu dot org writes:

> I have nowhere to test this.
> Can anyone with access to Solaris/x86 please give this a shot?

with that patch, i386-pc-solaris2.10 bootstraps on mainline and 3.4 branch
finished successfully with the native as, while before they failed unless
using a copy of as 7.0:

	http://gcc.gnu.org/ml/gcc-testresults/2004-06/msg00355.html
	http://gcc.gnu.org/ml/gcc-testresults/2004-06/msg00356.html

Since this fixes bootstrap failures on recent versions of Solaris 9/x86
(with the relevant as patch) and Solaris 10/x86 and thus is a regression
from the 3.3 branch, it should go onto the 3.4 branch, too.

Thanks.
	Rainer
Comment 20 Mark Mitchell 2004-06-12 22:18:05 UTC
This patch is OK for mainline and 3.4.1.
Comment 21 CVS Commits 2004-06-14 17:31:33 UTC
Subject: Bug 15178

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jakub@gcc.gnu.org	2004-06-14 17:31:28

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: sol2.h 

Log message:
	PR target/15178
	* config/i386/sol2.h (ASM_OUTPUT_DEF_FROM_DECLS): Define.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3961&r2=2.3962
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/sol2.h.diff?cvsroot=gcc&r1=1.28&r2=1.29

Comment 22 CVS Commits 2004-06-14 17:34:21 UTC
Subject: Bug 15178

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	jakub@gcc.gnu.org	2004-06-14 17:34:12

Modified files:
	gcc            : ChangeLog 
	gcc/config/i386: sol2.h 

Log message:
	PR target/15178
	* config/i386/sol2.h (ASM_OUTPUT_DEF_FROM_DECLS): Define.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.501&r2=2.2326.2.502
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/sol2.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.28&r2=1.28.10.1

Comment 23 Andrew Pinski 2004-06-14 19:23:01 UTC
Fixed.