diff options
author | Bruno Haible <bruno@clisp.org> | 2020-12-01 22:42:17 +0100 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-12-01 15:18:46 -0800 |
commit | c540f91d8950f170fa8c0f0b91de6f1505e12118 (patch) | |
tree | 9bcbc6d6950b9e8076f7f42ca95ca28a6f8b4f92 | |
parent | d7b0636850624927a41dc801748d40c38513f0ab (diff) | |
download | autoconf-c540f91d8950f170fa8c0f0b91de6f1505e12118.tar.gz |
Document better where to put -m32 or -m64 compiler options.
* 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.
-rw-r--r-- | doc/autoconf.texi | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 9ba182af..d0865c1e 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -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 |