Cross build applications
I'm trying to cross build a small test program on a linux PC, but it fails.
mips-linux-gcc -o test test.c/usr/mips-linux/bin/ld: cannot open crt1.o: No such file or directory
--
_ _ ____ ___ Carsten Langgaard Mailto:[email protected] |\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527 | \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555 TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556 Denmark http://www.mips.com
Quoted 5 lines · Carsten Langgaard
I'm trying to cross build a small test program on a linux PC, but it fails.
mips-linux-gcc -o test
test.c/usr/mips-linux/bin/ld: cannot open crt1.o: No such file or directory
Yep - you need to obtain a copy of this - just copy it out of Linux/mips installation and put it in one of the lib directories under your /usr/mips-linux.
(That let me get "hello world" crossing from Linux/Alpha last week)
Dave
Signature · 5 lines
/------------------------------------------------------------------\ | Dr. David Alan Gilbert | Work:[email protected] +44-161-286-2000 Ex258| | -------- G7FHJ --------|---------------------------------------- | | Home: [email protected] http://www.treblig.org | \------------------------------------------------------------------/
Quoted 5 lines · Carsten Langgaard
I'm trying to cross build a small test program on a linux PC, but it fails.
mips-linux-gcc -o test
test.c/usr/mips-linux/bin/ld: cannot open crt1.o: No such file or directory
The file is supposed to come with glibc. Do you have glibc for
mips-linux installed?
Signature · 3 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
Quoted 11 lines · Maciej W. Rozycki
Quoted 5 lines · Carsten Langgaard
I'm trying to cross build a small test program on a linux PC, but it fails.
mips-linux-gcc -o test
test.c/usr/mips-linux/bin/ld: cannot open crt1.o: No such file or directoryThe file is supposed to come with glibc. Do you have glibc for
mips-linux installed?
No, where can I get it.
Review
Quoted 5 lines
--
(quoted diff) +3
-0+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
--
_ _ ____ ___ Carsten Langgaard Mailto:[email protected] |\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527 | \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555 TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556 Denmark http://www.mips.com
Quoted 4 lines · Carsten Langgaard
Quoted 2 lines
The file is supposed to come with glibc. Do you have glibc for
mips-linux installed?No, where can I get it.
If you want glibc 2.2.1, you may get a source RPM package I made
available at 'ftp://ftp.ds2.pg.gda.pl/pub/macro/'. I make mipsel-linux builds only, so for cross-compilation you would get a mipsel-linux-glibc package, modify the few defines at the top (and possibly the spec file name) and build a mips-linux-glibc binary package. Or build it in the traditional way. Note the few patches I include are not MIPS-specific, so you do not really need them unless you want them.
If you want a glibc 2.0 package or a binary one, then I cannot help you.
Check the usual resources -- oss.sgi.com and ftp.rfc822.org. Others may provide different pointers as well.
Maciej
Signature · 3 lines
+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
Please, can anyone provide me with the right set of RPMs, so I can cross compile a "hello-world" program on a linux PC ?
/Carsten
Quoted 22 lines · Maciej W. Rozycki
Quoted 4 lines · Carsten Langgaard
Quoted 2 lines
The file is supposed to come with glibc. Do you have glibc for
mips-linux installed?No, where can I get it.
If you want glibc 2.2.1, you may get a source RPM package I made
available at 'ftp://ftp.ds2.pg.gda.pl/pub/macro/'. I make mipsel-linux builds only, so for cross-compilation you would get a mipsel-linux-glibc package, modify the few defines at the top (and possibly the spec file name) and build a mips-linux-glibc binary package. Or build it in the traditional way. Note the few patches I include are not MIPS-specific, so you do not really need them unless you want them.If you want a glibc 2.0 package or a binary one, then I cannot help you.
Check the usual resources -- oss.sgi.com and ftp.rfc822.org. Others may provide different pointers as well.Maciej
--
Review
Quoted 3 lines
(quoted diff) +3
-0+ Maciej W. Rozycki, Technical University of Gdansk, Poland + +--------------------------------------------------------------+ + e-mail: [email protected], PGP key available +
--
_ _ ____ ___ Carsten Langgaard Mailto:[email protected] |\ /|||___)(___ MIPS Denmark Direct: +45 4486 5527 | \/ ||| ____) Lautrupvang 4B Switch: +45 4486 5555 TECHNOLOGIES 2750 Ballerup Fax...: +45 4486 5556 Denmark http://www.mips.com
Quoted 5 lines · Carsten Langgaard
Please, can anyone provide me with the right set of RPMs, so I can cross compile a "hello-world" program on a linux PC ?
/Carsten
Go to ftp://ftp.mvista.com/pub/Area51/mips_fp_le/, and look for the following packages for i386 host:
. binutils
. kernel-headers
. gcc
. glibc
Install them and you are ready to go!
There are also big endian packages available.
Jun