This is the mail archive of the gcc-patches@gcc.gnu.org mailing 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]

[toplevel] PR/18222 Fix definition of target's CPPFLAGS


[I forgot to attach patch 1st time]

CPPFLAGS should only have items that pertain to the preprocessor.

This patch

http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01736.html

changed it to have all of CFLAGS, which was causing bootstrap problems
as CPPFLAGS is precious according to autoconf and was getting redefined.

This adds in a new overrideable CPPFLAGS_FOR_TARGET, which will
hopefully fulfill Sean's purpose for his original patch.

Although I don't have an Alpha to test on, I think this should eliminate
the bootstrap problem for PR/18222.  Regardless the current definition
of the target's CPPFLAGS is clearly incorrect.

Bootstrapped i686-pc-cygwin

OK to install?

2005-01-13  Kelley Cook  <kcook@gcc.gnu.org>

	PR bootstrap/18222
	* Makefile.def: Pass CPPFLAGS_FOR_TARGET.
	* Makefile.tpl: Define target CPPFLAGS on CPPFLAGS_FOR_TARGET.
	* Makefile.in: Regenerate.

diff -pud /home/kcook34/gcc-orig/Makefile.def /home/kcook34/gcc-snapshot/Makefile.def
--- /home/kcook34/gcc-orig/Makefile.def	2005-01-03 09:01:12.000000000 -0500
+++ /home/kcook34/gcc-snapshot/Makefile.def	2005-01-13 13:22:26.885772700 -0500
@@ -218,6 +218,7 @@ flags_to_pass = { flag= AR_FOR_TARGET ; 
 flags_to_pass = { flag= AS_FOR_TARGET ; };
 flags_to_pass = { flag= CC_FOR_TARGET ; };
 flags_to_pass = { flag= CFLAGS_FOR_TARGET ; };
+flags_to_pass = { flag= CPPFLAGS_FOR_TARGET ; };
 flags_to_pass = { flag= CXX_FOR_TARGET ; };
 flags_to_pass = { flag= CXXFLAGS_FOR_TARGET ; };
 flags_to_pass = { flag= DLLTOOL_FOR_TARGET ; };
diff -pud /home/kcook34/gcc-orig/Makefile.tpl /home/kcook34/gcc-snapshot/Makefile.tpl
--- /home/kcook34/gcc-orig/Makefile.tpl	2005-01-03 09:01:12.000000000 -0500
+++ /home/kcook34/gcc-snapshot/Makefile.tpl	2005-01-13 13:11:04.589416100 -0500
@@ -201,7 +201,7 @@ BASE_TARGET_EXPORTS = \
 	CC="$(CC_FOR_TARGET)"; export CC; \
 	CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-	CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+	CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
 	CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
 	GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
 	GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
diff -pud /home/kcook34/gcc-orig/Makefile.in /home/kcook34/gcc-snapshot/Makefile.in
--- /home/kcook34/gcc-orig/Makefile.in	2005-01-03 09:01:13.000000000 -0500
+++ /home/kcook34/gcc-snapshot/Makefile.in	2005-01-13 13:22:37.000000000 -0500
@@ -198,7 +198,7 @@ BASE_TARGET_EXPORTS = \
 	CC="$(CC_FOR_TARGET)"; export CC; \
 	CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
-	CPPFLAGS="$(CFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+	CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
 	CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
 	GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \
 	GFORTRAN="$(GFORTRAN_FOR_TARGET)"; export GFORTRAN; \
@@ -552,6 +552,7 @@ BASE_FLAGS_TO_PASS = \
 	"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
 	"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
 	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+	"CPPFLAGS_FOR_TARGET=$(CPPFLAGS_FOR_TARGET)" \
 	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
 	"CXXFLAGS_FOR_TARGET=$(CXXFLAGS_FOR_TARGET)" \
 	"DLLTOOL_FOR_TARGET=$(DLLTOOL_FOR_TARGET)" \

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