+2008-06-08 Joseph Myers <joseph@codesourcery.com>
+
+ PR tree-optimization/36218
+ * Makefile.def (flags_to_pass): Add LDFLAGS_FOR_BUILD.
+ * Makefile.tpl (EXTRA_BUILD_FLAGS): Define.
+ (all prefix="build-"): Pass them to build-system sub-makes.
+ * Makefile.in: Regenerate.
+
2008-05-16 Daniel Jacobowitz <dan@codesourcery.com>
* src-release (DEVO_SUPPORT): Add ChangeLog, MAINTAINERS,
WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
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.
+EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+
# This is the list of directories to built for the host system.
SUBDIRS = @configdirs@
# This is set by the configure script to the arguments to use when configuring
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+ "LDFLAGS_FOR_BUILD=$(LDFLAGS_FOR_BUILD)" \
"LEX=$(LEX)" \
"M4=$(M4)" \
"MAKE=$(MAKE)" \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/libiberty && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-libiberty))
@endif build-libiberty
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/bison && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-bison))
@endif build-bison
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/byacc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-byacc))
@endif build-byacc
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/flex && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-flex))
@endif build-flex
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/m4 && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-m4))
@endif build-m4
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/texinfo && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-texinfo))
@endif build-texinfo
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(BUILD_EXPORTS) \
(cd $(BUILD_SUBDIR)/fixincludes && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_BUILD_FLAGS) \
$(TARGET-build-fixincludes))
@endif build-fixincludes
WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
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.
+EXTRA_BUILD_FLAGS = \
+ CFLAGS="$(CFLAGS_FOR_BUILD)" \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"
+
# This is the list of directories to built for the host system.
SUBDIRS = @configdirs@
# This is set by the configure script to the arguments to use when configuring
target_alias=(get "target" "${target_alias}")
args="$(BUILD_CONFIGARGS)" no-config-site=true +]
-[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" +]
+[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)"
+ args="$(EXTRA_BUILD_FLAGS)" +]
[+ ENDFOR build_module +]
# --------------------------------------