public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/7832: libc not found when linking libgcc.so
@ 2002-09-04 20:46 mhabets
0 siblings, 0 replies; only message in thread
From: mhabets @ 2002-09-04 20:46 UTC (permalink / raw)
To: gcc-gnats; +Cc: ljrittle
>Number: 7832
>Category: target
>Synopsis: libc not found when linking libgcc.so
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Sep 04 20:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Martin Habets
>Release: 3.2 20020809 (prerelease)
>Organization:
>Environment:
System: SunOS rtrsun8 5.8 Generic_108528-11 sun4u sparc SUNW,UltraSPARC-IIi-cEngine
Architecture: sun4
host: sparc-sun-solaris2.8
build: sparc-sun-solaris2.8
target: powerpc-ibm-linux-gnu
configured with: ./configure --target=powerpc-ibm-linux-gnu --prefix=$HOME/sparc-SunOS_5.8 --exec-prefix=$HOME/sparc-SunOS_5.8 --disable-nls
>Description:
After configure did a
make LANGUAGES=c
which worked fine. Then did
make install
which gave the following error:
/home/mhabets/src/gcc-3.2-20020809/gcc/xgcc -B/home/mhabets/src/gcc-3.2-20020809/gcc/ -B/home/mhabets/sparc-SunOS_5.8/powerpc-ibm-linux-gnu/bin/ -B/home/mhabets/sparc-SunOS_5.8/powerpc-ibm-linux-gnu/lib/ -isystem /home/mhabets/sparc-SunOS_5.8/powerpc-ibm-linux-gnu/include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o libgcc_s.so.1 -fPIC -mstrict-align libgcc/./_muldi3.o libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_ashrdi3.o libgcc/./_ffsdi2.o libgcc/./_clz.o libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o libgcc/./_floatdidf.o libgcc/./_floatdisf.o libgcc/./_fixunsdfsi.o libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o libgcc/./_fixdfdi.o libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o libgcc/./_fixunsx!
fdi.o \
libgcc/./_unpack_df.o libgcc/./_addsub_df.o libcc/./_mul_df.o libgcc/./_div_df.o libgcc/./_fpcmp_parts_df.o libgcc/./_compare_df.o libgcc/./_eq_df.o libgcc/./_ne_df.o libgcc/./_gt_df.o libgcc/./_ge_df.o libgcc/./_lt_df.o libgcc/./_le_df.o libgcc/./_unord_df.o libgcc/./_si_to_df.o libgcc/./_df_to_si.o libgcc/./_negate_df.o libgcc/./_make_df.o libgcc/./_df_to_sf.o libgcc/./_thenan_df.o libgcc/./_df_to_usi.o libgcc/./_usi_to_df.o libgcc/./tramp.o libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde-glibc.o libgcc/./unwind-sjlj.o \
-lc && rm -f libgcc_s.so && ln -s libgcc_s.so.1 libgcc_s.so
/home/mhabets/sparc-SunOS_5.8/powerpc-ibm-linux-gnu/bin/ld: cannot find /lib/libc.so.6
collect2: ld returned 1 exit status
make[2]: *** [libgcc_s.so] Error 1
make[2]: Leaving directory `/home/mhabets/src/gcc-3.2-20020809/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/home/mhabets/src/gcc-3.2-20020809/gcc'
make: *** [install-gcc] Error 2
Quite logical, as my host machine does not have /lib/libc.so.6.
I removed the '-lc' and the build worked fine. The Makefile uses SHLIB_LC for '-lc'
Looking into Changlog I noticed:
2002-03-29 Loren J. Rittle <ljrittle@acm.org>
* config.gcc (*-*-freebsd*): Enable creation of libgcc_s.so.
* config/t-slibgcc-elf-ver (SHLIB_LC): Add macro and use it.
No functional change except ...
* config/t-slibgcc-nolc-override (SHLIB_LC): Override it. New file.
* doc/install.texi (*-*-freebsd*): Document port configuration.
>How-To-Repeat:
I think this can be reproduced when building any cross-compiler
other than for the *-*-freebsd* target.
>Fix:
For my specific target the workaround is to change gcc/config.gcc:
2860c2860
> tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-slibgcc-nolc-override t-linux rs6000/t-ppccomm"
---
< tmake_file="rs6000/t-ppcos t-slibgcc-elf-ver t-linux rs6000/t-ppccomm"
But it seems to me that the default case should remain NOT to use libc, like it
was before. This would require changing t-slibgcc-elf-ver and creating
a t-slibgcc-lc-override.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-09-05 3:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-04 20:46 target/7832: libc not found when linking libgcc.so mhabets
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).