PR gdb/921
authorDaniel Jacobowitz <drow@false.org>
Wed, 22 Oct 2008 13:35:30 +0000 (13:35 +0000)
committerDaniel Jacobowitz <drow@false.org>
Wed, 22 Oct 2008 13:35:30 +0000 (13:35 +0000)
PR gdb/1646
PR gdb/2175
PR gdb/2176

* Makefile.def (flags_to_pass): Add CPPFLAGS_FOR_BUILD and CPPFLAGS.
* Makefile.tpl (BUILD_EXPORTS): Set CPPFLAGS.
(EXTRA_BUILD_FLAGS): Correct typo.  Pass CPPFLAGS.
(HOST_EXPORTS): Pass CPPFLAGS.
(CPPFLAGS_FOR_BUILD, CPPFLAGS, CPPFLAGS_FOR_TARGET): Define.
(LDFLAGS_FOR_TARGET): Initialize from configure script.
(EXTRA_TARGET_FLAGS): Set CPPFLAGS.
* Makefile.in, configure: Regenerated.
* configure.ac: Set CPPFLAGS_FOR_TARGET, LDFLAGS_FOR_TARGET,
and CPPFLAGS_FOR_BUILD.

libiberty/
* Makefile.in (CPPFLAGS): Define.
(FLAGS_TO_PASS, COMPILE.c): Add CPPFLAGS.

ChangeLog
Makefile.def
Makefile.in
Makefile.tpl
configure
configure.ac
libiberty/ChangeLog
libiberty/Makefile.in

index a811612ace8e207b57552d689d062a7d085f267c..85e2a74d776fdc3adcbf5a308c0ad1e3ab4318ac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2008-10-22  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       PR gdb/921
+       PR gdb/1646
+       PR gdb/2175
+       PR gdb/2176
+
+       * Makefile.def (flags_to_pass): Add CPPFLAGS_FOR_BUILD and CPPFLAGS.
+       * Makefile.tpl (BUILD_EXPORTS): Set CPPFLAGS.
+       (EXTRA_BUILD_FLAGS): Correct typo.  Pass CPPFLAGS.
+       (HOST_EXPORTS): Pass CPPFLAGS.
+       (CPPFLAGS_FOR_BUILD, CPPFLAGS, CPPFLAGS_FOR_TARGET): Define.
+       (LDFLAGS_FOR_TARGET): Initialize from configure script.
+       (EXTRA_TARGET_FLAGS): Set CPPFLAGS.
+       * Makefile.in, configure: Regenerated.
+       * configure.ac: Set CPPFLAGS_FOR_TARGET, LDFLAGS_FOR_TARGET,
+       and CPPFLAGS_FOR_BUILD.
+
 2008-09-29  Peter O'Gorman  <pogma@thewrittenword.com>
 
        * libtool.m4: Update to libtool 2.2.6.
index 832fc4236e9b878c154dbd341710b0f5a6e318c1..5abc54f2fa3a7dc9f8fc2034c379cda7517414ec 100644 (file)
@@ -208,6 +208,7 @@ flags_to_pass = { flag= target_alias ; };
 flags_to_pass = { flag= BISON ; };
 flags_to_pass = { flag= CC_FOR_BUILD ; };
 flags_to_pass = { flag= CFLAGS_FOR_BUILD ; };
+flags_to_pass = { flag= CPPFLAGS_FOR_BUILD ; };
 flags_to_pass = { flag= CXX_FOR_BUILD ; };
 flags_to_pass = { flag= EXPECT ; };
 flags_to_pass = { flag= FLEX ; };
@@ -232,6 +233,7 @@ flags_to_pass = { flag= BOOT_ADAFLAGS ; optional=true ; };
 flags_to_pass = { flag= BOOT_CFLAGS ; };
 flags_to_pass = { flag= BOOT_LDFLAGS ; };
 flags_to_pass = { flag= CFLAGS ; };
+flags_to_pass = { flag= CPPFLAGS ; };
 flags_to_pass = { flag= CXXFLAGS ; };
 flags_to_pass = { flag= LDFLAGS ; };
 flags_to_pass = { flag= LIBCFLAGS ; };
index 0305d28c9386a682e00cd9da605d7cc9c9a3c60e..aaf210be07b2183f06a1997015b3ec6b272dbd27 100644 (file)
@@ -137,6 +137,7 @@ BUILD_EXPORTS = \
        CC="$(CC_FOR_BUILD)"; export CC; \
        CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
        CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+       CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
        CXX="$(CXX_FOR_BUILD)"; export CXX; \
        CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
        GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
@@ -150,9 +151,10 @@ BUILD_EXPORTS = \
        WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC;
 
 # These variables must be set on the make command line for directories
