This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: building 686->ppc-linux cross compiler with mainline.
- To: "Geoff Keating" <geoffk at redhat dot com>
- Subject: RE: building 686->ppc-linux cross compiler with mainline.
- From: "Rob Taylor" <robt at flyingpig dot com>
- Date: Tue, 5 Jun 2001 21:22:34 +0100
- Cc: "Gcc at Gcc dot Gnu. Org" <gcc at gcc dot gnu dot org>
>
> > #define STARTFILE_LINUX_SPEC "\
> > %{!shared: %{pg:gcrt0.o%s} %{!pg:%{p:gcrt0.o%s} %{!p:scrt0.o%s}}} \
> > %{mnewlib: ecrti.o%s} %{!mnewlib: scrti.o%s} \
> > %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
> >
> > #define ENDFILE_LINUX_SPEC "%{!shared:crtend.o%s} %{shared:crtendS.o%s} \
> > %{mnewlib: ecrtn.o%s} %{!mnewlib: scrtn.o%s}"
>
> The scrt* files are for Solaris. You do not want to try using them
> for linux, for various reasons not least that Solaris was
> little-endian but linux is big-endian.
>
> The files you want to use are really called 'crt1.o', 'crti.o', and
> 'crtn.o'. They come from glibc, they are not built as part of gcc.
right. somewhere it may be good to comment that this must be in the libs include
with --with-libs. Who should I talk to about adding stuff to documentation?
> > well, as you can see, I'm using --target=ppc-linux and it's not
> running though -
> > can you tell me where this information should be being passed into the xgcc
> > build (header? define?) and i can look there and debug the build process..
>
> The routine that does this is find_a_file in gcc.c; it's the code
> under the comment
>
> /* Certain prefixes are tried with just the machine type,
> not the version. This is used for finding as, ld, etc. */
>
> I would first try running
>
> ppc-linux-gcc --print-prog-name=as
calling this on my final executable (I'm currently building by modifying the
specs file manually halfway though the build process) returns 'as'
I've just stepped though the code..
the exec_prefixes I'm seeing contains:
"/usr/local/gcc-i686-to-ppc/gcc-28052001/gcc/./../lib/gcc-lib/"
"/usr/local/gcc-i686-to-ppc/gcc-686-ppc/lib/gcc-lib/"
"/usr/local/gcc-i686-to-ppc/gcc-686-ppc/lib/gcc-lib/"
"/usr/lib/gcc/"
"/usr/local/gcc-i686-to-ppc/gcc-28052001/gcc/./../lib/gcc-lib/ppc
-linux/3.0/../../../../ppc-linux/bin/"
"/usr/local/gcc-i686-to-ppc/gcc-686-ppc/lib/gcc-lib/ppc-linux/3.0
/../../../../ppc-linux/bin/"
/usr/local/gcc-i686-to-ppc/gcc-28052001 is my build dir
/usr/local/gcc-i686-to-ppc/gcc-686-ppc is my prefix
it appears that i should be installing binutils with the same prefix as gcc. If
I wished to install binutils to a different prefix to gcc, how would i go about
adding a new search prefix into exec_prefix?
Thanks,
Rob Taylor