cross-compile fails binutils(2.16/2.16.1/2.17)

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
uglyoldbob
Member
Member
Posts: 62
Joined: Tue Feb 13, 2007 10:46 am

cross-compile fails binutils(2.16/2.16.1/2.17)

Post by uglyoldbob »

I tried to make cross-compiler for i386-elf.
Ubuntu, kernel 2.6.15-28-386 is my system

I have tried: binutils-2.16, binutils-2.16.1, binutils-2.17.
All three complain about using host and target in the same line (I am not doing this). They even complain when I don't put in target.
Here is my line from the wiki.

export PREFIX=/usr/cross
export TARGET=i386-elf
cd /usr/src/build-binutils
../binutils-2.16.1/configure --target=$TARGET --prefix=$PREFIX --disable-nls make all install

Here is the output from the configuration command for the gcc side.
(The exact same line is used as that is in the wiki)
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i386-pc-elf
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether ln works... (cached) yes
checking whether ln -s works... (cached) yes
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gnatbind... no
checking whether compiler driver understands Ada... (cached) no
checking how to compare bootstrapped objects... (cached) cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
*** This configuration is not supported in the following subdirectories:
target-libmudflap
(Any other directories should still work fine.)
checking for bison... (cached) bison -y
checking for bison... (cached) bison
checking for gm4... (cached) m4
checking for flex... no
checking for lex... no
checking for flex... no
checking for makeinfo... no
checking for expect... no
checking for runtest... no
checking for i686-pc-linux-gnu-ar... (cached) ar
checking for i686-pc-linux-gnu-as... (cached) as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... no
checking for i686-pc-linux-gnu-ld... (cached) ld
checking for i686-pc-linux-gnu-lipo... no
checking for lipo... no
checking for i686-pc-linux-gnu-nm... (cached) nm
checking for i686-pc-linux-gnu-ranlib... (cached) ranlib
checking for i686-pc-linux-gnu-strip... (cached) strip
checking for i686-pc-linux-gnu-windres... no
checking for windres... no
checking for i686-pc-linux-gnu-objcopy... (cached) objcopy
checking for i686-pc-linux-gnu-objdump... (cached) objdump
checking for i386-elf-ar... (cached) ar
checking for i386-elf-as... (cached) as
checking for i386-elf-cc... (cached) cc
checking for i386-elf-c++... (cached) c++
checking for i386-elf-dlltool... no
checking for i386-elf-gcc... (cached) gcc
checking for i386-elf-gcj... no
checking for i386-elf-gfortran... no
checking for i386-elf-ld... (cached) ld
checking for i386-elf-lipo... no
checking for i386-elf-nm... (cached) nm
checking for i386-elf-objdump... (cached) objdump
checking for i386-elf-ranlib... (cached) ranlib
checking for i386-elf-strip... (cached) strip
checking for i386-elf-windres... no
checking where to find the target ar... pre-installed
checking where to find the target as... pre-installed
checking where to find the target cc... just compiled
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... pre-installed
checking where to find the target gcc... just compiled
checking where to find the target gcj... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target ld... pre-installed
checking where to find the target lipo... pre-installed
checking where to find the target nm... pre-installed
checking where to find the target objdump... pre-installed
checking where to find the target ranlib... pre-installed
checking where to find the target strip... pre-installed
checking where to find the target windres... pre-installed
checking whether to enable maintainer-specific portions of Makefiles... no
checking if symbolic links between directories work... (cached) yes
creating ./config.status
creating Makefile


I'm not sure what else I need to post.
Anybody know why it is so messed up?
I have an 80386SX 20MHz 2MB RAM.
It is my testbed platform. Only has the 3.5" and 5.25" floppy drives.
Andrew275
Member
Member
Posts: 30
Joined: Tue Feb 27, 2007 2:29 pm
Contact:

Post by Andrew275 »

So what EXACTLY is the error message?
My operating system: Desktop OS
Content management system/forum: Deluxe Portal
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Code: Select all

../binutils-2.16.1/configure --target=$TARGET --prefix=$PREFIX --disable-nls make all install 
is not the same as

Code: Select all

../binutils-2.16.1/configure --target=$TARGET --prefix=$PREFIX --disable-nls
make all 
make install 
apart from that, your configure run looks perfectly fine
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post by Solar »

I second Andrew275 - what exactly is the error message?

And when exactly do you get it? While building binutils? If yes, the configure output for GCC is more or less meaningless, since you need your cross-binutils to work first.
Every good solution is obvious once you've found it.
uglyoldbob
Member
Member
Posts: 62
Joined: Tue Feb 13, 2007 10:46 am

Post by uglyoldbob »

Nevermind. The configure script for binutils didn't like the command line given in the wiki because it had make all install at the end of it. :oops:
I have an 80386SX 20MHz 2MB RAM.
It is my testbed platform. Only has the 3.5" and 5.25" floppy drives.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

uglyoldbob wrote:Nevermind. The configure script for binutils didn't like the command line given in the wiki because it had make all install at the end of it. :oops:
Er, the wiki is not at fault here. You put together two commands on one line while the wiki says otherwise :roll:
**Said by someone who didnt read the page correctly himself the first time :oops: :wink:**
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply