aboutsummaryrefslogtreecommitdiff
path: root/Makefile.tpl
diff options
context:
space:
mode:
authornobody <>2004-03-23 23:05:53 +0000
committernobody <>2004-03-23 23:05:53 +0000
commit58d880d7dc46ef22215df77fa468d76cad99a900 (patch)
treefce9429309a4e5745ddd79402c973d2915569175 /Makefile.tpl
parent51550d1a9e579cc2163fc6f09744867302f12fb5 (diff)
downloadgdb-58d880d7dc46ef22215df77fa468d76cad99a900.zip
gdb-58d880d7dc46ef22215df77fa468d76cad99a900.tar.gz
gdb-58d880d7dc46ef22215df77fa468d76cad99a900.tar.bz2
This commit was manufactured by cvs2svn to create branchezannoni_pie-20040323-branchpoint
'ezannoni_pie-20040323-branch'. Sprout from gdb_6_1-branch 2004-03-12 17:46:28 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'gdb_6_1-branch'.' Cherrypick from gdb_6_1-branch 2004-03-09 17:34:40 UTC nobody 'This commit was manufactured by cvs2svn to create branch 'gdb_6_1-branch'.': gdb/testsuite/gdb.cp/classes.cc Cherrypick from master 2004-03-23 23:05:52 UTC Paul Brook <paul@codesourcery.com> ' * bfd/elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.': ChangeLog Makefile.in Makefile.tpl bfd/ChangeLog bfd/Makefile.am bfd/Makefile.in bfd/aclocal.m4 bfd/aix386-core.c bfd/archive.c bfd/archures.c bfd/bfd-in.h bfd/bfd-in2.h bfd/coff-tic54x.c bfd/config.bfd bfd/config.in bfd/configure bfd/configure.in bfd/cpu-frv.c bfd/cpu-sh.c bfd/doc/ChangeLog bfd/doc/Makefile.in bfd/dwarf2.c bfd/elf-bfd.h bfd/elf-hppa.h bfd/elf-m10200.c bfd/elf-m10300.c bfd/elf.c bfd/elf32-arm.h bfd/elf32-avr.c bfd/elf32-cris.c bfd/elf32-d10v.c bfd/elf32-fr30.c bfd/elf32-frv.c bfd/elf32-h8300.c bfd/elf32-hppa.c bfd/elf32-i370.c bfd/elf32-i386.c bfd/elf32-i860.c bfd/elf32-ip2k.c bfd/elf32-iq2000.c bfd/elf32-m32r.c bfd/elf32-m68hc1x.c bfd/elf32-m68k.c bfd/elf32-mcore.c bfd/elf32-msp430.c bfd/elf32-openrisc.c bfd/elf32-ppc.c bfd/elf32-s390.c bfd/elf32-sh.c bfd/elf32-sparc.c bfd/elf32-v850.c bfd/elf32-vax.c bfd/elf32-xstormy16.c bfd/elf32-xtensa.c bfd/elf64-alpha.c bfd/elf64-hppa.c bfd/elf64-mmix.c bfd/elf64-ppc.c bfd/elf64-s390.c bfd/elf64-sh64.c bfd/elf64-sparc.c bfd/elf64-x86-64.c bfd/elflink.c bfd/elflink.h bfd/elfxx-ia64.c bfd/elfxx-mips.c bfd/hppabsd-core.c bfd/hpux-core.c bfd/irix-core.c bfd/libaout.h bfd/libbfd.c bfd/linker.c bfd/mach-o.c bfd/netbsd-core.c bfd/osf-core.c bfd/pdp11.c bfd/po/bfd.pot bfd/ptrace-core.c bfd/sco5-core.c bfd/targets.c bfd/trad-core.c bfd/version.h config/ChangeLog config/accross.m4 config/acx.m4 configure configure.in cpu/ChangeLog cpu/frv.cpu cpu/frv.opc gdb/ChangeLog gdb/MAINTAINERS gdb/Makefile.in gdb/NEWS gdb/PROBLEMS gdb/alpha-linux-tdep.c gdb/alpha-osf1-tdep.c gdb/alpha-tdep.c gdb/alphafbsd-tdep.c gdb/alphanbsd-tdep.c gdb/amd64-linux-nat.c gdb/amd64-linux-tdep.c gdb/amd64-nat.c gdb/amd64-tdep.c gdb/amd64-tdep.h gdb/amd64bsd-nat.c gdb/amd64fbsd-nat.c gdb/amd64nbsd-tdep.c gdb/amd64obsd-tdep.c gdb/arch-utils.c gdb/arch-utils.h gdb/arm-tdep.c gdb/bcache.c gdb/blockframe.c gdb/breakpoint.c gdb/config/alpha/fbsd.mt gdb/config/alpha/nm-fbsd.h gdb/config/arm/tm-embed.h gdb/config/arm/tm-linux.h gdb/config/frv/frv.mt gdb/config/frv/tm-frv.h gdb/config/i386/nm-fbsd.h gdb/config/i386/nm-fbsd64.h gdb/config/i386/nm-obsd.h gdb/config/ia64/tm-aix.h gdb/config/ia64/tm-linux.h gdb/config/m68k/tm-nbsd.h gdb/config/mips/tm-irix5.h gdb/config/mips/tm-irix6.h gdb/config/mips/tm-linux.h gdb/config/mips/tm-nbsd.h gdb/config/nm-bsd.h gdb/config/pa/tm-hppa.h gdb/config/pa/tm-hppa64.h gdb/config/powerpc/tm-linux.h gdb/config/rs6000/tm-rs6000.h gdb/config/sparc/nm-fbsd.h gdb/config/vax/tm-vaxbsd.h gdb/cp-namespace.c gdb/cris-tdep.c gdb/doc/ChangeLog gdb/doc/gdb.texinfo gdb/doc/gdbint.texinfo gdb/dummy-frame.c gdb/dummy-frame.h gdb/dwarf2-frame.c gdb/dwarf2read.c gdb/frame-base.c gdb/frame-unwind.c gdb/frame-unwind.h gdb/frame.c gdb/frame.h gdb/frv-linux-tdep.c gdb/frv-tdep.c gdb/frv-tdep.h gdb/gdb_obstack.h gdb/gdbarch.c gdb/gdbarch.h gdb/gdbarch.sh gdb/gdbserver/ChangeLog gdb/gdbserver/Makefile.in gdb/gdbserver/gdbreplay.c gdb/gdbserver/linux-low.c gdb/gdbserver/server.c gdb/gdbserver/server.h gdb/gdbserver/target.c gdb/gdbserver/target.h gdb/gdbserver/utils.c gdb/gdbtypes.c gdb/gnu-v3-abi.c gdb/h8300-tdep.c gdb/hppa-hpux-tdep.c gdb/hppa-tdep.c gdb/i386-interix-tdep.c gdb/i386-linux-tdep.c gdb/i386-nat.c gdb/i386-nto-tdep.c gdb/i386-sol2-tdep.c gdb/i386-tdep.c gdb/i386-tdep.h gdb/i386bsd-nat.c gdb/i386bsd-tdep.c gdb/i386nbsd-tdep.c gdb/i386obsd-tdep.c gdb/i387-tdep.c gdb/i387-tdep.h gdb/ia64-tdep.c gdb/infcall.c gdb/infcmd.c gdb/inferior.h gdb/infrun.c gdb/libunwind-frame.c gdb/lin-lwp.c gdb/m68hc11-tdep.c gdb/m68k-tdep.c gdb/m68klinux-tdep.c gdb/mcore-tdep.c gdb/mips-linux-tdep.c gdb/mips-tdep.c gdb/mipsnbsd-tdep.c gdb/mn10300-tdep.c gdb/ppc-linux-nat.c gdb/ppc-linux-tdep.c gdb/ppc-tdep.h gdb/ppcnbsd-tdep.c gdb/regcache.c gdb/reggroups.c gdb/remote-m32r-sdi.c gdb/remote.c gdb/rs6000-tdep.c gdb/s390-tdep.c gdb/sh-tdep.c gdb/sh64-tdep.c gdb/shnbsd-tdep.c gdb/solib-frv.c gdb/solib-svr4.c gdb/solib-svr4.h gdb/solib.c gdb/solist.h gdb/sparc-linux-tdep.c gdb/sparc-sol2-tdep.c gdb/sparc-tdep.c gdb/sparc64-sol2-tdep.c gdb/sparc64fbsd-tdep.c gdb/sparc64nbsd-tdep.c gdb/sparc64obsd-tdep.c gdb/sparcnbsd-tdep.c gdb/sparcobsd-tdep.c gdb/stabsread.c gdb/stack.c gdb/symtab.h gdb/target.c gdb/testsuite/ChangeLog gdb/testsuite/gdb.asm/openbsd.inc gdb/testsuite/gdb.base/auxv.c gdb/testsuite/gdb.base/auxv.exp gdb/testsuite/gdb.base/pc-fp.exp gdb/testsuite/gdb.base/watchpoint.exp gdb/testsuite/gdb.cp/classes.exp gdb/testsuite/gdb.cp/local.exp gdb/testsuite/gdb.cp/misc.cc gdb/testsuite/gdb.cp/rtti.exp gdb/testsuite/gdb.cp/rtti.h gdb/testsuite/gdb.cp/rtti1.cc gdb/testsuite/gdb.cp/rtti2.cc gdb/testsuite/gdb.cp/templates.exp gdb/trad-frame.c gdb/trad-frame.h gdb/tramp-frame.c gdb/tramp-frame.h gdb/tui/tui-data.c gdb/tui/tui-data.h gdb/tui/tui-layout.c gdb/tui/tui-regs.c gdb/tui/tui-regs.h gdb/tui/tui-win.c gdb/tui/tui-win.h gdb/user-regs.c gdb/v850-tdep.c gdb/version.in gdb/xstormy16-tdep.c include/ChangeLog include/bfdlink.h include/elf/ChangeLog include/elf/arm.h include/elf/frv.h include/elf/sh.h include/opcode/ChangeLog include/opcode/i386.h include/opcode/ppc.h libiberty/ChangeLog libiberty/Makefile.in libiberty/config.in libiberty/configure libiberty/configure.ac libiberty/pex-common.h libiberty/pex-unix.c libiberty/testsuite/test-demangle.c opcodes/ChangeLog opcodes/aclocal.m4 opcodes/config.in opcodes/configure opcodes/frv-asm.c opcodes/frv-desc.c opcodes/frv-desc.h opcodes/frv-dis.c opcodes/frv-ibld.c opcodes/frv-opc.c opcodes/frv-opc.h opcodes/i386-dis.c opcodes/po/POTFILES.in opcodes/po/de.po opcodes/po/opcodes.pot opcodes/ppc-dis.c opcodes/ppc-opc.c opcodes/sh-dis.c opcodes/sh-opc.h opcodes/sparc-dis.c sim/ChangeLog sim/MAINTAINERS sim/frv/ChangeLog sim/frv/Makefile.in sim/frv/arch.c sim/frv/arch.h sim/frv/cache.c sim/frv/cpu.h sim/frv/cpuall.h sim/frv/decode.c sim/frv/decode.h sim/frv/frv-sim.h sim/frv/frv.c sim/frv/interrupts.c sim/frv/memory.c sim/frv/mloop.in sim/frv/model.c sim/frv/profile-fr450.c sim/frv/profile.c sim/frv/registers.c sim/frv/sem.c sim/frv/traps.c sim/testsuite/ChangeLog sim/testsuite/sim/frv/allinsn.exp sim/testsuite/sim/frv/fr400/addss.cgs sim/testsuite/sim/frv/fr400/allinsn.exp sim/testsuite/sim/frv/fr400/scutss.cgs sim/testsuite/sim/frv/fr400/slass.cgs sim/testsuite/sim/frv/fr400/smass.cgs sim/testsuite/sim/frv/fr400/smsss.cgs sim/testsuite/sim/frv/fr400/smu.cgs sim/testsuite/sim/frv/fr400/subss.cgs sim/testsuite/sim/frv/interrupts/fp_exception-fr550.cgs sim/testsuite/sim/frv/interrupts/fp_exception.cgs sim/testsuite/sim/frv/mqlclrhs.cgs sim/testsuite/sim/frv/mqlmths.cgs sim/testsuite/sim/frv/mqsllhi.cgs sim/testsuite/sim/frv/mqsrahi.cgs Delete: gdb/amd64-linux-tdep.h gdb/config/alpha/tm-fbsd.h libiberty/acconfig.h
Diffstat (limited to 'Makefile.tpl')
-rw-r--r--Makefile.tpl463
1 files changed, 374 insertions, 89 deletions
diff --git a/Makefile.tpl b/Makefile.tpl
index 6a30f45..91fdae2 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -73,7 +73,6 @@ INSTALL_DATA = @INSTALL_DATA@
# Miscellaneous non-standard autoconf-set variables
# -------------------------------------------------
-links=@configlinks@
# The file containing GCC's version number.
gcc_version_trigger = @gcc_version_trigger@
gcc_version = @gcc_version@
@@ -516,89 +515,6 @@ do-[+make_target+]: [+make_target+]-host [+make_target+]-target
FOR target_modules +] \
maybe-[+make_target+]-target-[+module+][+
ENDFOR target_modules +]
-
-# GCC, the eternal special case
-.PHONY: maybe-[+make_target+]-gcc [+make_target+]-gcc
-maybe-[+make_target+]-gcc:
-[+make_target+]-gcc: [+
- FOR depend +]\
- [+depend+]-gcc [+
- ENDFOR depend +]
- @[ -f ./gcc/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing [+make_target+] in gcc" ; \
- (cd gcc && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+make_target+]) \
- || exit 1
-
-# Host modules.
-[+ FOR host_modules +]
-.PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
-maybe-[+make_target+]-[+module+]:
-[+ IF (match-value? = "missing" (get "make_target") ) +]
-# [+module+] doesn't support [+make_target+].
-[+make_target+]-[+module+]:
-[+ ELSE +]
-[+make_target+]-[+module+]: [+
- FOR depend +]\
- [+depend+]-[+module+] [+
- ENDFOR depend +]
- @[ -f ./[+module+]/Makefile ] || exit 0; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- echo "Doing [+make_target+] in [+module+]" ; \
- (cd [+module+] && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+make_target+]) \
- || exit 1
-[+ ENDIF +]
-[+ ENDFOR host_modules +]
-
-# Target modules.
-[+ FOR target_modules +]
-.PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
-maybe-[+make_target+]-target-[+module+]:
-[+ IF (match-value? = "missing" (get "make_target") ) +]
-# [+module+] doesn't support [+make_target+].
-[+make_target+]-target-[+module+]:
-[+ ELSE +]
-[+make_target+]-target-[+module+]: [+
- FOR depend +]\
- [+depend+]-target-[+module+] [+
- ENDFOR depend +]
- @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(SET_LIB_PATH) \
- echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]" ; \
- for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
- done; \
- (cd $(TARGET_SUBDIR)/[+module+] && \
- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
- "RANLIB=$${RANLIB}" \
- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
- [+make_target+]) \
- || exit 1
-[+ ENDIF +]
-[+ ENDFOR target_modules +]
[+ ENDFOR recursive_targets +]
# Here are the targets which correspond to the do-X targets.
@@ -932,6 +848,36 @@ install-[+module+]: installdirs
+] $(X11_FLAGS_TO_PASS)[+
ENDIF with_x +] install)
[+ ENDIF no_install +]
+
+# Other targets (info, dvi, etc.)
+[+ FOR recursive_targets +]
+.PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
+maybe-[+make_target+]-[+module+]:
+[+ IF (match-value? = "missing" (get "make_target") ) +]
+# [+module+] doesn't support [+make_target+].
+[+make_target+]-[+module+]:
+[+ ELSE +]
+[+make_target+]-[+module+]: [+
+ FOR depend +]\
+ [+depend+]-[+module+] [+
+ ENDFOR depend +]
+ @[ -f ./[+module+]/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_HOST_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing [+make_target+] in [+module+]" ; \
+ (cd [+module+] && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ [+make_target+]) \
+ || exit 1
+[+ ENDIF +]
+[+ ENDFOR recursive_targets +]
[+ ENDFOR host_modules +]
# ---------------------------------------
@@ -1058,6 +1004,36 @@ install-target-[+module+]: installdirs
(cd $(TARGET_SUBDIR)/[+module+] && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
[+ ENDIF no_install +]
+
+# Other targets (info, dvi, etc.)
+[+ FOR recursive_targets +]
+.PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
+maybe-[+make_target+]-target-[+module+]:
+[+ IF (match-value? = "missing" (get "make_target") ) +]
+# [+module+] doesn't support [+make_target+].
+[+make_target+]-target-[+module+]:
+[+ ELSE +]
+[+make_target+]-target-[+module+]: [+
+ FOR depend +]\
+ [+depend+]-target-[+module+] [+
+ ENDFOR depend +]
+ @[ -f $(TARGET_SUBDIR)/[+module+]/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ echo "Doing [+make_target+] in $(TARGET_SUBDIR)/[+module+]" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/[+module+] && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ [+make_target+]) \
+ || exit 1
+[+ ENDIF +]
+[+ ENDFOR recursive_targets +]
[+ ENDFOR target_modules +]
# ----------
@@ -1072,10 +1048,13 @@ install-target-[+module+]: installdirs
# Don't use shared host config.cache, as it will confuse later
# directories; GCC wants slightly different values for some
# precious variables. *sigh*
+
+# We must skip configuring if toplevel bootstrap is going.
.PHONY: configure-gcc maybe-configure-gcc
maybe-configure-gcc:
configure-gcc:
@test ! -f gcc/Makefile || exit 0; \
+ [ -f stage_last ] && exit 0; \
[ -d gcc ] || mkdir gcc; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -1118,14 +1097,14 @@ configure-gcc:
.PHONY: all-gcc maybe-all-gcc
maybe-all-gcc:
all-gcc: configure-gcc
- @if [ -f gcc/stage_last ] ; then \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ if [ -f stage_last ] ; then \
+ true ; \
+ elif [ -f gcc/stage_last ] ; then \
$(SET_LIB_PATH) \
(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) quickstrap); \
else \
- r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(SET_LIB_PATH) \
(cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) all); \
fi
@@ -1263,6 +1242,312 @@ gcc-no-fixedincludes:
mv gcc/tmp-include gcc/include 2>/dev/null; \
else true; fi
+# Other targets (dvi, info, etc.)
+[+ FOR recursive_targets +]
+.PHONY: maybe-[+make_target+]-gcc [+make_target+]-gcc
+maybe-[+make_target+]-gcc:
+[+make_target+]-gcc: [+
+ FOR depend +]\
+ [+depend+]-gcc [+
+ ENDFOR depend +]
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(SET_LIB_PATH) \
+ for flag in $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing [+make_target+] in gcc" ; \
+ (cd gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ [+make_target+]) \
+ || exit 1
+
+[+ ENDFOR recursive_targets +]
+
+# ---------------------
+# GCC bootstrap support
+# ---------------------
+
+# We name the directories for the various stages "stage1-gcc",
+# "stage2-gcc","stage3-gcc", etc.
+# Unfortunately, the 'compare' process will fail (on debugging information)
+# if any directory names are different!
+# So in the building rule for each stage, we relocate them before and after.
+# The current one is 'gcc', while the previous one is 'prev-gcc'. (The
+# current one must be 'gcc' for now because the scripts in that directory
+# assume it.)
+# At the end of the bootstrap, 'stage3-gcc' must be moved to 'gcc' so that
+# libraries can find it. Ick!
+
+# Bugs: This is almost certainly not parallel-make safe.
+
+# 'touch' doesn't work right on some platforms.
+STAMP = echo timestamp >
+
+# Only build the C compiler for stage1, because that is the only one that
+# we can guarantee will build with the native compiler, and also it is the
+# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
+# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+# overrideable (for a bootstrap build stage1 also builds gcc.info).
+
+STAGE1_CFLAGS=@stage1_cflags@
+STAGE1_LANGUAGES=@stage1_languages@
+
+# For stage 1:
+# * We force-disable intermodule optimizations, even if
+# --enable-intermodule was passed, since the installed compiler probably
+# can't handle them. Luckily, autoconf always respects
+# the last argument when conflicting --enable arguments are passed.
+# * Likewise, we force-disable coverage flags, since the installed compiler
+# probably has never heard of them.
+# * We build only C (and possibly Ada).
+configure-stage1-gcc:
+ echo configure-stage1-gcc > stage_last ; \
+ if [ -f stage1-gcc/Makefile ] ; then \
+ $(STAMP) configure-stage1-gcc ; \
+ exit 0; \
+ else \
+ true ; \
+ fi ; \
+ [ -d stage1-gcc ] || mkdir stage1-gcc; \
+ mv stage1-gcc gcc ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
+ CC="$(CC)"; export CC; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CXX="$(CXX)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ echo Configuring stage 1 in gcc; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} \
+ --disable-intermodule --disable-coverage \
+ --enable-languages="$(STAGE1_LANGUAGES)"; \
+ cd .. ; \
+ mv gcc stage1-gcc ; \
+ $(STAMP) configure-stage1-gcc
+
+# Real targets act phony if they depend on phony targets; this hack
+# prevents gratuitous rebuilding of stage 1.
+prebootstrap:
+ $(MAKE) all-bootstrap
+ $(STAMP) prebootstrap
+
+all-stage1-gcc: configure-stage1-gcc prebootstrap
+ echo all-stage1-gcc > stage_last ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ mv stage1-gcc gcc ; \
+ cd gcc && \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" \
+ || exit 1 ; \
+ cd .. ; \
+ mv gcc stage1-gcc ; \
+ $(STAMP) all-stage1-gcc
+
+# TODO: Deal with STAGE_PREFIX (which is only for ada, incidentally)
+configure-stage2-gcc: all-stage1-gcc
+ echo configure-stage2-gcc > stage_last ; \
+ if [ -f stage2-gcc/Makefile ] ; then \
+ $(STAMP) configure-stage2-gcc ; \
+ exit 0; \
+ else \
+ true ; \
+ fi ; \
+ [ -d stage2-gcc ] || mkdir stage2-gcc; \
+ mv stage2-gcc gcc ; \
+ mv stage1-gcc prev-gcc ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
+ CC="$(CC)"; export CC; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CXX="$(CXX)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ echo Configuring stage 2 in gcc; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} ; \
+ cd .. ; \
+ mv gcc stage2-gcc ; \
+ mv prev-gcc stage1-gcc ; \
+ $(STAMP) configure-stage2-gcc
+
+# Flags to pass to stage2 and later makes.
+BOOT_CFLAGS= -g -O2
+POSTSTAGE1_FLAGS_TO_PASS = \
+ CFLAGS="$(BOOT_CFLAGS)" \
+ ADAC="\$$(CC)" \
+ WARN_CFLAGS="\$$(GCC_WARN_CFLAGS)" \
+ STRICT_WARN="\$$(STRICT2_WARN)" \
+ OUTPUT_OPTION="-o \$$@"
+
+all-stage2-gcc: all-stage1-gcc configure-stage2-gcc
+ echo all-stage2-gcc > stage_last ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ mv stage2-gcc gcc ; \
+ mv stage1-gcc prev-gcc ; \
+ cd gcc && \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) \
+ CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \
+ CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \
+ STAGE_PREFIX=$$r/prev-gcc/ \
+ $(POSTSTAGE1_FLAGS_TO_PASS) || exit 1 ; \
+ cd .. ; \
+ mv prev-gcc stage1-gcc ; \
+ mv gcc stage2-gcc ; \
+ $(STAMP) all-stage2-gcc
+
+configure-stage3-gcc: all-stage2-gcc
+ echo configure-stage3-gcc > stage_last ; \
+ if [ -f stage3-gcc/Makefile ] ; then \
+ $(STAMP) configure-stage3-gcc ; \
+ exit 0; \
+ else \
+ true ; \
+ fi ; \
+ [ -d stage3-gcc ] || mkdir stage3-gcc; \
+ mv stage3-gcc gcc ; \
+ mv stage1-gcc prev-gcc ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$(TOPLEVEL_CONFIGURE_ARGUMENTS)"; export TOPLEVEL_CONFIGURE_ARGUMENTS; \
+ CC="$(CC)"; export CC; \
+ CFLAGS="$(CFLAGS)"; export CFLAGS; \
+ CXX="$(CXX)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS)"; export CXXFLAGS; \
+ AR="$(AR)"; export AR; \
+ AS="$(AS)"; export AS; \
+ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
+ DLLTOOL="$(DLLTOOL)"; export DLLTOOL; \
+ LD="$(LD)"; export LD; \
+ NM="$(NM)"; export NM; \
+ RANLIB="$(RANLIB)"; export RANLIB; \
+ WINDRES="$(WINDRES)"; export WINDRES; \
+ OBJCOPY="$(OBJCOPY)"; export OBJCOPY; \
+ OBJDUMP="$(OBJDUMP)"; export OBJDUMP; \
+ echo Configuring stage 3 in gcc; \
+ cd gcc || exit 1; \
+ case $(srcdir) in \
+ \.) \
+ srcdiroption="--srcdir=."; \
+ libsrcdir=".";; \
+ /* | [A-Za-z]:[\\/]*) \
+ srcdiroption="--srcdir=$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ *) \
+ srcdiroption="--srcdir=../$(srcdir)/gcc"; \
+ libsrcdir="$$s/gcc";; \
+ esac; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) $${srcdiroption} ; \
+ cd .. ; \
+ mv gcc stage3-gcc ; \
+ mv prev-gcc stage2-gcc ; \
+ $(STAMP) configure-stage3-gcc
+
+all-stage3-gcc: all-stage2-gcc configure-stage3-gcc
+ echo all-stage3-gcc > stage_last ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ mv stage2-gcc prev-gcc ; \
+ mv stage3-gcc gcc ; \
+ cd gcc && \
+ $(MAKE) $(GCC_FLAGS_TO_PASS) \
+ CC="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \
+ CC_FOR_BUILD="$(STAGE_CC_WRAPPER) $$r/prev-gcc/xgcc$(exeext) -B$$r/prev-gcc/ -B$(build_tooldir)/bin/" \
+ STAGE_PREFIX=$$r/prev-gcc/ \
+ $(POSTSTAGE1_FLAGS_TO_PASS) || exit 1 ; \
+ cd .. ; \
+ mv prev-gcc stage2-gcc ; \
+ mv gcc stage3-gcc ; \
+ $(STAMP) all-stage3-gcc
+
+# We only want to compare .o files, so set this!
+objext = .o
+
+compare: all-stage3-gcc
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ rm -f .bad_compare ; \
+ cd stage3-gcc; \
+ files=`find . -name "*$(objext)" -print` ; \
+ cd .. ; \
+ for file in $${files} ; do \
+ cmp --ignore-initial=16 $$r/stage2-gcc/$$file $$r/stage3-gcc/$$file \
+ > /dev/null 2>&1; \
+ test $$? -eq 1 && echo $$file differs >> .bad_compare || true; \
+ done ; \
+ if [ -f .bad_compare ]; then \
+ echo "Bootstrap comparison failure!"; \
+ cat .bad_compare; \
+ exit 1; \
+ else \
+ true; \
+ fi ; \
+ $(STAMP) compare
+
+.PHONY: new-bootstrap
+# This target exists so that everything can be made in one pass.
+# 'all-gcc' has to avoid stomping on the bootstrap-generated gcc for
+# this to work.
+new-bootstrap: compare
+ mv stage3-gcc gcc ; \
+ $(MAKE) all ; \
+ mv gcc stage3-gcc
+
# --------------------------------------
# Dependencies between different modules
# --------------------------------------