autoconf-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Improve behavior of AC_CHECK_TOOL; introduce AC_CHECK_TARGET


From: Nathanael Nerode
Subject: Re: [PATCH] Improve behavior of AC_CHECK_TOOL; introduce AC_CHECK_TARGET_TOOL.
Date: Mon, 13 Jan 2003 22:17:11 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b) Gecko/20030113

Peter Eisentraut wrote:
Nathanael Nerode writes:


It also introduces an AC_CHECK_TARGET_TOOL macro, which checks for tools
normally native to the target, an oddity needed in gcc and probably useful
in other compiler projects which include runtime support libraries.


I will not question why you need to know about a target tool during your
build process, but it indeed seems to be an oddity, because a target tool
would presumably run on the "host" platform which is in the general case
> not available during the build.  As such, I don't think this feature is
> suitable for general consumption.
You missed the point here. Suppose we're building a Canadian Cross of GCC, for instance:
build=i686-pc-linux-gnu
host=i386-cygwin
target=powerpc-eabi

To build the compiler proper you need tools running on the build machine and targeting cygwin, which will be found under names like i386-cygwin-cc. But to build the runtime libraries, you need tools running on the build machine and targeting powerpc, which will be found under names like powerpc-eabi-cc.

This is not to be confused with the version of gcc being *created*, which will run on the host machine and produce code for the target.

Also, consider a crossback:
build=i686-pc-linux-gnu
host=i386-cygwin
target=i686-pc-linux-gnu

Here, the tools to build the runtime libraries are in fact the native tools, and it's useful to *know* that.

The whole logic for that part would be much simpler, and would work better
in some corner cases, if I made AC_CHECK_TOOL & company depend on
AC_CANONICAL_HOST and AC_CANONICAL_BUILD, so I could just check whether
$host = $build.  However, I didn't want to add that dependency unless it
was considered desirable.


Well, if you need to evaluate the host and build identity then you need
to call AC_CANONICAL_HOST and AC_CANONICAL_BUILD.  That's the deal.

I'll be happy to submit that version of the patch, but I will not fix the testsuite for it, since I don't understand it well enough.

--Nathanael





reply via email to

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