On May  6, 2000, "Gary V. Vaughan" <[EMAIL PROTECTED]> wrote:

> On Sat, May 06, 2000 at 12:35:34AM -0400, Pavel Roskin wrote:
>> It turns out that the following code from libtool.m4 is at fault:
>> 
>> case "$target" in

Yup, it's all wrong.  Libtool shouldn't care about the target, only
about the host.

>> Question 1. What has Libtool to do with "$target"? Libtool is a wrapper
>> around the compiler doing the build, not being built.

> Libtool needs to know whether the helper binaries it builds need to
> use a native compiler when it is configure to cross compile librarier
> to a different target.


When you use a cross compiler, it means you're building for a
different *host*, not target.  The host is the platform on which the
built program is going to run.  Build is the platform on which you're
building the program, and target is the platform for which the
compiler being built should generate code.  So libtool is only
concerned with host, not target.  I wonder how I let this one pass :-(

> If cross compiling to Windows, for example, impgen needs to run
> locally for dlls built for the target host.

When cross compiling to Windows, Windows is the `host'.  `target' only
makes sense for the toolchain, and it should never affect the way
libraries are created, because they'll never run on a target platform;
they'll only be created in the build platform and run on the host platform.



>> Question 2. If I'm missing something and more serious modifications are
>> not needed, shouldn't we write the following code instead?

> Looks good to me.  I'm committing it now.  Thanks.

We'll have to review this code and remove all references to target,
and use host wherever we currently refer to target.

-- 
Alexandre Oliva    Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me

Reply via email to