summaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorPatrik Hagglund <patrik.h.hagglund@ericsson.com>2013-02-04 08:15:53 +0000
committerPatrik Hagglund <patrik.h.hagglund@ericsson.com>2013-02-04 08:15:53 +0000
commit6c440fcea52e27b3befcf2ad5f7dcc58a15a2e58 (patch)
tree0c9fb20caea3bdc811604281d25d7bd76a075617 /autoconf
parent9c02a276049cbd1d1511a88ebc7a22bb33658237 (diff)
Pass CPPFLAGS/CFLAGS/CXXFLAGS from the environment of configure to
Makefile.config. This is implied at the bottom of the help text of configure (besides CC/CXX/LDFLAGS, already passed to Makefile.config). For backward compatibility, the values of CFLAGS and CXXFLAGS defaults to empty, overriding the default values provided by autoconf (for example, '-g -O2' when CC=gcc'). $(CPP) is not used by our makefiles. Therefore, the value of CPP is not passed to Makefile.config, despite beeing mentioned by 'configure --help'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174313 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 4ca4eb9042d..4c3af79edcd 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -59,6 +59,11 @@ if test ${srcdir} != "." ; then
fi
fi
+dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS,
+dnl instead of the autoconf default (for example, '-g -O2' for CC=gcc).
+${CFLAGS=}
+${CXXFLAGS=}
+
dnl We need to check for the compiler up here to avoid anything else
dnl starting with a different one.
AC_PROG_CC(clang llvm-gcc gcc)