[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CFLAGS is for the user in GNU
From: |
Karl Berry |
Subject: |
CFLAGS is for the user in GNU |
Date: |
Sun, 1 Feb 2009 18:12:13 -0600 |
The description of CFLAGS in the Autoconf manual omits the most
important point about it. To quote the coding standards
(make-stds.texi):
If there are C compiler options that @emph{must} be used for proper
compilation of certain files, do not include them in @code{CFLAGS}.
Users expect to be able to specify @code{CFLAGS} freely themselves.
I would write a patch for it, but I'm not sure if there is a variable to
suggest for such required options for the C compiler proper these days.
Maybe it never comes up in practice?
karl
(autoconf)Preset Output Variables:
...
-- Variable: CFLAGS
Debugging and optimization options for the C compiler. If it is
not set in the environment when `configure' runs, the default
value is set when you call `AC_PROG_CC' (or empty if you don't).
`configure' uses this variable when compiling or linking programs
to test for C features.
If a compiler option affects only the behavior of the preprocessor
(e.g., `-D NAME'), it should be put into `CPPFLAGS' instead. If
it affects only the linker (e.g., `-L DIRECTORY'), it should be
put into `LDFLAGS' instead. If it affects only the compiler
proper, `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 `CC', e.g., `CC='gcc
-m64''. Another is to put them into both `CPPFLAGS' and
`LDFLAGS', but not into `CFLAGS'.
...
- CFLAGS is for the user in GNU,
Karl Berry <=
- Re: CFLAGS is for the user in GNU, Ralf Corsepius, 2009/02/01
- Re: CFLAGS is for the user in GNU, Karl Berry, 2009/02/02
- Re: CFLAGS is for the user in GNU, Eric Blake, 2009/02/03
- Re: CFLAGS is for the user in GNU, Eric Blake, 2009/02/03
- Re: CFLAGS is for the user in GNU, Karl Berry, 2009/02/03
- Re: CFLAGS is for the user in GNU, Ralf Wildenhues, 2009/02/16
- Re: CFLAGS is for the user in GNU, Karl Berry, 2009/02/16