aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-08 16:14:33 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-08 16:14:33 +0000
commit9841cd80d4abbbf64648e85b6c24f4b1956a0f99 (patch)
treeaec648ca3453c6e069be4508f594fbeb9d4bf473 /Makefile.in
parentafe7695c4c6a9e586ef23ae226964139a5f03321 (diff)
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. config: * config/mh-mingw (LDFLAGS): Define. gcc: * configure.ac: Use LDFLAGS="${LDFLAGS_FOR_BUILD}" when running configure for the build system. (BUILD_LDFLAGS): Define. * configure: Regenerate. * Makefile.in (BUILD_LDFLAGS): Define to @BUILD_LDFLAGS@. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136563 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in21
1 files changed, 14 insertions, 7 deletions
diff --git a/Makefile.in b/Makefile.in
index 16b94cfeef5..1bd87fd52cb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -144,6 +144,12 @@ BUILD_EXPORTS = \
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
@@ -499,6 +505,7 @@ BASE_FLAGS_TO_PASS = \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+ "LDFLAGS_FOR_BUILD=$(LDFLAGS_FOR_BUILD)" \
"LEX=$(LEX)" \
"M4=$(M4)" \
"MAKE=$(MAKE)" \
@@ -2762,7 +2769,7 @@ all-build-libiberty: configure-build-libiberty
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
@@ -2818,7 +2825,7 @@ all-build-bison: configure-build-bison
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
@@ -2874,7 +2881,7 @@ all-build-byacc: configure-build-byacc
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
@@ -2930,7 +2937,7 @@ all-build-flex: configure-build-flex
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
@@ -2986,7 +2993,7 @@ all-build-m4: configure-build-m4
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
@@ -3042,7 +3049,7 @@ all-build-texinfo: configure-build-texinfo
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
@@ -3098,7 +3105,7 @@ all-build-fixincludes: configure-build-fixincludes
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