[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How AC_PROG_CC find the cross-compiler?

From: Tzu-Chien Chiu
Subject: Re: How AC_PROG_CC find the cross-compiler?
Date: Tue, 25 Jul 2006 21:42:49 +0800

Thank you. It works now.

But I am confused. Are the definitions of build, host and target (to
configure script) different in the cases:
(1) building the cross-compiler
(2) building a software with a cross-compiler

In (1), target is used to specify where the built program will run.
But in (2), host instead is used.

2006/7/25, Keith MARSHALL <address@hidden>:
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).


Tzu-Chien Chiu - SMedia Technology Corp.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]