[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: When crosscompiling, does configure really need --build?
From: |
Akim Demaille |
Subject: |
Re: When crosscompiling, does configure really need --build? |
Date: |
03 Oct 2002 13:56:16 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Honest Recruiter) |
| I'm using autoconf 2.53.
| When I run configure, I override CC and the like
| in the environment to point to my cross-compiler like this:
|
| CC=/opt/hardhat/devkit/ppc/405/bin/ppc_405-gcc
| AR=/opt/hardhat/devkit/ppc/405/bin/ppc_405-ar
| RANLIB=/opt/hardhat/devkit/ppc/405/bin/ppc_405-ranlib CFLAGS="-mcpu=403
| -D__PPC405__" ./configure --prefix=/
|
| Configuring without --host or --build yields the error
| "If you meant to cross compile, use `--host'."
|
| Configuring with --host but without --build yields the warning
| "configure: WARNING: If you wanted to set the --build type, don't use
| --host.
| If a cross compiler is detected then cross compile mode will be used."
|
| So I configure with both --host and --build, but that's really annoying,
| as I posted originally. I just can't win. How do I configure for
| cross-compiling
| without warnings or errors, and without hard-coding info about the build
| machine into my build scripts?
You are supposed to run this as:
./configure --prefix=/ --host=ppc_405 CFLAGS="-mcpu=403 -D__PPC405__"
You are to tell the configure that you are cross-compiling. It cannot
guess it, so it is entitled to fail. Please, read the documentation.