autoconf-patches
[Top][All Lists]
Advanced

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

Re: Warn on naked cross-tool names, add macros to detect target tools


From: Paolo Bonzini
Subject: Re: Warn on naked cross-tool names, add macros to detect target tools
Date: Thu, 18 Mar 2004 09:15:56 +0100

> I think this is unnecessarily restrictive.  One case it would hurt a
> bit is compiling for instance on build=i386-pc-linux-gnu for
> host=i686-pc-linux-gnu.  This is a cross compile in the sense that the
> tuples are not the same and the host code won't run on the build
> system, but it can almost certainly use the build system native tools.

I'm not sure.  What guarantees that the host cc will be passed the correct
options to generate i686 code?  It can be also a matter of correctness because
of instructions like xadd and cmpxchg that are necessary in SMP (or in general
multithread) synchronization code.

Also, what about compiling on build=i686 for host=i386?  Then compiling a
simple test program will work, but a more complex one may case problems like
using new instructions (cmov) or sse math.

Something that you could do, and that is more guaranteed to work, is to pass
CFLAGS to the configure script, or to create a very simple wrapper called
i686-pc-linux-gnu-gcc that does

    #! /bin/sh
    gcc -mtune=i686 -march=i686 -fpmath=sse -mmmx "$@"

In particular I do this for i686-pc-mingw32-gcc doing

    #! /bin/sh
    gcc -mno-cygwin "$@"

I don't know how much this is widespread, so if the patch is accepted the
deprecation period, during which people can complain, will help.

Paolo







reply via email to

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