* Makefile.def (flags_to_pass): Add LDFLAGS_FOR_BUILD.
authorJoseph Myers <joseph@codesourcery.com>
Sun, 8 Jun 2008 16:19:22 +0000 (16:19 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Sun, 8 Jun 2008 16:19:22 +0000 (16:19 +0000)
* 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.

ChangeLog
Makefile.def
Makefile.in
Makefile.tpl
config/ChangeLog
config/mh-mingw

index fe3e1f5284b90210536fec31829e1f2d0609f5cc..b6074d5b1fbbefa485e6a205c2b5ce1280910590 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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,
index 203dd1d4631a18bb72acbf9810a89eac0a0832eb..3924617ebd3daad8f375cfdc0471dbe6a5961520 100644 (file)
@@ -215,6 +215,7 @@ flags_to_pass = { flag= INSTALL ; };
 flags_to_pass = { flag= INSTALL_DATA ; };
 flags_to_pass = { flag= INSTALL_PROGRAM ; };
 flags_to_pass = { flag= INSTALL_SCRIPT ; };
+flags_to_pass = { flag= LDFLAGS_FOR_BUILD ; };
 flags_to_pass = { flag= LEX ; };
 flags_to_pass = { flag= M4 ; };
 flags_to_pass = { flag= MAKE ; };
index 16b94cfeef55e1d1326f5b5585348955cc1dd679..1bd87fd52cbef4451596b1591d86f7dc6f05b5f7 100644 (file)
@@ -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
 
index ea2676fced662b090df876e671db30a4808afc7c..c9b34eda22ddb2a67bf9fd2ef8da0de1d076db17 100644 (file)
@@ -147,6 +147,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
@@ -955,7 +961,8 @@ clean-stage[+id+]-[+prefix+][+module+]:
             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 +]
 
 # --------------------------------------
index f7548c3fafd85df65721fd502f42d52f44213fa1..55d74f668a1a017ded5dd8325f15b39004832102 100644 (file)
@@ -1,3 +1,8 @@
+2008-06-08  Joseph Myers  <joseph@codesourcery.com>
+
+       PR tree-optimization/36218
+       * config/mh-mingw (LDFLAGS): Define.
+
 2008-06-05  Danny Smith  <dannysmith@users.sourceforge.net>
 
        PR driver/35916
index 5a38cdb4546b35121363c1d41dc8f2120f66c46f..e31bfd323b45208631fc35e7fd376e4dd72ee53f 100644 (file)
@@ -2,3 +2,5 @@
 # Vista (see PR33281 for details).
 BOOT_CFLAGS += -D__USE_MINGW_ACCESS
 CFLAGS += -D__USE_MINGW_ACCESS
+# Increase stack limit to same as Linux default.
+LDFLAGS = -Wl,--stack,8388608