This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building Native ToolChain (SH3)


Greetings,

I started experimenting with the prefix settings once i started having crt1.o
issues. I appreciate the information although a simple "use --prefix=/usr"
would have been just fine.

Best wishes
Kristoffer Ericson
www.jlime.com



Quoting Kai Ruottu <karuottu@mbnet.fi>:

> Kristoffer Ericson kirjoitti:
> > Greetings,
> >
> > Here is my progress so far, in building a native sh3 compiler (by using
> > CrossTool), hope this helps:
> >
> > Binutils-2.16
> > -------------
> > ../configure --host=sh3-unknown-linux-gnu --build=i686 --prefix=""
>
>   You have never heard that native tools use the "--prefix=/usr" ?
>
> > Glibc-2.3.5
> > ------------
> > BUILD_CC=gcc CFLAGS=-O CC=sh3-unknown-linux-gnu-gcc
> AR=sh3-unknown-linux-gnu-ar
> > RANLIB=sh3-unknown-linux-gnu-ranlib ../../sourcedir/glibc-2.3.5/.configure
> > --build=i686 --host=sh3-unknown-linux-gnu --enable-kernel=2.4.3
> --without-cvs
> > --disable-profile --disable-debug --without-gd --without-tls
> --without-__thread
> > --enable-shared --enable-add-ons=linuxthreads
> >
>
--without-headers=/opt/crosstool/gcc-3.4.4-glibc-2.3.5/sh3-unknown-linux-gnu/sh3-unknown-linux-gnu/include
> > --without-fp
>
>   Where on earth is your "--prefix=/usr" ?
>
>   When producing a totally normal glibc for Linux, one must use this
> $prefix ALWAYS ! It doesn't matter if the GCC which will use it is a
> native or a cross compiler because glibc will be built only once, for
> both the native and for all the cross hosts...
>
> > make LD=sh3-unknown-linux-gnu-ld RANLIB=sh3-unknown-linux-gnu-ranlib
> > make install_root=/tempdir install
>
>   Are you claiming that you built glibc another time?  And are not simply
> copying the already built glibc made for the cross-GCC ?
>
>   The '/tempdir/lib', '/tempdir/usr/lib', '/tempdir/usr/include', ie. the
> stuff below '/tempdir' should be the "glibc" you are using with your
> cross-GCC, almost a 1:1 image for the glibc required on the native
> system (three or so minor differences due to the crosscompiling
> needs)...
>
> > GCC-3.4.4
> > ---------
> > CFLAGS=-O CC=sh3-unknown-linux-gnu-gcc NM=sh3-unknown-linux-gnu-nm
> > AR=sh3-unknown-linux-gnu-ar ./configure --host=sh3-unknown-linux-gnu
> > --build=i686 --enable-languages=c,c++ --prefix=/
>
>   Again, USE the "--prefix=/usr" when producing anything "native" !!!!
>
> > make DESTDIR=/tempdir install
>
>   OK ...
>
> > Notes: Setting Optimization to -O otherwise getting assembler problems.
> > Adding additional languages makes the compilation fail, also make
> bootstrap.
>
>   The 'make bootstrap' means compiling first with the proprietary non-GNU
> native 'cc', then with the GCC produced with the proprietary 'cc' and
> finally with the GCC produced with the GCC produced with the proprietary
> native 'cc'... Why you think that you would require something as
> complicated as this?
>
> > This leaves me with one error left, when it tries to compile something it
> > complains about not finding crt1.o (its in /lib). Changing stuff in
> ld.so..conf
> > doesnt help. Any Ideas?
>
>   Just learn to build native tools ! Please practice your skills with
> producing native tools for the $build system, 'i686-linux-gnu', and
> you soon will learn that one must always use the "--prefix=/usr"....
>
> ------
> Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
> Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
>
>



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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