This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: building 686->ppc-linux cross compiler with mainline.


> From: "Rob Taylor" <robt@flyingpig.com>
> Cc: "Gcc@Gcc. Gnu. Org" <gcc@gcc.gnu.org>
> Date: Tue, 5 Jun 2001 21:22:34 +0100
> X-Priority: 3 (Normal)
> X-MSMail-Priority: Normal
> Importance: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
> X-Server: VPOP3 V1.3.0c - Registered to: Flying Pig Systems Ltd
> 
> >
> > > #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?

I don't think you can.  You can specify --with-as=/path/to/as
and similarly --with-ld, though.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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