-# built for the build system to override those in BASE_FLAGS_TO_PASSS.
+# built for the build system to override those in BASE_FLAGS_TO_PASS.
 EXTRA_BUILD_FLAGS = \
        CFLAGS="$(CFLAGS_FOR_BUILD)" \
+       CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
        LDFLAGS="$(LDFLAGS_FOR_BUILD)"
 
 # This is the list of directories to built for the host system.
@@ -172,6 +174,7 @@ HOST_EXPORTS = \
        ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+       CPPFLAGS="$(CFLAGS)"; export CPPFLAGS; \
        CXX="$(CXX)"; export CXX; \
        CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
        AR="$(AR)"; export AR; \
@@ -275,6 +278,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@
 AS_FOR_BUILD = @AS_FOR_BUILD@
 CC_FOR_BUILD = @CC_FOR_BUILD@
 CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
 CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
 CXX_FOR_BUILD = @CXX_FOR_BUILD@
 DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
@@ -336,6 +340,7 @@ GNATBIND = @GNATBIND@
 GNATMAKE = @GNATMAKE@
 
 CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
 LIBCFLAGS = $(CFLAGS)
 CXXFLAGS = @CXXFLAGS@
@@ -399,13 +404,14 @@ COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@
 COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@
 
 CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@
+CPPFLAGS_FOR_TARGET = @CPPFLAGS_FOR_TARGET@
 CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
 DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
 
 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
-LDFLAGS_FOR_TARGET = 
+LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@
 
 # ------------------------------------
 # Miscellaneous targets and flag lists
@@ -505,6 +511,7 @@ BASE_FLAGS_TO_PASS = \
        "BISON=$(BISON)" \
        "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
        "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+       "CPPFLAGS_FOR_BUILD=$(CPPFLAGS_FOR_BUILD)" \
        "CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
        "EXPECT=$(EXPECT)" \
        "FLEX=$(FLEX)" \
@@ -527,6 +534,7 @@ BASE_FLAGS_TO_PASS = \
        "BOOT_CFLAGS=$(BOOT_CFLAGS)" \
        "BOOT_LDFLAGS=$(BOOT_LDFLAGS)" \
        "CFLAGS=$(CFLAGS)" \
+       "CPPFLAGS=$(CPPFLAGS)" \
        "CXXFLAGS=$(CXXFLAGS)" \
        "LDFLAGS=$(LDFLAGS)" \
        "LIBCFLAGS=$(LIBCFLAGS)" \
@@ -617,6 +625,7 @@ EXTRA_TARGET_FLAGS = \
        'AS=$(COMPILER_AS_FOR_TARGET)' \
        'CC=$$(CC_FOR_TARGET)' \
        'CFLAGS=$$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
+       'CPPFLAGS=$$(CPPFLAGS_FOR_TARGET)' \
        'CXX=$$(CXX_FOR_TARGET)' \
        'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
        'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
index 051703eaa889000190bca4e637219ab1cbc16374..4847df6cbfffc86be6a59c04f642e368ebb8cb31 100644 (file)
@@ -140,6 +140,7 @@ BUILD_EXPORTS = \
        CC="$(CC_FOR_BUILD)"; export CC; \
        CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
        CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+       CPPFLAGS="$(CPPFLAGS_FOR_BUILD)"; export CPPFLAGS; \
        CXX="$(CXX_FOR_BUILD)"; export CXX; \
        CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
        GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
@@ -153,9 +154,10 @@ BUILD_EXPORTS = \
        WINDMC="$(WINDMC_FOR_BUILD)"; export WINDMC;
 
 # These variables must be set on the make command line for directories
-# built for the build system to override those in BASE_FLAGS_TO_PASSS.
+# built for the build system to override those in BASE_FLAGS_TO_PASS.
 EXTRA_BUILD_FLAGS = \
        CFLAGS="$(CFLAGS_FOR_BUILD)" \
+       CPPFLAGS="$(CPPFLAGS_FOR_BUILD)" \
        LDFLAGS="$(LDFLAGS_FOR_BUILD)"
 
 # This is the list of directories to built for the host system.
@@ -175,6 +177,7 @@ HOST_EXPORTS = \
        ADA_CFLAGS="$(ADA_CFLAGS)"; export ADA_CFLAGS; \
        CFLAGS="$(CFLAGS)"; export CFLAGS; \
        CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+       CPPFLAGS="$(CFLAGS)"; export CPPFLAGS; \
        CXX="$(CXX)"; export CXX; \
        CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
        AR="$(AR)"; export AR; \
