This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Built gcc 4.0.0, without C++ support


Joseph S. Myers:

> On Sat, 23 Apr 2005, Jeroen Scheerder wrote:
> 
> > Note that builds on Solaris 10 on AMD Opteron (on a Sun Fire V20z) failed
> > miserably.  With the Sun-supplied as and ld, bootstraps chokes on syntax
> > errors in assembly files; with GNU as and ld, bootstrap chockes on
> > invalid instructions (64-bit AMD instructions not handled by as?).
> 
> I recommend using GNU as and Sun ld.  /usr/sfw/bin/as should be a suitable 
> version of the GNU assembler, or try the 2.15.97 binutils snapshot (from 
> ftp://gcc.gnu.org/pub/binutils/snapshots/) for an assembler which should 
> also be sufficiently recent (soon to be released as 2.16); I don't know if 
> the 2.15 release is recent enough.  The version of GCC distributed in 
> /usr/sfw/bin is configured with
> 
> --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld 
> --without-gnu-ld --enable-languages=c,c++ --enable-shared
> 
> which should be a configuration which works for 4.0.0 and mainline, as 
> well as for csl-sol210-3_4-branch from which /usr/sfw/bin/gcc comes.

Partial success only.  I think I'll be able to build it without C++
support, but compilation per your instruction does choke on libstdc++.so.6.0.4.

This is how I configured/compiled it:

$ which as; as --version
/phil/sw/sunos/i386/bin/as
GNU assembler 2.15.97 20050420
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `i386-pc-solaris2.10'.
$ /phil/sw/src/gcc-4.0.0/configure \
        --prefix=/phil/sw/sunos/i386/pkg/gcc-4.0.0 \
        --disable-libgcj \
        --enable-languages=c,c++,objc \
        --with-gnu-as \
        --with-as=/phil/sw/sunos/i386/bin/as \
        --without-gnu-ld \
        --with-ld=/usr/ccs/bin/ld \
        --enable-shared
$ make -sj3 CFLAGS='-O' LIBCFLAGS='-g -O2' \
            LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
[...]
Building runtime libraries
config.status: creating config.h
config.status: config.h is unchanged
Checking multilib configuration...
multilib.out is unchanged
Making all in include
Making all in libsupc++
Making all in libmath
Making all in src
rm -fr  .libs/libstdc++.lax
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 /phil/sw/sunos/i386/obj/gcc-4.0.0/i386-pc-solaris2.10/libstdc++-v3/src/../libmath/.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 /phil/sw/sunos/i386/obj/gcc-4.0.0/i386-pc-solaris2.10/libstdc++-v3/src/../libsupc++/.libs/libsupc++convenience.a)
/phil/sw/sunos/i386/obj/gcc-4.0.0/gcc/xgcc -shared-libgcc -B/phil/sw/sunos/i386/obj/gcc-4.0.0/gcc/ -nostdinc++ -L/phil/sw/sunos/i386/obj/gcc-4.0.0/i386-pc-solaris2.10/libstdc++-v3/src -L/phil/sw/sunos/i386/obj/gcc-4.0.0/i386-pc-solaris2.10/libstdc++-v3/src/.libs -B/phil/sw/sunos/i386/pkg/gcc-4.0.0/i386-pc-solaris2.10/bin/ -B/phil/sw/sunos/i386/pkg/gcc-4.0.0/i386-pc-solaris2.10/lib/ -isystem /phil/sw/sunos/i386/pkg/gcc-4.0.0/i386-pc-solaris2.10/include -isystem /phil/sw/sunos/i386/pkg/gcc-4.0.0/i386-pc-solaris2.10/sys-include -shared -nostdlib  /usr/lib/crti.o /usr/lib/values-Xa.o /phil/sw/sunos/i386/obj/gcc-4.0.0/gcc/crtbegin.o  .libs/bitmap_allocator.o .libs/pool_allocator.o .libs/mt_allocator.o .libs/codecvt.o .libs/complex_io.o .libs/ctype.o .libs/debug.o .libs/debug_list.o .libs/functexcept.o .libs/globals_locale.o .libs/globals_io.o .libs/ios.o .libs/ios_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/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/istream.o .libs/locale-inst.o .libs/locale-misc-inst.o .libs/misc-inst.o .libs/ostream-inst.o .libs/sstream-inst.o .libs/streambuf-inst.o .libs/streambuf.o .libs/string-inst.o .libs/valarray-inst.o .libs/wlocale-inst.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/signbit.o .libs/libstdc++.lax/libmath.a/signbitf.o .libs/libstdc++.lax/libmath.a/signbitl.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++convenience.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/libsupc++convenience.a/eh_globals.o .libs/libstdc++.lax/libsupc++convenience.a/eh_personality.o .libs/libstdc++.lax/libsupc++convenience.a/eh_term_handler.o .libs/libstdc++.lax/libsupc++convenience.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_handler.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/libstdc++.lax/libsupc++convenience.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/phil/sw/sunos/i386/obj/gcc-4.0.0/i386-pc-solaris2.10/libstdc++-v3/src -L/phil/sw/sunos/i386/obj/gcc-4.0.0/i386-pc-solaris2.10/libstdc++-v3/src/.libs -lm ../libmath/.libs/libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm -L/phil/sw/sunos/i386/obj/gcc-4.0.0/gcc -L/usr/ccs/bin -lgcc_s -lgcc_s -lm -lgcc_s -lgcc_s   -lc /phil/sw/sunos/i386/obj/gcc-4.0.0/gcc/crtend.o /usr/lib/crtn.o  -Wl,-h -Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.4
ld: fatal: relocation error: file: .libs/stdexcept.o section: .rel.debug_info symbol: : relocation against a discarded symbol,
        symbol is part of discarded section: .gnu.linkonce.t._ZNSt12out_of_rangeD0Ev
collect2: ld returned 1 exit status
make[4]: *** [libstdc++.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libstdc++-v3] Error 2
make: *** [bootstrap] Error 2

I also get warnings when using Sun's ld:

configure: WARNING: === You have requested some kind of symbol versioning, but
configure: WARNING: === either you are not using a supported linker, or you are
configure: WARNING: === not building a shared libgcc_s (which is required).
configure: WARNING: === Symbol versioning will be disabled.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]