http://llvm.org/bugs/show_bug.cgi?id=16724
Bug ID: 16724
Summary: configure script errors in llvm-3.3 and current trunk
cause --enable-optimize to not be used and instead
continue to use CFLAGS set by build environment
Product: Build scripts
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: autoconf
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Found downstream: https://trac.macports.org/ticket/39761
If you set CFLAGS="-O2 -pipe" when configuring llvm, you'll see something like:
./configure: line 1990: -O2: command not found
./configure: line 1991: -O2: command not found
And -O2 will be preferred over the value passed to --enable-optimize
Those lines of the configure script are just:
${CFLAGS=}
${CXXFLAGS=}
which come from this in configure.ac:
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=}
which was a bug introduced by this commit:
commit 6c440fcea52e27b3befcf2ad5f7dcc58a15a2e58
Author: Patrik Hagglund <[email protected]>
Date: Mon Feb 4 08:15:53 2013 +0000
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
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs