autoconf
[Top][All Lists]
Advanced

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

Re: Autoconf will (not?) detect cross-tools unprefixed


From: Eric Blake
Subject: Re: Autoconf will (not?) detect cross-tools unprefixed
Date: Sat, 06 Sep 2008 13:55:39 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bob Friesenhahn on 9/3/2008 8:53 AM:
> I think that the documentation should skip the rationale behind the
> behavior and should only document what the software does.  It should be
> clear about how tools are expected to be named.  The warnings should
> sound dire.
> 
> The idea that selecting the wrong programs might "lead to some bugs" is
> kind of funny.  Using the wrong tools may in fact build bug-free
> software which runs great on a completely different operating system or
> hardware target.

I don't know if I can please everyone, but here's what I finally settled
on; this commit is now pushed:

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjC4DsACgkQ84KuGfSFAYD5dgCgrY67v3+IyARuT1GnU/7aKrVW
w5UAn2DTBojWammt2MjDsPizzXE+touW
=GQrU
-----END PGP SIGNATURE-----
>From 69a905148d6797a79ceb801c428644b9fa450a84 Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Sat, 6 Sep 2008 13:20:58 -0600
Subject: [PATCH] Relax tone when warning about cross-compiler names.

* lib/autoconf/programs.m4 (_AC_TOOL_WARN): Support cross-compiles
with poorly named tools; the issue has been reported too many
times in the last four years to pull support.
* doc/autoconf.texi (Specifying Names, Generic Programs): Update
documentation accordingly.
* THANKS: Update.
Reported by Josef Tran and others, wording suggested by Ralf
Wildenhues.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog                |   12 ++++++++++++
 THANKS                   |    1 +
 doc/autoconf.texi        |   36 +++++++++++++++++++-----------------
 lib/autoconf/programs.m4 |    4 +---
 4 files changed, 33 insertions(+), 20 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f78c40f..1ad89f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2008-09-06  Eric Blake  <address@hidden>
+
+       Relax tone when warning about cross-compiler names.
+       * lib/autoconf/programs.m4 (_AC_TOOL_WARN): Support cross-compiles
+       with poorly named tools; the issue has been reported too many
+       times in the last four years to pull support.
+       * doc/autoconf.texi (Specifying Names, Generic Programs): Update
+       documentation accordingly.
+       * THANKS: Update.
+       Reported by Josef Tran and others, wording suggested by Ralf
+       Wildenhues.
+
 2008-09-01  Eric Blake  <address@hidden>
 
        Improve AC_C_BIGENDIAN.
diff --git a/THANKS b/THANKS
index 906ed17..afdd697 100644
--- a/THANKS
+++ b/THANKS
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 23417b3..97f09d7 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -4034,8 +4034,8 @@ Generic Programs
 @var{path}, or otherwise to @samp{ranlib} if that program exists in
 @var{path}, or to @samp{:} if neither program exists.
 
-In the future, when cross-compiling this macro will @emph{only}
-accept program names that are prefixed with the host type.
+When cross-compiling, this macro will issue a warning if no program
+prefixed with the host type could be found.
 For more information, see @ref{Specifying Names, , Specifying the
 system type}.
 @end defmac
@@ -4068,8 +4068,10 @@ Generic Programs
 @var{value-if-not-found} is not specified, the value of @var{variable}
 is not changed.  Calls @code{AC_SUBST} for @var{variable}.
 
-In the future, when cross-compiling this macro will @emph{not}
-accept program names that are not prefixed with the host type.
+When cross-compiling, this macro will issue a warning if no program
+prefixed with the host type could be found.
+For more information, see @ref{Specifying Names, , Specifying the
+system type}.
 @end defmac
 
 @anchor{AC_PATH_PROG}
@@ -4145,8 +4147,10 @@ Generic Programs
 Like @code{AC_CHECK_TOOL}, but set @var{variable} to the absolute
 name of the program if it is found.
 
-In the future, when cross-compiling this macro will @emph{not}
-accept program names that are not prefixed with the host type.
+When cross-compiling, this macro will issue a warning if no program
+prefixed with the host type could be found.
+For more information, see @ref{Specifying Names, , Specifying the
+system type}.
 @end defmac
 
 
@@ -17731,17 +17735,15 @@ Specifying Names
 ./configure CC=m68k-coff-gcc
 @end example
 
-In the future, when cross-compiling Autoconf will @emph{not}
-accept tools (compilers, linkers, assemblers) whose name is not
-prefixed with the host type.  The only case when this may be
-useful is when you really are not cross-compiling, but only
-building for a least-common-denominator architecture: an example
-is building for @code{i386-pc-linux-gnu} while running on an
address@hidden architecture.  In this case, some particular
-pairs might be similar enough to let you get away with the system
-compilers, but in general the compiler might make bogus assumptions
-on the host: if you know what you are doing, please create symbolic
-links from the host compiler to the build compiler.
+When cross-compiling, @command{configure} will warn about any tools
+(compilers, linkers, assemblers) whose name is not prefixed with the
+host type.  This is an aid to users performing cross-compilation.
+Continuing the example above, if a cross-compiler named @command{cc} is
+used with a native @command{pkg-config}, then libraries found by
address@hidden will likely cause subtle build failures; but using
+the names @command{m68k-coff-cc} and @command{m68k-coff-pkg-config}
+avoids any confusion.  Avoiding the warning is as simple as creating the
+correct symlinks naming the cross tools.
 
 @cindex @command{config.sub}
 @command{configure} recognizes short aliases for many system types; for
diff --git a/lib/autoconf/programs.m4 b/lib/autoconf/programs.m4
index f2245fb..63f8a13 100644
--- a/lib/autoconf/programs.m4
+++ b/lib/autoconf/programs.m4
@@ -211,9 +211,7 @@ AU_DEFUN([AC_CHECK_TOOL_PREFIX])
 AC_DEFUN([_AC_TOOL_WARN],
 [case $cross_compiling:$ac_tool_warned in
 yes:)
-AC_MSG_WARN([In the future, Autoconf will not detect cross-tools
-whose name does not start with the host triplet.  If you think this
-configuration is useful to you, please write to address@hidden)
+AC_MSG_WARN([using cross tools not prefixed with host triplet])
 ac_tool_warned=yes ;;
 esac])
 
-- 
1.6.0


reply via email to

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