#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# -------------------------------
fi`
CC_FOR_TARGET = @CC_FOR_TARGET@
+SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
# During gcc bootstrap, if we use some random cc for stage1 then
# CFLAGS will be just -g. We want to ensure that TARGET libraries
# (which we know are built with gcc) are built with optimizations so
# prepend -O2 when setting CFLAGS_FOR_TARGET.
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
+CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
# If GCC_FOR_TARGET is not overriden on the command line, then this
# variable is passed down to the gcc Makefile, where it is used to
# build libgcc2.a. We define it here so that it can itself be
RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
+CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that prorgams built for the target machine work.
-TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(HOST_LIB_PATH_gcc)
+TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(HOST_LIB_PATH_gcc)
@if target-libstdc++-v3
TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/.libs:
TARGET_LIB_PATH_libmudflap = $$r/$(TARGET_SUBDIR)/libmudflap/.libs:
@endif target-libmudflap
+@if target-libssp
+TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs:
+@endif target-libssp
+
# This is the list of directories that may be needed in RPATH_ENVVAR
"target_alias=$(target_alias)" \
"BISON=$(BISON)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+ "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
"EXPECT=$(EXPECT)" \
"FLEX=$(FLEX)" \
"GCJ_FOR_TARGET=$(GCJ_FOR_TARGET)" \
"GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
"LD_FOR_TARGET=$(LD_FOR_TARGET)" \
+ "LDFLAGS_FOR_TARGET=$(LDFLAGS_FOR_TARGET)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"LIBCXXFLAGS_FOR_TARGET=$(LIBCXXFLAGS_FOR_TARGET)" \
"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
'LD=$$(LD_FOR_TARGET)' \
+ 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
'LIBCXXFLAGS=$$(LIBCXXFLAGS_FOR_TARGET)' \
'NM=$$(NM_FOR_TARGET)' \
'BUILD_PREFIX=$(BUILD_PREFIX)' \
'BUILD_PREFIX_1=$(BUILD_PREFIX_1)' \
"GCC_FOR_TARGET=$(GCC_FOR_TARGET)" \
- "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"`echo 'LANGUAGES=$(LANGUAGES)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
"`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
"`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
configure-target: \
maybe-configure-target-libstdc++-v3 \
maybe-configure-target-libmudflap \
+ maybe-configure-target-libssp \
maybe-configure-target-newlib \
maybe-configure-target-libgfortran \
maybe-configure-target-libobjc \
all-target: \
maybe-all-target-libstdc++-v3 \
maybe-all-target-libmudflap \
+ maybe-all-target-libssp \
maybe-all-target-newlib \
maybe-all-target-libgfortran \
maybe-all-target-libobjc \
info-target: \
maybe-info-target-libstdc++-v3 \
maybe-info-target-libmudflap \
+ maybe-info-target-libssp \
maybe-info-target-newlib \
maybe-info-target-libgfortran \
maybe-info-target-libobjc \
dvi-target: \
maybe-dvi-target-libstdc++-v3 \
maybe-dvi-target-libmudflap \
+ maybe-dvi-target-libssp \
maybe-dvi-target-newlib \
maybe-dvi-target-libgfortran \
maybe-dvi-target-libobjc \
html-target: \
maybe-html-target-libstdc++-v3 \
maybe-html-target-libmudflap \
+ maybe-html-target-libssp \
maybe-html-target-newlib \
maybe-html-target-libgfortran \
maybe-html-target-libobjc \
TAGS-target: \
maybe-TAGS-target-libstdc++-v3 \
maybe-TAGS-target-libmudflap \
+ maybe-TAGS-target-libssp \
maybe-TAGS-target-newlib \
maybe-TAGS-target-libgfortran \
maybe-TAGS-target-libobjc \
install-info-target: \
maybe-install-info-target-libstdc++-v3 \
maybe-install-info-target-libmudflap \
+ maybe-install-info-target-libssp \
maybe-install-info-target-newlib \
maybe-install-info-target-libgfortran \
maybe-install-info-target-libobjc \
installcheck-target: \
maybe-installcheck-target-libstdc++-v3 \
maybe-installcheck-target-libmudflap \
+ maybe-installcheck-target-libssp \
maybe-installcheck-target-newlib \
maybe-installcheck-target-libgfortran \
maybe-installcheck-target-libobjc \
mostlyclean-target: \
maybe-mostlyclean-target-libstdc++-v3 \
maybe-mostlyclean-target-libmudflap \
+ maybe-mostlyclean-target-libssp \
maybe-mostlyclean-target-newlib \
maybe-mostlyclean-target-libgfortran \
maybe-mostlyclean-target-libobjc \
clean-target: \
maybe-clean-target-libstdc++-v3 \
maybe-clean-target-libmudflap \
+ maybe-clean-target-libssp \
maybe-clean-target-newlib \
maybe-clean-target-libgfortran \
maybe-clean-target-libobjc \
distclean-target: \
maybe-distclean-target-libstdc++-v3 \
maybe-distclean-target-libmudflap \
+ maybe-distclean-target-libssp \
maybe-distclean-target-newlib \
maybe-distclean-target-libgfortran \
maybe-distclean-target-libobjc \
maintainer-clean-target: \
maybe-maintainer-clean-target-libstdc++-v3 \
maybe-maintainer-clean-target-libmudflap \
+ maybe-maintainer-clean-target-libssp \
maybe-maintainer-clean-target-newlib \
maybe-maintainer-clean-target-libgfortran \
maybe-maintainer-clean-target-libobjc \
maybe-check-gnattools \
maybe-check-target-libstdc++-v3 \
maybe-check-target-libmudflap \
+ maybe-check-target-libssp \
maybe-check-target-newlib \
maybe-check-target-libgfortran \
maybe-check-target-libobjc \
# Installation targets.
.PHONY: install uninstall
-install: installdirs install-host install-target
+install: unstage installdirs install-host install-target stage
.PHONY: install-host-nogcc
install-host-nogcc: \
install-target: \
maybe-install-target-libstdc++-v3 \
maybe-install-target-libmudflap \
+ maybe-install-target-libssp \
maybe-install-target-newlib \
maybe-install-target-libgfortran \
maybe-install-target-libobjc \
+# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
+@if target-libssp
+$(TARGET_SUBDIR)/libssp/multilib.out: multilib.out
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libssp ; \
+ rm -f $(TARGET_SUBDIR)/libssp/Makefile || : ; \
+ cp multilib.out $(TARGET_SUBDIR)/libssp/multilib.out
+@endif target-libssp
+
+
+
+.PHONY: configure-target-libssp maybe-configure-target-libssp
+maybe-configure-target-libssp:
+@if target-libssp
+maybe-configure-target-libssp: configure-target-libssp
+configure-target-libssp: $(TARGET_SUBDIR)/libssp/multilib.out
+ @test ! -f $(TARGET_SUBDIR)/libssp/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libssp ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo Configuring in $(TARGET_SUBDIR)/libssp; \
+ cd "$(TARGET_SUBDIR)/libssp" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libssp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libssp"; \
+ libsrcdir="$$s/libssp"; \
+ rm -f no-such-file || : ; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
+ || exit 1
+@endif target-libssp
+
+
+
+
+
+.PHONY: all-target-libssp maybe-all-target-libssp
+maybe-all-target-libssp:
+@if target-libssp
+TARGET-target-libssp=all
+maybe-all-target-libssp: all-target-libssp
+all-target-libssp: configure-target-libssp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libssp))
+@endif target-libssp
+
+
+
+
+
+.PHONY: check-target-libssp maybe-check-target-libssp
+maybe-check-target-libssp:
+@if target-libssp
+maybe-check-target-libssp: check-target-libssp
+
+check-target-libssp:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+
+@endif target-libssp
+
+.PHONY: install-target-libssp maybe-install-target-libssp
+maybe-install-target-libssp:
+@if target-libssp
+maybe-install-target-libssp: install-target-libssp
+
+install-target-libssp: installdirs
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) install)
+
+@endif target-libssp
+
+# Other targets (info, dvi, etc.)
+
+.PHONY: maybe-info-target-libssp info-target-libssp
+maybe-info-target-libssp:
+@if target-libssp
+maybe-info-target-libssp: info-target-libssp
+
+info-target-libssp: \
+ configure-target-libssp
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing info in $(TARGET_SUBDIR)/libssp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+@endif target-libssp
+
+.PHONY: maybe-dvi-target-libssp dvi-target-libssp
+maybe-dvi-target-libssp:
+@if target-libssp
+maybe-dvi-target-libssp: dvi-target-libssp
+
+dvi-target-libssp: \
+ configure-target-libssp
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libssp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+@endif target-libssp
+
+.PHONY: maybe-html-target-libssp html-target-libssp
+maybe-html-target-libssp:
+@if target-libssp
+maybe-html-target-libssp: html-target-libssp
+
+html-target-libssp: \
+ configure-target-libssp
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html in $(TARGET_SUBDIR)/libssp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ html) \
+ || exit 1
+
+@endif target-libssp
+
+.PHONY: maybe-TAGS-target-libssp TAGS-target-libssp
+maybe-TAGS-target-libssp:
+@if target-libssp
+maybe-TAGS-target-libssp: TAGS-target-libssp
+
+TAGS-target-libssp: \
+ configure-target-libssp
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libssp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+@endif target-libssp
+
+.PHONY: maybe-install-info-target-libssp install-info-target-libssp
+maybe-install-info-target-libssp:
+@if target-libssp
+maybe-install-info-target-libssp: install-info-target-libssp
+
+install-info-target-libssp: \
+ configure-target-libssp \
+ info-target-libssp
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libssp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+@endif target-libssp
+
+.PHONY: maybe-installcheck-target-libssp installcheck-target-libssp
+maybe-installcheck-target-libssp:
+@if target-libssp
+maybe-installcheck-target-libssp: installcheck-target-libssp
+
+installcheck-target-libssp: \
+ configure-target-libssp
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libssp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+@endif target-libssp
+
+.PHONY: maybe-mostlyclean-target-libssp mostlyclean-target-libssp
+maybe-mostlyclean-target-libssp:
+@if target-libssp
+maybe-mostlyclean-target-libssp: mostlyclean-target-libssp
+
+mostlyclean-target-libssp:
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libssp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+@endif target-libssp
+
+.PHONY: maybe-clean-target-libssp clean-target-libssp
+maybe-clean-target-libssp:
+@if target-libssp
+maybe-clean-target-libssp: clean-target-libssp
+
+clean-target-libssp:
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing clean in $(TARGET_SUBDIR)/libssp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+@endif target-libssp
+
+.PHONY: maybe-distclean-target-libssp distclean-target-libssp
+maybe-distclean-target-libssp:
+@if target-libssp
+maybe-distclean-target-libssp: distclean-target-libssp
+
+distclean-target-libssp:
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libssp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+@endif target-libssp
+
+.PHONY: maybe-maintainer-clean-target-libssp maintainer-clean-target-libssp
+maybe-maintainer-clean-target-libssp:
+@if target-libssp
+maybe-maintainer-clean-target-libssp: maintainer-clean-target-libssp
+
+maintainer-clean-target-libssp:
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libssp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif target-libssp
+
+
+
# There's only one multilib.out. Cleverer subdirs shouldn't need it copied.
@if target-newlib
$(TARGET_SUBDIR)/newlib/multilib.out: multilib.out
# Flags to pass to stage2 and later makes.
POSTSTAGE1_FLAGS_TO_PASS = \
CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
- STAGE_PREFIX=$$r/stage-gcc/ \
+ STAGE_PREFIX=$$r/prev-gcc/ \
CFLAGS="$(BOOT_CFLAGS)" \
ADAC="\$$(CC)"
@[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
echo stage1 > stage_current ; \
echo stage1 > stage_last; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
@if bfd
@cd $(HOST_SUBDIR); [ -d stage1-bfd ] || \
mkdir stage1-bfd; \
@[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
echo stage2 > stage_current ; \
echo stage2 > stage_last; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
@if bfd
@cd $(HOST_SUBDIR); [ -d stage2-bfd ] || \
mkdir stage2-bfd; \
@[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
echo stage3 > stage_current ; \
echo stage3 > stage_last; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
@if bfd
@cd $(HOST_SUBDIR); [ -d stage3-bfd ] || \
mkdir stage3-bfd; \
@[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
echo stage4 > stage_current ; \
echo stage4 > stage_last; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
@if bfd
@cd $(HOST_SUBDIR); [ -d stage4-bfd ] || \
mkdir stage4-bfd; \
@[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
echo stageprofile > stage_current ; \
echo stageprofile > stage_last; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
@if bfd
@cd $(HOST_SUBDIR); [ -d stageprofile-bfd ] || \
mkdir stageprofile-bfd; \
@[ -f stage_current ] && $(MAKE) `cat stage_current`-end || : ; \
echo stagefeedback > stage_current ; \
echo stagefeedback > stage_last; \
- $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR) $(TARGET_SUBDIR)
@if bfd
@cd $(HOST_SUBDIR); [ -d stagefeedback-bfd ] || \
mkdir stagefeedback-bfd; \
set stagefeedback-bfd bfd ; \
@CREATE_LINK_TO_DIR@ ; \
- set stage1-bfd prev-bfd ; \
+ set stageprofile-bfd prev-bfd ; \
@CREATE_LINK_TO_DIR@
@endif bfd
@if opcodes
mkdir stagefeedback-opcodes; \
set stagefeedback-opcodes opcodes ; \
@CREATE_LINK_TO_DIR@ ; \
- set stage1-opcodes prev-opcodes ; \
+ set stageprofile-opcodes prev-opcodes ; \
@CREATE_LINK_TO_DIR@
@endif opcodes
@if binutils
mkdir stagefeedback-binutils; \
set stagefeedback-binutils binutils ; \
@CREATE_LINK_TO_DIR@ ; \
- set stage1-binutils prev-binutils ; \
+ set stageprofile-binutils prev-binutils ; \
@CREATE_LINK_TO_DIR@
@endif binutils
@if gas
mkdir stagefeedback-gas; \
set stagefeedback-gas gas ; \
@CREATE_LINK_TO_DIR@ ; \
- set stage1-gas prev-gas ; \
+ set stageprofile-gas prev-gas ; \
@CREATE_LINK_TO_DIR@
@endif gas
@if gcc
mkdir stagefeedback-gcc; \
set stagefeedback-gcc gcc ; \
@CREATE_LINK_TO_DIR@ ; \
- set stage1-gcc prev-gcc ; \
+ set stageprofile-gcc prev-gcc ; \
@CREATE_LINK_TO_DIR@
@endif gcc
@if intl
mkdir stagefeedback-intl; \
set stagefeedback-intl intl ; \
@CREATE_LINK_TO_DIR@ ; \
- set stage1-intl prev-intl ; \
+ set stageprofile-intl prev-intl ; \
@CREATE_LINK_TO_DIR@
@endif intl
@if ld
mkdir stagefeedback-ld; \
set stagefeedback-ld ld ; \
@CREATE_LINK_TO_DIR@ ; \
- set stage1-ld prev-ld ; \
+ set stageprofile-ld prev-ld ; \
@CREATE_LINK_TO_DIR@
@endif ld
@if libcpp
mkdir stagefeedback-libcpp; \
set stagefeedback-libcpp libcpp ; \
@CREATE_LINK_TO_DIR@ ; \
- set stage1-libcpp prev-libcpp ; \
+ set stageprofile-libcpp prev-libcpp ; \
@CREATE_LINK_TO_DIR@
@endif libcpp
@if libiberty
mkdir stagefeedback-libiberty; \
set stagefeedback-libiberty libiberty ; \
@CREATE_LINK_TO_DIR@ ; \
- set stage1-libiberty prev-libiberty ; \
+ set stageprofile-libiberty prev-libiberty ; \
@CREATE_LINK_TO_DIR@
@endif libiberty
@if zlib
mkdir stagefeedback-zlib; \
set stagefeedback-zlib zlib ; \
@CREATE_LINK_TO_DIR@ ; \
- set stage1-zlib prev-zlib ; \
+ set stageprofile-zlib prev-zlib ; \
@CREATE_LINK_TO_DIR@
@endif zlib
@if bfd
@cd $(HOST_SUBDIR); set bfd stagefeedback-bfd ; \
@UNDO_LINK_TO_DIR@ ; \
- set prev-bfd stage1-bfd ; \
+ set prev-bfd stageprofile-bfd ; \
@UNDO_LINK_TO_DIR@
@endif bfd
@if opcodes
@cd $(HOST_SUBDIR); set opcodes stagefeedback-opcodes ; \
@UNDO_LINK_TO_DIR@ ; \
- set prev-opcodes stage1-opcodes ; \
+ set prev-opcodes stageprofile-opcodes ; \
@UNDO_LINK_TO_DIR@
@endif opcodes
@if binutils
@cd $(HOST_SUBDIR); set binutils stagefeedback-binutils ; \
@UNDO_LINK_TO_DIR@ ; \
- set prev-binutils stage1-binutils ; \
+ set prev-binutils stageprofile-binutils ; \
@UNDO_LINK_TO_DIR@
@endif binutils
@if gas
@cd $(HOST_SUBDIR); set gas stagefeedback-gas ; \
@UNDO_LINK_TO_DIR@ ; \
- set prev-gas stage1-gas ; \
+ set prev-gas stageprofile-gas ; \
@UNDO_LINK_TO_DIR@
@endif gas
@if gcc
@cd $(HOST_SUBDIR); set gcc stagefeedback-gcc ; \
@UNDO_LINK_TO_DIR@ ; \
- set prev-gcc stage1-gcc ; \
+ set prev-gcc stageprofile-gcc ; \
@UNDO_LINK_TO_DIR@
@endif gcc
@if intl
@cd $(HOST_SUBDIR); set intl stagefeedback-intl ; \
@UNDO_LINK_TO_DIR@ ; \
- set prev-intl stage1-intl ; \
+ set prev-intl stageprofile-intl ; \
@UNDO_LINK_TO_DIR@
@endif intl
@if ld
@cd $(HOST_SUBDIR); set ld stagefeedback-ld ; \
@UNDO_LINK_TO_DIR@ ; \
- set prev-ld stage1-ld ; \
+ set prev-ld stageprofile-ld ; \
@UNDO_LINK_TO_DIR@
@endif ld
@if libcpp
@cd $(HOST_SUBDIR); set libcpp stagefeedback-libcpp ; \
@UNDO_LINK_TO_DIR@ ; \
- set prev-libcpp stage1-libcpp ; \
+ set prev-libcpp stageprofile-libcpp ; \
@UNDO_LINK_TO_DIR@
@endif libcpp
@if libiberty
@cd $(HOST_SUBDIR); set libiberty stagefeedback-libiberty ; \
@UNDO_LINK_TO_DIR@ ; \
- set prev-libiberty stage1-libiberty ; \
+ set prev-libiberty stageprofile-libiberty ; \
@UNDO_LINK_TO_DIR@
@endif libiberty
@if zlib
@cd $(HOST_SUBDIR); set zlib stagefeedback-zlib ; \
@UNDO_LINK_TO_DIR@ ; \
- set prev-zlib stage1-zlib ; \
+ set prev-zlib stageprofile-zlib ; \
@UNDO_LINK_TO_DIR@
@endif zlib
# are remade, but not reconfigured. The next stage (if any) will not
# be reconfigured as well.
.PHONY: stagefeedback-bubble
-stagefeedback-bubble:: stage1-bubble
- @if test -f stagefeedback-lean || test -f stage1-lean ; then \
+stagefeedback-bubble:: stageprofile-bubble
+ @if test -f stagefeedback-lean || test -f stageprofile-lean ; then \
echo Skipping rebuild of stagefeedback ; \
else \
$(MAKE) $(RECURSE_FLAGS_TO_PASS) NOTPARALLEL= all-stagefeedback; \
+.PHONY: profiledbootstrap
+profiledbootstrap: stagefeedback-bubble all
+
# Rules to wipe a stage and all the following ones, also used for cleanstrap
-distclean-stage1:: distclean-stagefeedback
+distclean-stageprofile:: distclean-stagefeedback
.PHONY: distclean-stagefeedback
distclean-stagefeedback::
[ -f stage_current ] && $(MAKE) `cat stage_current`-end || :
-stagefeedback-start::
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- cd stageprofile-gcc && \
- { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../gcc/&",' | $(SHELL); } && \
- { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../gcc/&",' | $(SHELL); }
+stageprofile-end::
+ $(MAKE) distclean-stagefeedback
-# FIXME: Will not need to be conditional when toplevel bootstrap is the
-# only possibility, but now it conflicts with no-bootstrap rules
-@if gcc-bootstrap
-profiledbootstrap:
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- echo "Bootstrapping the compiler"; \
- $(MAKE) stageprofile-bubble distclean-stagefeedback
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- echo "Building runtime libraries and training compiler"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
+stagefeedback-start::
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- echo "Building feedback based compiler"; \
- $(MAKE) stagefeedback-bubble stagefeedback-end
-@endif gcc-bootstrap
+ for i in prev-*; do \
+ j=`echo $$i | sed s/^prev-//` ; \
+ cd $$r/$$i && \
+ { find . -type d | sort | sed 's,.*,$(SHELL) '"$$s"'/mkinstalldirs "../'$$j'/&",' | $(SHELL) ; } && \
+ { find . -name '*.*da' | sed 's,.*,$(LN) -f "&" "../'$$j'/&",' | $(SHELL) ; } ; \
+ done
@if gcc-bootstrap
NOTPARALLEL = .NOTPARALLEL
configure-target-libmudflap: maybe-all-gcc
+configure-target-libssp: maybe-all-gcc
+
configure-target-newlib: maybe-all-gcc
configure-target-libgfortran: maybe-all-gcc
+
# With all the machinery above in place, it is pretty easy to generate
# dependencies. Host dependencies are a bit more complex because we have
# to check for bootstrap/prebootstrap dependencies. To resolve
configure-stage4-gcc: maybe-configure-stage4-intl
configure-stageprofile-gcc: maybe-configure-stageprofile-intl
configure-stagefeedback-gcc: maybe-configure-stagefeedback-intl
-configure-gcc: maybe-configure-binutils
-
-configure-stage1-gcc: maybe-configure-stage1-binutils
-configure-stage2-gcc: maybe-configure-stage2-binutils
-configure-stage3-gcc: maybe-configure-stage3-binutils
-configure-stage4-gcc: maybe-configure-stage4-binutils
-configure-stageprofile-gcc: maybe-configure-stageprofile-binutils
-configure-stagefeedback-gcc: maybe-configure-stagefeedback-binutils
-configure-gcc: maybe-configure-gas
-
-configure-stage1-gcc: maybe-configure-stage1-gas
-configure-stage2-gcc: maybe-configure-stage2-gas
-configure-stage3-gcc: maybe-configure-stage3-gas
-configure-stage4-gcc: maybe-configure-stage4-gas
-configure-stageprofile-gcc: maybe-configure-stageprofile-gas
-configure-stagefeedback-gcc: maybe-configure-stagefeedback-gas
-configure-gcc: maybe-configure-ld
-
-configure-stage1-gcc: maybe-configure-stage1-ld
-configure-stage2-gcc: maybe-configure-stage2-ld
-configure-stage3-gcc: maybe-configure-stage3-ld
-configure-stage4-gcc: maybe-configure-stage4-ld
-configure-stageprofile-gcc: maybe-configure-stageprofile-ld
-configure-stagefeedback-gcc: maybe-configure-stagefeedback-ld
+configure-gcc: maybe-all-binutils
+
+configure-stage1-gcc: maybe-all-stage1-binutils
+configure-stage2-gcc: maybe-all-stage2-binutils
+configure-stage3-gcc: maybe-all-stage3-binutils
+configure-stage4-gcc: maybe-all-stage4-binutils
+configure-stageprofile-gcc: maybe-all-stageprofile-binutils
+configure-stagefeedback-gcc: maybe-all-stagefeedback-binutils
+configure-gcc: maybe-all-gas
+
+configure-stage1-gcc: maybe-all-stage1-gas
+configure-stage2-gcc: maybe-all-stage2-gas
+configure-stage3-gcc: maybe-all-stage3-gas
+configure-stage4-gcc: maybe-all-stage4-gas
+configure-stageprofile-gcc: maybe-all-stageprofile-gas
+configure-stagefeedback-gcc: maybe-all-stagefeedback-gas
+configure-gcc: maybe-all-ld
+
+configure-stage1-gcc: maybe-all-stage1-ld
+configure-stage2-gcc: maybe-all-stage2-ld
+configure-stage3-gcc: maybe-all-stage3-ld
+configure-stage4-gcc: maybe-all-stage4-ld
+configure-stageprofile-gcc: maybe-all-stageprofile-ld
+configure-stagefeedback-gcc: maybe-all-stagefeedback-ld
all-gcc: all-libiberty
all-stage1-gcc: all-stage1-libiberty
all-stageprofile-gcc: maybe-all-build-fixincludes
all-stagefeedback-gcc: maybe-all-build-fixincludes
all-prebootstrap: maybe-all-build-fixincludes
-all-gcc: maybe-all-binutils
-
-all-stage1-gcc: maybe-all-stage1-binutils
-all-stage2-gcc: maybe-all-stage2-binutils
-all-stage3-gcc: maybe-all-stage3-binutils
-all-stage4-gcc: maybe-all-stage4-binutils
-all-stageprofile-gcc: maybe-all-stageprofile-binutils
-all-stagefeedback-gcc: maybe-all-stagefeedback-binutils
-all-gcc: maybe-all-gas
-
-all-stage1-gcc: maybe-all-stage1-gas
-all-stage2-gcc: maybe-all-stage2-gas
-all-stage3-gcc: maybe-all-stage3-gas
-all-stage4-gcc: maybe-all-stage4-gas
-all-stageprofile-gcc: maybe-all-stageprofile-gas
-all-stagefeedback-gcc: maybe-all-stagefeedback-gas
-all-gcc: maybe-all-ld
-
-all-stage1-gcc: maybe-all-stage1-ld
-all-stage2-gcc: maybe-all-stage2-ld
-all-stage3-gcc: maybe-all-stage3-ld
-all-stage4-gcc: maybe-all-stage4-ld
-all-stageprofile-gcc: maybe-all-stageprofile-ld
-all-stagefeedback-gcc: maybe-all-stagefeedback-ld
all-gcc: maybe-all-zlib
all-stage1-gcc: maybe-all-stage1-zlib