From: Eric Blake Date: Fri, 21 Mar 2008 19:27:01 +0000 (-0600) Subject: Document more uses of $cross_compiling. X-Git-Tag: v2.62~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6893b8be8a760345c1af22dad7b7751aa7e87973;p=thirdparty%2Fautoconf.git Document more uses of $cross_compiling. * doc/autoconf.texi (Runtime): Document that a temporary override is permissible. * THANKS: Update. Reported by Ineiev, example by Ralf Wildenhues. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 97e8ddc5..ef48fbff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-03-21 Eric Blake + Document more uses of $cross_compiling. + * doc/autoconf.texi (Runtime): Document that a temporary override + is permissible. + * THANKS: Update. + Reported by Ineiev, example by Ralf Wildenhues. + Don't swallow $1 in textual local variables. * lib/m4sugar/m4sugar.m4 (m4_combine): Don't use overquoting and expansion of text arguments, as that swallows $1. diff --git a/THANKS b/THANKS index 84d2cdba..a561cfbb 100644 --- a/THANKS +++ b/THANKS @@ -139,6 +139,7 @@ Ian Lance Taylor ian@cygnus.com Ian Macdonald iamacdo@telkomsa.net Ian Redfern Ian.Redfern@logicacmg.com Ilya Zakharevich ilya@Math.Berkeley.EDU +Ineiev ineiev@yahoo.co.uk Iohannes m zmoelnig zmoelnig@iem.at J C Fitzgerald v7022@wave.co.nz Jaap Haitsma jaap@haitsma.org diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 0710397f..a32e7790 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -8371,6 +8371,21 @@ you can test whether the shell variable @code{cross_compiling} is set to @samp{yes}, and then use an alternate method to get the results instead of calling the macros. +It is also permissible to temporarily assign to @code{cross_compiling} +in order to force tests to behave as though they are in a +cross-compilation environment, particularly since this provides a way to +test your @var{action-if-cross-compiling} even when you are not using a +cross-compiler. + +@example +# We temporarily set cross-compile mode to force AC_COMPUTE_INT +# to use the slow link-only method +save_cross_compiling=$cross_compiling +cross_compiling=yes +AC_COMPUTE_INT([@dots{}]) +cross_compiling=$save_cross_compiling +@end example + A C or C++ runtime test should be portable. @xref{Portable C and C++}.