* Error building cross-gcc libgcc_s.so
@ 2000-12-28 15:00 Michael Eager
2000-12-28 19:40 ` Alexandre Oliva
0 siblings, 1 reply; 2+ messages in thread
From: Michael Eager @ 2000-12-28 15:00 UTC (permalink / raw)
To: gcc-help
I'm getting an error while building cross-GCC for i586 with newlib. I'm
using the current CVS mainline.
My configuration (cross x86 compiler):
./Source/gcc/configure --with-gcc-version-trigger=./Source/gcc/gcc/version.c
--host=i686-pc-linux-gnu --prefix=./Install --target=i586-hardhat-linux
--program-prefix=i586- --enable-cross --enable-languages=c
--with-headers=/opt/hardhat/devkit/i586-hardhat-linux/include --with-newlib
--norecursion
The error occurs while trying to build a shared library version of libgcc_s.so:
./Build/GCC-i586-hardhat-linux-20001228/gcc/xgcc
-B./Build/GCC-i586-hardhat-linux-20001228/gcc/
-B./Install/i586-hardhat-linux/bin/
-B./Install/i586-hardhat-linux/lib/ -isystem
./Install/i586-hardhat-linux/include -O2 -DCROSS_COMPILE -DIN_GCC
-W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem
./include -fPIC -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc
-shared -nodefaultlibs -Wl,--soname=libgcc_s.so.0 -Wl,--version-script=libgcc.map
-o libgcc_s.so libgcc/./_muldi3.o libgcc/./_divdi3.o libgcc/./_moddi3.o
<lotsa object files>
-lc
./Install/i586-hardhat-linux/bin/ld: cannot open crti.o: No such file or directory
The specs file contains the following:
*startfile:
%{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s}
%{!p:%{profile:gcrt1.o%s} %{!profile:crt1.o%s}}}}
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}
*endfile:
%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s
Since crti.o (or crtn.o) isn't built in the current directory, the
linker cannot find it.
Why should crti.o and crtn.o be included in a shared library?
Or in libgcc?
Why is libc also linked in with libgcc? Since newlib hasn't been
built, there isn't one to link with.
Is there something that I'm doing wrong?
--
Michael Eager
Senior Tools Developer Phone: (408) 328-8426
MontaVista Software, Inc. Fax: (408) 328-9204
1237 E. Arques Avenue Web: www.hardhatlinux.com
Sunnyvale, CA 94085 Email: eager@mvista.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Error building cross-gcc libgcc_s.so
2000-12-28 15:00 Error building cross-gcc libgcc_s.so Michael Eager
@ 2000-12-28 19:40 ` Alexandre Oliva
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Oliva @ 2000-12-28 19:40 UTC (permalink / raw)
To: Michael Eager; +Cc: gcc-help
On Dec 28, 2000, Michael Eager <eager@mvista.com> wrote:
> Since crti.o (or crtn.o) isn't built in the current directory, the
> linker cannot find it.
They're supposed to be supplied by the C library.
> Why should crti.o and crtn.o be included in a shared library?
Because otherwise the library won't be properly initialized.
> Or in libgcc?
Likewise.
> Why is libc also linked in with libgcc?
Because libgcc depends on symbols supplied by the C library.
> Since newlib hasn't been built, there isn't one to link with.
You don't want newlib for a GNU/Linux tool-chain. You want glibc.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-12-28 19:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-28 15:00 Error building cross-gcc libgcc_s.so Michael Eager
2000-12-28 19:40 ` Alexandre Oliva
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).