This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

Re: can't find crt1.o. egcs powerpc-linux cross-compile problem.


WARNING: I do not really know what I am talking about! But here is my guess:

crt1.o is on your PowerPC Linux box ;-)

It's a binary that came with the OS. You were expected to copy it to your host
machine. Presummably, the source code is available in the Linux source
distribution (don't ask me which one.)

My guess is based on the idea that -target=powerpc-linux picked up
egcs/gcc/config/rs6000/linux.h, which includes egcs/gcc/config/rs6000/sysv4.h.
This latter header file has:

#ifndef STARTFILE_LINUX_SPEC
#define STARTFILE_LINUX_SPEC "\
%{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
%{mnewlib: ecrti.o%s} \
%{!mnewlib: crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}}"
#endif

which is were the attemp to link with crt1.o comes from.

Hope this helps.

BTW, you might be able to provide a stub to satisfy the linker during
configuration. Look at newlib/newlib/libc/sys/rtems/crt0.c for an idea.

Brendan Simon wrote:

> I am trying to compile egcs-1.1.2 as a cross-compiler (linux to
> powerpc).  I am building on a redhat-5.2 system and have successfully
> compiled and installed a native egcs-1.12.  I am using this compiler for
> the cross-compile build and have used the following configure options.
>     --target=powerpc-linux
>     --program-prefix=powerpc-linux-
>     --with-headers=/usr/include
>
> The compilation of xgcc completes.  At some later stage, configure tries
> to test the newly built xgcc to see if it can build executables, but it
> fails.  When I run the command manually, the error message says that
> "ld" can not find crt1.o.  Where is the source for crt1 (egcs or
> glibc) ?  I can see crt1 files in the newlib tree so my first assumption
> is that it must be in the glibc tree for linux targets.
>
> Any suggestions to get past my crt1 linking problems.
>
> Thanks,
> Brendan Simon.
>
> PS. With regard to the --with-headers option, should I unpack the glibc
> sources and point --with-headers to the unpacked include directory,
> instead of the original redhat-5.2 ?
>
> _______________________________________________
> New CrossGCC FAQ: http://www.objsw.com/CrossGCC
> _______________________________________________
> To remove yourself from the crossgcc list, send
> mail to crossgcc-request@cygnus.com with the
> text 'unsubscribe' (without the quotes) in the
> body of the message.

--
Charles-Antoine Gauthier
Research Officer
Software Engineering Group
Institute for Information Technology
National Research Council of Canada
Ottawa, ON, Canada
K1A 0R6


_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.

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