@@ -278,6 +281,7 @@ AR_FOR_BUILD = @AR_FOR_BUILD@
 AS_FOR_BUILD = @AS_FOR_BUILD@
 CC_FOR_BUILD = @CC_FOR_BUILD@
 CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
 CXXFLAGS_FOR_BUILD = @CXXFLAGS_FOR_BUILD@
 CXX_FOR_BUILD = @CXX_FOR_BUILD@
 DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@
@@ -339,6 +343,7 @@ GNATBIND = @GNATBIND@
 GNATMAKE = @GNATMAKE@
 
 CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@
 LIBCFLAGS = $(CFLAGS)
 CXXFLAGS = @CXXFLAGS@
@@ -402,13 +407,14 @@ COMPILER_LD_FOR_TARGET=@COMPILER_LD_FOR_TARGET@
 COMPILER_NM_FOR_TARGET=@COMPILER_NM_FOR_TARGET@
 
 CFLAGS_FOR_TARGET = @CFLAGS_FOR_TARGET@
+CPPFLAGS_FOR_TARGET = @CPPFLAGS_FOR_TARGET@
 CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
 DEBUG_PREFIX_CFLAGS_FOR_TARGET = @DEBUG_PREFIX_CFLAGS_FOR_TARGET@
 
 LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
 LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
-LDFLAGS_FOR_TARGET = 
+LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@
 
 # ------------------------------------
 # Miscellaneous targets and flag lists
@@ -515,6 +521,7 @@ EXTRA_TARGET_FLAGS = \
        'AS=$(COMPILER_AS_FOR_TARGET)' \
        'CC=$$(CC_FOR_TARGET)' \
        'CFLAGS=$$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
+       'CPPFLAGS=$$(CPPFLAGS_FOR_TARGET)' \
        'CXX=$$(CXX_FOR_TARGET)' \
        'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)' \
        'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
index a8cf68074225f076793c15ed8b793be751a5a3df..dfeb45efc40667dd7ae54a2a1977c97f3271fc4f 100755 (executable)
--- a/configure
+++ b/configure
@@ -272,7 +272,7 @@ PACKAGE_STRING=
 PACKAGE_BUGREPORT=
 
 ac_unique_file="move-if-change"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TOPLEVEL_CONFIGURE_ARGUMENTS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET RPATH_ENVVAR GCC_SHLIB_SUBDIR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS TOPLEVEL_CONFIGURE_ARGUMENTS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET DEBUG_PREFIX_CFLAGS_FOR_TARGET CFLAGS_FOR_TARGET CXXFLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET LDFLAGS_FOR_TARGET RPATH_ENVVAR GCC_SHLIB_SUBDIR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs AR_FOR_BUILD AS_FOR_BUILD CC_FOR_BUILD CFLAGS_FOR_BUILD CPPFLAGS_FOR_BUILD CXXFLAGS_FOR_BUILD CXX_FOR_BUILD DLLTOOL_FOR_BUILD GCJ_FOR_BUILD GFORTRAN_FOR_BUILD LDFLAGS_FOR_BUILD LD_FOR_BUILD NM_FOR_BUILD RANLIB_FOR_BUILD WINDMC_FOR_BUILD WINDRES_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES WINDMC OBJCOPY OBJDUMP CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET WINDMC_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS'
 ac_subst_files='serialization_dependencies host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag'
 ac_pwd=`pwd`
 
@@ -5287,6 +5287,12 @@ if test "x$CXXFLAGS_FOR_TARGET" = x; then
 fi
 
 
+# Other target tools.
+CPPFLAGS_FOR_TARGET=${CPPFLAGS_FOR_TARGET-${CPPFLAGS}}
+
+LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET-${LDFLAGS}}
+
+
 # Handle --with-headers=XXX.  If the value is not "yes", the contents of
 # the named directory are copied to $(tooldir)/sys-include.
 if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
@@ -6034,6 +6040,7 @@ esac
 # our build compiler if desired.
 if test x"${build}" = x"${host}" ; then
   CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
+  CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
   CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
   LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
 fi
@@ -6112,6 +6119,7 @@ done
 
 
 
+
 # Generate default definitions for YACC, M4, LEX and other programs that run
 # on the build machine.  These are used if the Makefile can't locate these
 # programs in objdir.
@@ -12980,6 +12988,8 @@ s,@SYSROOT_CFLAGS_FOR_TARGET@,$SYSROOT_CFLAGS_FOR_TARGET,;t t
 s,@DEBUG_PREFIX_CFLAGS_FOR_TARGET@,$DEBUG_PREFIX_CFLAGS_FOR_TARGET,;t t
 s,@CFLAGS_FOR_TARGET@,$CFLAGS_FOR_TARGET,;t t
 s,@CXXFLAGS_FOR_TARGET@,$CXXFLAGS_FOR_TARGET,;t t
