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: robt at flyingpig dot com
- Subject: Re: building 686->ppc-linux cross compiler with mainline.
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: Tue, 5 Jun 2001 11:40:00 -0700
- CC: gcc at gcc dot gnu dot org
- References: <000001c0ede9$20f5dac0$9c00a8c0@highend.co.uk>
- Reply-to: Geoff Keating <geoffk at redhat dot com>
> From: "Rob Taylor" <robt@flyingpig.com>
> Cc: "Gcc@Gcc. Gnu. Org" <gcc@gcc.gnu.org>
> Date: Tue, 5 Jun 2001 18:58:30 +0100
> #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.
> - i know for certain it's using these defines, as when i change them, my
> startfile_linux:/ endfile_linux: instructions in my specs change. looking at
> config/rs6000/linux.h, no STARTFILE macros are defined there.
Oh, sorry. Yes, I forgot that we fixed that.
> > > Problem no.2 i've hit is that the xgcc generated is configured to run 'as'
> > > rather than 'pcc-linux-as' - can anyone tell me how the choice of
> > assembler is
> > > configured?
> >
> > This doesn't happen to me. If you specify --target=ppc-linux it
> > should run ppc-linux-as.
> >
> 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
--
- Geoffrey Keating <geoffk@geoffk.org>