From: Iain Buclaw Date: Mon, 7 Aug 2023 11:07:39 +0000 (+0200) Subject: d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f553b1471e7718b9deefa0d038af284181a302c0;p=binutils-gdb.git d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1) The D front-end is now itself written in D, in order to build GDC, you will need a working GDC compiler (GCC version 9.1 or later). GCC changes: - Add support for bootstrapping the D front-end. These add the required components in order to have a D front-end written in D itself. Because the compiler front-end only depends on the core runtime modules, only libdruntime is built for the bootstrap stages. D front-end changes: - Import dmd v2.098.0-beta.1. Druntime changes: - Import druntime v2.098.0-beta.1. Phobos changes: - Import phobos v2.098.0-beta.1. The jump from v2.076.1 to v2.098.0 covers nearly 4 years worth of development on the D programming language and run-time libraries. * Makefile.def: Add bootstrap to libbacktrace, libphobos, zlib, and libatomic. * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Fix command for GDC. (STAGE1_CONFIGURE_FLAGS): Add --with-libphobos-druntime-only if target-libphobos-bootstrap. (STAGE2_CONFIGURE_FLAGS): Likewise. --- diff --git a/Makefile.def b/Makefile.def index cf345987a60..d6cafdbc180 100644 --- a/Makefile.def +++ b/Makefile.def @@ -167,14 +167,14 @@ target_modules = { module= newlib; }; target_modules = { module= libgcc; bootstrap=true; no_check=true; missing=TAGS; missing=install-dvi; }; -target_modules = { module= libbacktrace; }; +target_modules = { module= libbacktrace; bootstrap=true; }; target_modules = { module= libquadmath; }; target_modules = { module= libgfortran; }; target_modules = { module= libobjc; missing=TAGS; missing=install-dvi; }; target_modules = { module= libgo; }; -target_modules = { module= libphobos; +target_modules = { module= libphobos; bootstrap=true; lib_path=src/.libs; }; target_modules = { module= libtermcap; no_check=true; missing=mostlyclean; @@ -185,13 +185,13 @@ target_modules = { module= winsup; }; target_modules = { module= libgloss; no_check=true; }; target_modules = { module= libffi; no_install=true; extra_configure_flags='--disable-shared --with-pic'; }; -target_modules = { module= zlib; }; +target_modules = { module= zlib; bootstrap=true; }; target_modules = { module= rda; }; target_modules = { module= libada; }; target_modules = { module= libgm2; lib_path=.libs; }; target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; }; target_modules = { module= libitm; lib_path=.libs; }; -target_modules = { module= libatomic; lib_path=.libs; }; +target_modules = { module= libatomic; bootstrap=true; lib_path=.libs; }; // These are (some of) the make targets to be done in each subdirectory. // Not all; these are the ones which don't have special options. diff --git a/Makefile.tpl b/Makefile.tpl index deb8ab4751b..485b2f16fd2 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -278,11 +278,14 @@ POSTSTAGE1_HOST_EXPORTS = \ $(POSTSTAGE1_CXX_EXPORT) \ $(LTO_EXPORTS) \ GDC="$$r/$(HOST_SUBDIR)/prev-gcc/gdc$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \ - -B$(build_tooldir)/bin/ $(GDC_FLAGS_FOR_TARGET) \ + -B$(build_tooldir)/bin/ $(GDCFLAGS_FOR_TARGET) \ + -B$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime/gcc \ -B$$r/prev-$(TARGET_SUBDIR)/libphobos/src \ + -B$$r/prev-$(TARGET_SUBDIR)/libphobos/src/.libs \ -I$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime -I$$s/libphobos/libdruntime \ -L$$r/prev-$(TARGET_SUBDIR)/libphobos/src/.libs \ - -L$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime/.libs"; \ + -B$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs \ + -L$$r/prev-$(TARGET_SUBDIR)/libstdc++-v3/src/.libs"; \ export GDC; \ GDC_FOR_BUILD="$$GDC"; export GDC_FOR_BUILD; \ GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind"; export GNATBIND; \ @@ -533,6 +536,11 @@ STAGE1_CONFIGURE_FLAGS = --disable-intermodule $(STAGE1_CHECKING) \ --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" \ --disable-build-format-warnings +@if target-libphobos-bootstrap +STAGE1_CONFIGURE_FLAGS += --with-libphobos-druntime-only +STAGE2_CONFIGURE_FLAGS += --with-libphobos-druntime-only +@endif target-libphobos-bootstrap + # When using the slow stage1 compiler disable IL verification and forcefully # enable it when using the stage2 compiler instead. As we later compare # stage2 and stage3 we are merely avoid doing redundant work, plus we apply