+s,@CPPFLAGS_FOR_TARGET@,$CPPFLAGS_FOR_TARGET,;t t
+s,@LDFLAGS_FOR_TARGET@,$LDFLAGS_FOR_TARGET,;t t
 s,@RPATH_ENVVAR@,$RPATH_ENVVAR,;t t
 s,@GCC_SHLIB_SUBDIR@,$GCC_SHLIB_SUBDIR,;t t
 s,@tooldir@,$tooldir,;t t
@@ -12996,6 +13006,7 @@ s,@AR_FOR_BUILD@,$AR_FOR_BUILD,;t t
 s,@AS_FOR_BUILD@,$AS_FOR_BUILD,;t t
 s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
 s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t
+s,@CPPFLAGS_FOR_BUILD@,$CPPFLAGS_FOR_BUILD,;t t
 s,@CXXFLAGS_FOR_BUILD@,$CXXFLAGS_FOR_BUILD,;t t
 s,@CXX_FOR_BUILD@,$CXX_FOR_BUILD,;t t
 s,@DLLTOOL_FOR_BUILD@,$DLLTOOL_FOR_BUILD,;t t
index fb859c110aeaf0c2dff1630d5495e36d435e837d..1915877aa735e720ca57f65d0f899e2965390bf1 100644 (file)
@@ -1743,6 +1743,12 @@ if test "x$CXXFLAGS_FOR_TARGET" = x; then
 fi
 AC_SUBST(CXXFLAGS_FOR_TARGET)
 
+# Other target tools.
+CPPFLAGS_FOR_TARGET=${CPPFLAGS_FOR_TARGET-${CPPFLAGS}}
+AC_SUBST(CPPFLAGS_FOR_TARGET)
+LDFLAGS_FOR_TARGET=${LDFLAGS_FOR_TARGET-${LDFLAGS}}
+AC_SUBST(LDFLAGS_FOR_TARGET)
+
 # Handle --with-headers=XXX.  If the value is not "yes", the contents of
 # the named directory are copied to $(tooldir)/sys-include.
 if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
@@ -2481,6 +2487,7 @@ esac
 # our build compiler if desired.
 if test x"${build}" = x"${host}" ; then
   CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD-${CFLAGS}}
+  CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-${CPPFLAGS}}
   CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}}
   LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}}
 fi
@@ -2546,6 +2553,7 @@ AC_SUBST(AR_FOR_BUILD)
 AC_SUBST(AS_FOR_BUILD)
 AC_SUBST(CC_FOR_BUILD)
 AC_SUBST(CFLAGS_FOR_BUILD)
+AC_SUBST(CPPFLAGS_FOR_BUILD)
 AC_SUBST(CXXFLAGS_FOR_BUILD)
 AC_SUBST(CXX_FOR_BUILD)
 AC_SUBST(DLLTOOL_FOR_BUILD)
index e1a744c0368cf06563719b0d592c4f0c49806745..fd9d30002176070fbb1d3fdb7c953ca78f1ece26 100644 (file)
@@ -1,3 +1,8 @@
+2008-10-22  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * Makefile.in (CPPFLAGS): Define.
+       (FLAGS_TO_PASS, COMPILE.c): Add CPPFLAGS.
+
 2008-10-15  Paolo Bonzini  <bonzini@gnu.org>
 
        PR bootstrap/37137
index aa8626d5c006f268ba1db1019015e560cf8e361a..41a71f5ea32f0af2565a5404ada816a46e9d4550 100644 (file)
@@ -55,6 +55,7 @@ AR_FLAGS = rc
 
 CC = @CC@
 CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
 RANLIB = @RANLIB@
 MAKEINFO = @MAKEINFO@
 PERL = @PERL@
@@ -78,6 +79,7 @@ FLAGS_TO_PASS = \
        "AR_FLAGS=$(AR_FLAGS)" \
        "CC=$(CC)" \
        "CFLAGS=$(CFLAGS)" \
+       "CPPFLAGS=$(CPPFLAGS)" \
        "DESTDIR=$(DESTDIR)" \
        "EXTRA_OFILES=$(EXTRA_OFILES)" \
        "HDEFINES=$(HDEFINES)" \
@@ -109,7 +111,7 @@ installcheck: installcheck-subdir
 
 INCDIR=$(srcdir)/$(MULTISRCTOP)../include
 
-COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@
+COMPILE.c = $(CC) -c @DEFS@ $(CFLAGS) $(CPPFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@
 
 # Just to make sure we don't use a built-in rule with VPATH
 .c.o: