From 6c440fcea52e27b3befcf2ad5f7dcc58a15a2e58 Mon Sep 17 00:00:00 2001 From: Patrik Hagglund Date: Mon, 4 Feb 2013 08:15:53 +0000 Subject: 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 --- autoconf/configure.ac | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'autoconf') diff --git a/autoconf/configure.ac b/autoconf/configure.ac index 4ca4eb9042..4c3af79edc 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) -- cgit v1.2.3