llvm.org GIT mirror llvm / 6c440fc
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 Patrik Hagglund 6 years ago
4 changed file(s) with 29 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
155155 # Path to the CC binary, which use used by testcases for native builds.
156156 CC := @CC@
157157
158 # C/C++ preprocessor flags.
159 CPPFLAGS += @CPPFLAGS@
160
161 # C compiler flags.
162 CFLAGS += @CFLAGS@
163
164 # C++ compiler flags.
165 CXXFLAGS += @CXXFLAGS@
166
158167 # Linker flags.
159 LDFLAGS+=@LDFLAGS@
168 LDFLAGS += @LDFLAGS@
160169
161170 # Path to the library archiver program.
162171 AR_PATH = @AR@
5757 AC_MSG_ERROR([Already configured in ${srcdir}])
5858 fi
5959 fi
60
61 dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS,
62 dnl instead of the autoconf default (for example, '-g -O2' for CC=gcc).
63 ${CFLAGS=}
64 ${CXXFLAGS=}
6065
6166 dnl We need to check for the compiler up here to avoid anything else
6267 dnl starting with a different one.
19801980 fi
19811981 fi
19821982
1983 ${CFLAGS=}
1984 ${CXXFLAGS=}
1985
19831986 ac_ext=c
19841987 ac_cpp='$CPP $CPPFLAGS'
19851988 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56055608 x86_64) TARGETS_TO_BUILD="X86 $TARGETS_TO_BUILD" ;;
56065609 sparc) TARGETS_TO_BUILD="Sparc $TARGETS_TO_BUILD" ;;
56075610 powerpc) TARGETS_TO_BUILD="PowerPC $TARGETS_TO_BUILD" ;;
5611 aarch64) TARGETS_TO_BUILD="AArch64 $TARGETS_TO_BUILD" ;;
56085612 arm) TARGETS_TO_BUILD="ARM $TARGETS_TO_BUILD" ;;
5609 aarch64) TARGETS_TO_BUILD="AArch64 $TARGETS_TO_BUILD" ;;
56105613 mips) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;;
56115614 mipsel) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;;
56125615 mips64) TARGETS_TO_BUILD="Mips $TARGETS_TO_BUILD" ;;
87158718 fi
87168719
87178720
8718 if test x"${enable_ltdl_install-no}" != xno; then
8721
8722
8723 if test x"${enable_ltdl_install-no}" != xno; then
87198724 INSTALL_LTDL_TRUE=
87208725 INSTALL_LTDL_FALSE='#'
87218726 else
87238728 INSTALL_LTDL_FALSE=
87248729 fi
87258730
8726 if test x"${enable_ltdl_convenience-no}" != xno; then
8731
8732
8733 if test x"${enable_ltdl_convenience-no}" != xno; then
87278734 CONVENIENCE_LTDL_TRUE=
87288735 CONVENIENCE_LTDL_FALSE='#'
87298736 else
1049010497 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1049110498 lt_status=$lt_dlunknown
1049210499 cat > conftest.$ac_ext <
10493 #line 10493 "configure"
10500 #line 10501 "configure"
1049410501 #include "confdefs.h"
1049510502
1049610503 #if HAVE_DLFCN_H
697697
698698 ``CFLAGS``
699699 Additional flags to be passed to the 'C' compiler.
700
701 ``CPPFLAGS``
702 Additional flags passed to the C/C++ preprocessor.
700703
701704 ``CXX``
702705 Specifies the path to the C++ compiler.