This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

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) $(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) $(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 $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$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 $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$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) $(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}
+      echo " "${INCLUDES}
       ;;
     --install-cxx)
       CXX=${PREFIX_DIR}/bin/g++


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]