[cfe-dev] configure doesn't honor CPPFLAGS
James K. Lowden
jklowden at schemamania.org
Thu Apr 26 05:45:17 PDT 2012
On Thu, 26 Apr 2012 11:47:14 +0400
Konstantin Tokarev <annulen at yandex.ru> wrote:
> > My experiment building clang with gcc 4.6 on NetBSD today exposed a
> > problem in the clang build system: although I defined CPPFLAGS
> > before invoking configure, the variable wasn't used in the build.
> Shouldn't you use CXXFLAGS instead?
Not according to the autoconf documentation. The AC_LANG macro for
Do compilation tests using `CXX' and `CXXCPP' and use
extension `.C' for test programs. Use compilation flags:
`CPPFLAGS' with `CXXCPP', and both `CPPFLAGS' and `CXXFLAGS'
Under "Preset Output Variables" it says:
-- Variable: CPPFLAGS
Preprocessor options for the C, C++, Objective C, and Objective C++
preprocessors and compilers. If it is not set in the environment
when `configure' runs, the default value is empty. `configure'
uses this variable when preprocessing or compiling programs to
test for C, C++, Objective C, and Objective C++ features.
Is CXXFLAGS supported? It's not mentioned on the Getting Started page
More information about the cfe-dev