[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How AC_PROG_CC find the cross-compiler?
From: |
Keith MARSHALL |
Subject: |
Re: How AC_PROG_CC find the cross-compiler? |
Date: |
Tue, 25 Jul 2006 14:17:58 +0100 |
Tzu-Chien Chiu wrote:
> The problem is that 'configure' script incorrectly finds the host C
> compiler (gcc) when the cross compiler (or32-elf-gcc) should be found.
> ...
>
> $ ./configure --target=or32-elf
> checking build system type... i686-pc-cygwin
> checking host system type... i686-pc-cygwin
> checking target system type... or32-unknown-elf
> checking for gcc... gcc
Why do you expect that to look for `or32-elf-gcc'? You are configuring
for a build == host == i686-pc-cygwin, so this *isn't* cross compiling;
(you are creating executables to run on `host', *not* on `target').
Configure is correctly identifying the native `gcc' as the compiler to
create executables for your `host'; (that those executables themselves,
when you run them, will produce binaries for deployment on `target' is
incidental). To correctly invoke the cross compiler, you need:
./configure --build=i686-pc-cygwin --host=or32-elf
(N.B. `--host', *not* `--target', and it is recommended that you specify
*both* `--build' *and* `--host' to make your intention completely clear
to configure).
HTH,
Keith.