aboutsummaryrefslogtreecommitdiff
path: root/Makefile.tpl
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2012-10-22 07:32:04 +0000
committerEric Botcazou <ebotcazou@libertysurf.fr>2012-10-22 07:32:04 +0000
commitb3676d82d7039ba759abd39223d75cc81388b468 (patch)
tree6ddbc80adb4132755b5ff729afe0cb4c589abf1c /Makefile.tpl
parenta8f9d13eda525d42916c33b0a9f4b98ca84f3aab (diff)
downloadgdb-b3676d82d7039ba759abd39223d75cc81388b468.zip
gdb-b3676d82d7039ba759abd39223d75cc81388b468.tar.gz
gdb-b3676d82d7039ba759abd39223d75cc81388b468.tar.bz2
PR bootstrap/54820
* Makefile.tpl (STAGE1_FLAGS_TO_PASS): New variable. (all-[+prefix+][+module+]): Pass stage1_args to sub-makes. (all-stage[+id+]-[+prefix+][+module+]): Likewise, if prev is false. (clean-stage[+id+]-[+prefix+][+module+]): Likewise, if prev is false. (host_modules): Set stage1_args to STAGE1_FLAGS_TO_PASS. * Makefile.in: Regenerate. * configure.ac (have_static_libs): New variable and associated check. (stage1-ldflags): Move to after stage1_libs and set to -static-libstdc++ -static-libgcc if stage1_libs is empty and have_static_libs is yes. * configure: Regenerate.
Diffstat (limited to 'Makefile.tpl')
-rw-r--r--Makefile.tpl19
1 files changed, 12 insertions, 7 deletions
diff --git a/Makefile.tpl b/Makefile.tpl
index f2c3f48..146666a 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -615,6 +615,12 @@ EXTRA_HOST_FLAGS = \
FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS)
+# Flags to pass to stage1 or when not bootstrapping.
+
+STAGE1_FLAGS_TO_PASS = \
+ LDFLAGS="$${LDFLAGS}" \
+ HOST_LIBS="$${HOST_LIBS}"
+
# Flags to pass to stage2 and later makes.
POSTSTAGE1_FLAGS_TO_PASS = \
@@ -1076,7 +1082,7 @@ all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +][+ ELS
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
[+exports+] [+extra_exports+] \
(cd [+subdir+]/[+module+] && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+extra_make_flags+] \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) [+args+] [+stage1_args+] [+extra_make_flags+] \
$(TARGET-[+prefix+][+module+]))
@endif [+prefix+][+module+]
@@ -1109,9 +1115,8 @@ all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
- [+args+] [+
- IF prev +][+poststage1_args+][+ ENDIF prev
- +] [+extra_make_flags+] \
+ [+args+] [+IF prev +][+poststage1_args+][+ ELSE prev +] \
+ [+stage1_args+][+ ENDIF prev +] [+extra_make_flags+] \
TFLAGS="$(STAGE[+id+]_TFLAGS)" \
$(TARGET-stage[+id+]-[+prefix+][+module+])
@@ -1125,9 +1130,8 @@ clean-stage[+id+]-[+prefix+][+module+]:
$(MAKE) stage[+id+]-start; \
fi; \
cd [+subdir+]/[+module+] && \
- $(MAKE) [+args+] [+ IF prev +] \
- [+poststage1_args+] [+ ENDIF prev +] \
- [+extra_make_flags+] clean
+ $(MAKE) [+args+] [+ IF prev +][+poststage1_args+][+ ELSE prev +] \
+ [+stage1_args+][+ ENDIF prev +] [+extra_make_flags+] clean
@endif [+prefix+][+module+]-bootstrap
[+ ENDFOR bootstrap_stage +]
@@ -1162,6 +1166,7 @@ clean-stage[+id+]-[+prefix+][+module+]:
exports="$(HOST_EXPORTS)"
poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)"
args="$(EXTRA_HOST_FLAGS)"
+ stage1_args="$(STAGE1_FLAGS_TO_PASS)"
poststage1_args="$(POSTSTAGE1_FLAGS_TO_PASS)" +]
.PHONY: check-[+module+] maybe-check-[+module+]