public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* How to build a gcc 3.1-based crosscompiling toolchain?
@ 2002-07-19  9:55 Tobias Hunger
  2002-07-21 23:05 ` Tiemo Krüger - mycable GmbH
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Hunger @ 2002-07-19  9:55 UTC (permalink / raw)
  To: gcc-help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

I am trying to build a gcc 3.1 based crosscompiling toolchain from ix86-linux 
to arm-linux. So far I got binutils to compile and install and I have the 
kernel configured and the necessary include files installed.

Now I am trying to build a gcc that is capable of building glibc. This is what 
I am trying to do:
configure --target=arm-linux --host=i686-linux --prefix=/install/dir/
    --with-newlib --disable-threads --enable-languages=c --without-fp

There is no FPU in my Sharp Zaurus which I am trying to build this 
crosscompiler for. I don't want to use the kernel-emu. The probelm is that 
the build stops with this error:

/path/BUILD/gcc/xgcc -B/path/BUILD/gcc/ -B/install/dir/arm-linux/bin/ 
- -B/install/dir/arm-linux/lib/ -isystem /install/dir/arm-linux/include -O2  
- -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes 
- -Wmissing-prototypes -isystem ./include  -fomit-frame-pointer -fPIC -g0  
- -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -shared -nodefaultlibs 
- -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o 
libgcc_s.so.1   libgcc/./_udivsi3.o libgcc/./_divsi3.o libgcc/./_umodsi3.o
[... lots of other files...]
libgcc/./unwind-sjlj.o -lc && rm -f libgcc_s.so && ln -s libgcc_s.so.1 
libgcc_s.so
/install/dir/arm-linux/bin/ld: cannot open crti.o: No such file or directory
collect2: ld returned 1 exit status
make[4]: *** [libgcc_s.so] Error 1

There is a crti.asm file in config/arm/. Should that get build? What did I do 
wrong?

- -- 
Gruss,
Tobias

- ------------------------------------------------------------
Tobias Hunger           The box said: 'Windows 95 or better'
tobias@fresco.org                      So I installed Linux.
- ------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9OESTv0FZW3NyoqURAneXAJ9vW/3AoXoUzr9LMYOoYY5kWeccdACfb0sx
SUVH/XAaaUVoKAUdXFcmsKM=
=fcwn
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to build a gcc 3.1-based crosscompiling toolchain?
  2002-07-19  9:55 How to build a gcc 3.1-based crosscompiling toolchain? Tobias Hunger
@ 2002-07-21 23:05 ` Tiemo Krüger - mycable GmbH
  0 siblings, 0 replies; 2+ messages in thread
From: Tiemo Krüger - mycable GmbH @ 2002-07-21 23:05 UTC (permalink / raw)
  To: Tobias Hunger; +Cc: gcc-help

Hi,

I just build cross-toolchasins for MIPS, but I think the way will be the 
same.

- At the beginning make sure that you have header files from an old 
toolchain installed
- Build the cross-binutils (in my case it's ../binutils/configure 
--target=mipsel-linux liblibdir='${exec_prefix}'/mipsel-linux/i386- 
linux/lib; then make)
- build a static-gcc (in my case it's ../gcc/configure 
--target=mipsel-linux --enable-languages=c --disable-shared --with- 
headers=/home/toolch/mips-include-headers/; then make)
- cross-build of glibc (../glibc/configure --build=i686-linux 
--host=mipsel-linux \ --enable-add-ons --prefix=/usr 
--disable-sanity-checks; make; su root; make install 
install_root=/usr/local/mipsel-linux/glibc; cd ..)
-Build final c and c++ cross-gcc (../gcc/configure --target=mipsel-linux 
--enable-languages=c,c++; make; make install)

Building a cross-toolchain isn't that simple. It takes some time to 
figure out how to do it. Even the when and where of using root-rights or 
normal user rights during configuration, make and install isn't trivial. 
But that's what we're paid for :-)

Let me know if this was any help for you

Tiemo


-- 
-------------------------------------------------------
Tiemo Krueger       Tel:  +49 48 73 90 19 86
mycable GmbH        Fax: +49 48 73 90 19 76
Boeker Stieg 43
D-24613 Aukrug      eMail: tk@mycable.de

Public Kryptographic Key is available on request
-------------------------------------------------------

Tobias Hunger wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi!
> 
> I am trying to build a gcc 3.1 based crosscompiling toolchain from ix86-linux 
> to arm-linux. So far I got binutils to compile and install and I have the 
> kernel configured and the necessary include files installed.
> 
> Now I am trying to build a gcc that is capable of building glibc. This is what 
> I am trying to do:
> configure --target=arm-linux --host=i686-linux --prefix=/install/dir/
>     --with-newlib --disable-threads --enable-languages=c --without-fp
> 
> There is no FPU in my Sharp Zaurus which I am trying to build this 
> crosscompiler for. I don't want to use the kernel-emu. The probelm is that 
> the build stops with this error:
> 
> /path/BUILD/gcc/xgcc -B/path/BUILD/gcc/ -B/install/dir/arm-linux/bin/ 
> - -B/install/dir/arm-linux/lib/ -isystem /install/dir/arm-linux/include -O2  
> - -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes 
> - -Wmissing-prototypes -isystem ./include  -fomit-frame-pointer -fPIC -g0  
> - -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -shared -nodefaultlibs 
> - -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o 
> libgcc_s.so.1   libgcc/./_udivsi3.o libgcc/./_divsi3.o libgcc/./_umodsi3.o
> [... lots of other files...]
> libgcc/./unwind-sjlj.o -lc && rm -f libgcc_s.so && ln -s libgcc_s.so.1 
> libgcc_s.so
> /install/dir/arm-linux/bin/ld: cannot open crti.o: No such file or directory
> collect2: ld returned 1 exit status
> make[4]: *** [libgcc_s.so] Error 1
> 
> There is a crti.asm file in config/arm/. Should that get build? What did I do 
> wrong?
> 
> - -- 
> Gruss,
> Tobias
> 
> - ------------------------------------------------------------
> Tobias Hunger           The box said: 'Windows 95 or better'
> tobias@fresco.org                      So I installed Linux.
> - ------------------------------------------------------------
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
> 
> iD8DBQE9OESTv0FZW3NyoqURAneXAJ9vW/3AoXoUzr9LMYOoYY5kWeccdACfb0sx
> SUVH/XAaaUVoKAUdXFcmsKM=
> =fcwn
> -----END PGP SIGNATURE-----
> 
> 



-- 
-------------------------------------------------------
Tiemo Krueger       Tel:  +49 48 73 90 19 86
mycable GmbH        Fax: +49 48 73 90 19 76
Boeker Stieg 43
D-24613 Aukrug      eMail: tk@mycable.de

Public Kryptographic Key is available on request
-------------------------------------------------------

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-22  6:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-19  9:55 How to build a gcc 3.1-based crosscompiling toolchain? Tobias Hunger
2002-07-21 23:05 ` Tiemo Krüger - mycable GmbH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).