]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Document better where to put -m32 or -m64 compiler options.
authorBruno Haible <bruno@clisp.org>
Tue, 1 Dec 2020 21:42:17 +0000 (22:42 +0100)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 1 Dec 2020 23:18:46 +0000 (15:18 -0800)
* doc/autoconf.texi (Preset Output Variables): Clarify that options -m32 or -m64
must go into CC, not CFLAGS and not CPPFLAGS either. This is needed because on
bi-arch platforms, config.guess runs $CC without $CFLAGS nor $CPPFLAGS.

doc/autoconf.texi

index 9ba182af97394355dd511580be9ee25d59ba06f1..d0865c1e25bb8db92ec985d910dfe721c16ba700 100644 (file)
@@ -2605,9 +2605,18 @@ instead.  If it affects only the linker (e.g., @option{-L@var{directory}}),
 it should be put into @code{LDFLAGS} instead.  If it
 affects only the compiler proper, @code{CFLAGS} is the natural home for
 it.  If an option affects multiple phases of the compiler, though,
-matters get tricky.  One approach to put such options directly into
-@code{CC}, e.g., @code{CC='gcc -m64'}.  Another is to put them into both
-@code{CPPFLAGS} and @code{LDFLAGS}, but not into @code{CFLAGS}.
+matters get tricky:
+
+@itemize @bullet
+@item
+If an option selects a 32-bit or 64-bit build on a bi-arch system, it
+must be put direcly into @code{CC}, e.g., @code{CC='gcc -m64'}.  This is
+necessary for @code{config.guess} to work right.
+@item
+Otherwise one approach is to put the option into @code{CC}.  Another is
+to put it into both @code{CPPFLAGS} and @code{LDFLAGS}, but not into
+@code{CFLAGS}.
+@end itemize
 
 However, remember that some @file{Makefile} variables are reserved by
 the GNU Coding Standards for the use of the ``user''---the person