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.



>
> "Rob Taylor" <robt@flyingpig.com> writes:
>
> > I'm currently building a 686->ppc-linux cross compiler with the
> mainline current
> > snapshot.
> > problems I've hit so far:
> > the ppc build seems to build two types of crt objects , scrt?.o for
> SVR4 systems
> > and ecrt?.o for EABI systems. STARTFILE_LINUX and ENDFILE_LINUX are
> defined like
> > so:
> >
> >   #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}"
> >
> >   #define ENDFILE_LINUX_SPEC "%{!shared:crtend.o%s} %{shared:crtendS.o%s} \
> >   %{mnewlib: ecrtn.o%s} %{!mnewlib: crtn.o%s}"
> >
> > Am i correct in thinking that these should be defined like this under this
> > scheme:
> > (note, currently no crt?.o files get built)
> >
> >   #define STARTFILE_LINUX_SPEC "\
> >   %{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:scrt1.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}"
>
> These are for Linux using newlib.  The definitions for linux using
> glibc are in linux.h.

hmm.. i'm configuring with
/usr/local/src/cvssrc/gcc/configure --prefix=/usr/local/gcc-i686-to-ppc/gcc-
686-ppc --target=ppc-linux --host=i686-pc-linux --enable-shared --enable-thr
eads=posix --enable-libstdcxx-v3 --enable-namespaces --enable-long-long --wi
th-headers=/usr/local/gcc-i686-to-ppc/ppc-linux/include/  --with-libs="/usr/
local/gcc-i686-to-ppc/ppc-linux/lib/" --disable-multilib --enable-languages=
c,c++ --disable-libgcj

(...had to work around a few things in the final rekoning..)

and it's *definitly* using those defines - I eventually changed them to

#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}"

- 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.

> > 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..

attached is the diffs i had to make to get a cross gcc from i686-pc-linux to
ppc-linux, starting from that snapshot of 20010528.

Thanks,
Rob Taylor


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