On Mon, 9 Jul 2001, Roy T. Fielding wrote:
> I agree that $host should be used, but $OS is not the same as $host.
I don't follow, this is from configure.in:
AC_CANONICAL_SYSTEM
echo "Configuring APR library"
OS=$host
echo "Platform: $OS"
I guess I don't follow why OS exists at all, why not replace
it with $host in configure.in?
> I'll try replacing host_alias when I get a chance.
The patch I posted should do the trick.
> Looking at the autoconf code, though, I am wondering if we should be
> using $target instead.
No, an application should not concern itself with $target. Only
a compiler/debugger/simulator that could deal with some cross
case needs to worry about $target.
This is an area of widespread confusion. Here is the way things
are meant to work (despite what you might have heard).
--build=TRIPLE
Triple for the system a package is built on.
--host=TRIPLE
Triple for the system the compiled package will be hosted on.
--target=TRIPLE
Triple for the system the package will target.
For example, if you wanted to cross compile an application
that would run under Win32 from Linux, you could run:
.../configure --build=i386-pc-linux-gnu --host=i686-pc-windows32-msvcrt
Now, you should not actually need to pass --build to make this
work, but it is a bug/feature of autoconf 2.13 that is
kept around in autoconf 2.50 for backwards compatibility
(except that there is an exception that I will not mention here).
One should only use --target in the case where you are building
a tool that needs to be cross compiled and needs to target
a different arch than the --host. For example:
.../configure --build=i386-pc-linux-gnu --host=i686-pc-windows32-msvcrt \
--target=sparc-sun-solaris2.6
This would build a windows executable (under Linux) that could
understand Solaris Sparc executables, object files, and the like:
Mo DeJong
Red Hat Inc