DJ Delorie - configury patch to manage whitespace (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: DJ Delorie
- To: gcc-patches at gcc dot gnu dot org, newlib at sourceware dot org, binutils at sourceware dot org
- Date: Tue, 6 Feb 2007 23:32:32 -0500
- Subject: configury patch to manage whitespace
This is an attempt to work around the "value has changed since previous run" message that autoconf sometimes emits. I've been told that autoconf 2.60 manages variables in sub-configures differently, which may (perhaps should) also fix this problem.
Note that the intent of this patch is to avoid adding whitespace where it's not needed, such as double spaces between words or spaces at the end, so that if the value is improperly quoted, the shell won't change the value.
Is this a direction we want to go in? Or should we begin to look at migrating to a newer autoconf?
Index: Makefile.tpl
--- Makefile.tpl (revision 121678) +++ Makefile.tpl (working copy) @@ -356,9 +356,17 @@ COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_ # CFLAGS will be just -g. We want to ensure that TARGET libraries # (which we know are built with gcc) are built with optimizations so # prepend -O2 when setting CFLAGS_FOR_TARGET. +ifneq ($(SYSROOT_CFLAGS_FOR_TARGET),) CFLAGS_FOR_TARGET = -O2 (CFLAGS)(CFLAGS) (CFLAGS)(SYSROOT_CFLAGS_FOR_TARGET) +else +CFLAGS_FOR_TARGET = -O2 $(CFLAGS) +endif SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ +ifneq ($(SYSROOT_CFLAGS_FOR_TARGET),) CXXFLAGS_FOR_TARGET = (CXXFLAGS)(CXXFLAGS) (CXXFLAGS)(SYSROOT_CFLAGS_FOR_TARGET) +else +CXXFLAGS_FOR_TARGET = $(CXXFLAGS) +endif LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates LDFLAGS_FOR_TARGET = Index: configure.in
--- configure.in (revision 121678)
+++ configure.in (working copy)
@@ -2418,7 +2418,7 @@ GCC_TARGET_TOOL(ar, AR_FOR_TARGET, AR, [
GCC_TARGET_TOOL(as, AS_FOR_TARGET, AS, [gas/as-new])
GCC_TARGET_TOOL(cc, CC_FOR_TARGET, CC, [gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/])
GCC_TARGET_TOOL(c++, CXX_FOR_TARGET, CXX,
- [gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ test ! -f <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow></mrow><annotation encoding="application/x-tex"></annotation></semantics></math></span><span class="katex-html" aria-hidden="true"></span></span>r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mi>S</mi><mi>H</mi><mi>E</mi><mi>L</mi><mi>L</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(SHELL) </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.05764em;">S</span><span class="mord mathnormal" style="margin-right:0.08125em;">H</span><span class="mord mathnormal" style="margin-right:0.05764em;">E</span><span class="mord mathnormal">LL</span><span class="mclose">)</span></span></span></span>$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes
-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs],
+ [gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++test ! -f <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow></mrow><annotation encoding="application/x-tex"></annotation></semantics></math></span><span class="katex-html" aria-hidden="true"></span></span>r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mi>S</mi><mi>H</mi><mi>E</mi><mi>L</mi><mi>L</mi><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(SHELL) </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord mathnormal" style="margin-right:0.05764em;">S</span><span class="mord mathnormal" style="margin-right:0.08125em;">H</span><span class="mord mathnormal" style="margin-right:0.05764em;">E</span><span class="mord mathnormal">LL</span><span class="mclose">)</span></span></span></span>$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes
-L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs],
c++)
GCC_TARGET_TOOL(c++ for libstdc++, RAW_CXX_FOR_TARGET, CXX,
[gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs],
Index: config/mt-gnu
--- config/mt-gnu (revision 121678) +++ config/mt-gnu (working copy) @@ -1 +1,5 @@ +ifneq ($(SYSROOT_CFLAGS_FOR_TARGET),) CXXFLAGS_FOR_TARGET = (CXXFLAGS)(CXXFLAGS) (CXXFLAGS)(SYSROOT_CFLAGS_FOR_TARGET) -D_GNU_SOURCE +else +CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE +endif Index: libstdc++-v3/scripts/testsuite_flags.in
--- libstdc++-v3/scripts/testsuite_flags.in (revision 121678) +++ libstdc++-v3/scripts/testsuite_flags.in (working copy) @@ -36,7 +36,7 @@ case ${query} in --build-includes) INCLUDES="-nostdinc++ @GLIBCXX_INCLUDES@ -I${SRC_DIR}/include/backward -I${SRC_DIR}/testsuite/util"
echo ${INCLUDES}
--install-cxx) CXX=${PREFIX_DIR}/bin/g++echo " "${INCLUDES} ;;
- Follow-Ups:
- Re: configury patch to manage whitespace
* From: Paolo Bonzini - Re: configury patch to manage whitespace
* From: Daniel Jacobowitz
- Re: configury patch to manage whitespace
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |