This is the mail archive of the gcc-patches@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: Always link against static libgcc on hppa-linux


> Thus we force the user to use either "g++ -shared" or
> "gcc -shared -shared-libgcc" to get at the EH routines
> when creating a shared library.

This brings me back to my original problem.  This is the link for the shared
libstdc++ on hppa-linux:

/bin/sh ../libtool --tag CXX --mode=link /home/dave/gcc-3.1/objdir/gcc/xgcc -B/home/dave/gcc-3.1/objdir/gcc/ -nostdinc++  -L/home/dave/gcc-3.1/objdir/hppa-linux/libstdc++-v3/src -L/home/dave/gcc-3.1/objdir/hppa-linux/libstdc++-v3/src/.libs -B/home/dave/opt/gnu/hppa-linux/bin/ -B/home/dave/opt/gnu/hppa-linux/lib/ -isystem /home/dave/opt/gnu/hppa-linux/include -fno-implicit-templates  -Wall -Wno-format -W -Wwrite-strings -Winline  -fdiagnostics-show-location=once  -ffunction-sections -fdata-sections  -g    -o libstdc++.la -rpath /home/dave/opt/gnu/lib -version-info 4:0:0 -lm  globals.lo limits.lo basic_file.lo complex_io.lo ios.lo strstream.lo cmath.lo bitset.lo functexcept.lo stdexcept.lo vterminate.lo c++locale.lo locale.lo localename.lo codecvt.lo collate.lo ctype.lo messages.lo moneypunct.lo numpunct.lo time.lo concept-inst.lo locale-inst.lo misc-inst.lo stl-inst.lo string-inst.lo wstring-inst.lo valarray-inst.lo ext-inst.lo ../libmath/libmath.la ../libsupc++/libsupc++conv!
enience.la -lm

Libtool turns this into:

/home/dave/gcc-3.1/objdir/gcc/xgcc -B/home/dave/gcc-3.1/objdir/gcc/ -nostdinc++ -L/home/dave/gcc-3.1/objdir/hppa-linux/libstdc++-v3/src -L/home/dave/gcc-3.1/objdir/hppa-linux/libstdc++-v3/src/.libs -B/home/dave/opt/gnu/hppa-linux/bin/ -B/home/dave/opt/gnu/hppa-linux/lib/ -isystem /home/dave/opt/gnu/hppa-linux/include -shared -nostdlib /home/dave/opt/gnu/lib/crti.o /home/dave/gcc-3.1/objdir/gcc/crtbeginS.o  .libs/globals.o .libs/limits.o .libs/basic_file.o .libs/complex_io.o .libs/ios.o .libs/strstream.o .libs/cmath.o .libs/bitset.o .libs/functexcept.o .libs/stdexcept.o .libs/vterminate.o .libs/c++locale.o .libs/locale.o .libs/localename.o .libs/codecvt.o .libs/collate.o .libs/ctype.o .libs/messages.o .libs/moneypunct.o .libs/numpunct.o .libs/time.o .libs/concept-inst.o .libs/locale-inst.o .libs/misc-inst.o .libs/stl-inst.o .libs/string-inst.o .libs/wstring-inst.o .libs/valarray-inst.o .libs/ext-inst.o -Wl,--whole-archive ../libmath/.libs/libmath.a ../libsupc++/.libs/libsupc+!
+convenience.a -Wl,--no-whole-archive  -L/home/dave/gcc-3.1/objdir/hppa-linux/libstdc++-v3/src -L/home/dave/gcc-3.1/objdir/hppa-linux/libstdc++-v3/src/.libs -lm ../libmath/.libs/libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm -L/home/dave/gcc-3.1/objdir/gcc -L/home/dave/opt/gnu/hppa-linux/bin -L/home/dave/opt/gnu/hppa-linux/lib -L/home/dave/opt/gnu/lib -L/home/dave/opt/gnu/lib/gcc-lib/hppa-linux/3.1 -L/home/dave/opt/gnu/lib/gcc-lib/hppa-linux/3.1/../../../../hppa-linux/lib -L/home/dave/opt/gnu/lib/gcc-lib/hppa-linux/3.1/../../.. -lgcc -lgcc -lc -lgcc -lm -lgcc -lgcc -lc -lgcc   /home/dave/gcc-3.1/objdir/gcc/crtendS.o /home/dave/opt/gnu/lib/crtn.o  -Wl,-soname -Wl,libstdc++.so.4 -o .libs/libstdc++.so.4.0.0

It only outputs "-shared" and links with gcc.  One of the "-gcc" in each
pair is from LIB_SPEC.  As can be seen, there no shared name in the link
command.  Don't we need EH for libstdc++?  This is with a binutils
supporting LINK_EH_SPEC.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


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