[Top][All Lists]

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

Re: building native tools in a cross-compile environment

From: Ralf Corsepius
Subject: Re: building native tools in a cross-compile environment
Date: 19 Jun 2002 06:23:24 +0200

Am Mit, 2002-06-19 um 04.36 schrieb Harlan Stenn:
> I've been looking thru the docs and I I haven't found a way to do the
> following.
> I am using automake and autoconf.
> I am assuming:
> - "build" means the arch of the build machine
> - "host" the arch of the place where built stuff gets run
> autoconf detects build != host and sets up for a cross-compile.
> This is a Good Thing, and CC=host_cpu-host_vendor-host_os-gcc when I am
> cross-compiling.
> However, I am coming across a case where the software package has some
> tools that are designed to be used as part of the build process and
> therefore need to use build-cc instead of host-cc.
Welcome to the wonderful world of mixed-cross compilation :)
> So how do I tell automake that for some PROGRAMS it should use host-cc
> instead of build-cc?
This is an autoconf problem, not an automake one.

The short answer is: It currently is not possible without further

One way to accomplish this is to:
1. Separate each of such directories into separate config-subdirs.
2. Implement a toplevel configure-script to parse build/host/target and
to setup build/host/target for each config-subdir individually.

One example of how I apply this approach can be found inside of the
toplevel configure of RTEMS:

Another example using this approach is the toplevel configure script of
the unified GNU-toolchain.

Another (IMO hackerish) approach would be to apply tricks with
presetting CC inside of tools's config-subdirs. E.g. to pub something
similar to this into the configure.acs of build-host-compiled



reply via email to

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