On Thu, 10 Feb 2000 14:33:45 -0500, Philip Hall wrote:
> I tried to make a cross compiler on my intel box for a
> strongarm cross tools chain.
> I finally gave up on that idea.
Too bad, it really isn't that difficult.
> Now i am trying to install binutils-2.9.5.0.22, gcc-2.95.2
> on a running netwinder.
> The system already has an older version of these tools,
> and I wish to install the new ones in /usr/local.
> I configured binutils and installed it.
> here is the info from the top of the Makefile
> for binutils.
>
> # This file was generated automatically by configure. Do not edit.
> VPATH = .
> links =
> host_alias = armv4l-unknown-linux-gnu
> host_cpu = armv4l
> host_vendor = unknown
> host_os = linux-gnu
> host_canonical = armv4l-unknown-linux-gnu
> target_alias = armv4l-unknown-linux-gnu
> target_cpu = armv4l
> target_vendor = unknown
> target_os = linux-gnu
> target_canonical = armv4l-unknown-linux-gnu
> build_alias = armv4l-unknown-linux-gnu
> build_cpu = armv4l
> build_vendor = unknown
> build_os = linux-gnu
> build_canonical = armv4l-unknown-linux-gnu
>
> here is the output of ld -V
> ld -V
> GNU ld version 2.9.5 (with BFD 2.9.5.0.22)
> Supported emulations:
> armelf_linux
> armelf_linux26
> armelf
>
> here is the error when I try to configure gcc-2.95.2
>
> Configuring for a armv4l-unknown-linux-gnu host.
> Created "Makefile" in /home/phil/work/gcc-2.95.2 using "mt-frag"
> /usr/local/bin/ld: unrecognised emulation mode: elf32arm
> Supported emulations: armelf_linux armelf_linux26 armelf
> collect2: ld returned 1 exit status
> *** The command 'gcc -o conftest -g -O2 conftest.c' failed.
> *** You must set the environment variable CC to a working compiler.
/usr/local/bin is first in your path, so /usr/local/bin/ld comes before
/usr/bin/ld. The ARM target is renamed for the newer binutils. Your
current compiler (gcc-2.8.1) doesn't know about it and uses the newer ld
as if it were the old one.
This should do the trick (I haven't tried it on Netwinder, but it works on
Sun SunOS 4.1.4 and SGI IRIX 5.3):
- remove the new binutils from /usr/local/bin
- configure the binutils with the extra option --program-prefix=g
- build and install binutils (make ; make install)
- configure gcc with the extra options --with-gnu-ld=/usr/local/bin/gld
--with-gnu-as=/usr/local/bin/gas
- build and install gcc (make bootstrap ; make install)
You can also consider giving a --program-prefix to gcc so you are able to
choose between the old and the new compiler (gcc vs. ggcc).
Erik
--
Computers run on faith, not electrons. -- T.N. Thompson
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++ Please use [EMAIL PROTECTED] for ++
++ kernel-related discussions. ++