This patch contains the changes to files in the GCC top-level directory to introduce the Algol 68 front-end. --- MAINTAINERS | 2 + Makefile.def | 3 + Makefile.in | 1341 +++++++++++++++++++++++++++++++++++++++++++++- Makefile.tpl | 14 + SECURITY.txt | 1 + config/acx.m4 | 6 + configure | 296 +++++++++- configure.ac | 65 ++- include/dwarf2.h | 5 +- 9 files changed, 1706 insertions(+), 27 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS index 0c571bde8bc..827e53c0cdc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -171,6 +171,7 @@ objective-c/c++ Mike Stump <mikest...@comcast.net> objective-c/c++ Iain Sandoe <i...@sandoe.co.uk> Rust Arthur Cohen <arthur.co...@embecosm.com> Rust Philip Herron <herron.phi...@googlemail.com> +Algol 68 Jose E. Marchesi <jema...@gnu.org> Various Maintainers @@ -179,6 +180,7 @@ libcpp Per Bothner <p...@bothner.com> libcpp All C and C++ front end maintainers libcpp David Malcolm <dmalc...@redhat.com> fp-bit Ian Lance Taylor <i...@airs.com> +libgac Jose E. Marchesi <jema...@gnu.org> libgcc Ian Lance Taylor <i...@airs.com> libgo Ian Lance Taylor <i...@airs.com> libgomp Jakub Jelinek <ja...@redhat.com> diff --git a/Makefile.def b/Makefile.def index 19954e7d731..dcac62a8a98 100644 --- a/Makefile.def +++ b/Makefile.def @@ -205,6 +205,7 @@ target_modules = { module= zlib; bootstrap=true; }; target_modules = { module= rda; }; target_modules = { module= libada; }; target_modules = { module= libgm2; lib_path=.libs; }; +target_modules = { module= libgac; bootstrap=true; lib_path=.libs; }; target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; }; target_modules = { module= libitm; lib_path=.libs; }; target_modules = { module= libatomic; bootstrap=true; lib_path=.libs; }; @@ -727,6 +728,8 @@ languages = { language=d; gcc-check-target=check-d; lib-check-target=check-target-libphobos; }; languages = { language=jit; gcc-check-target=check-jit; }; languages = { language=rust; gcc-check-target=check-rust; }; +languages = { language=algol68; gcc-check-target=check-algol68; + lib-check-target=check-target-libgac; }; // Toplevel bootstrap bootstrap_stage = { id=1 ; }; diff --git a/Makefile.tpl b/Makefile.tpl index da38dca697a..6ab2ef86349 100644 --- a/Makefile.tpl +++ b/Makefile.tpl @@ -279,6 +279,11 @@ POSTSTAGE1_HOST_EXPORTS = \ CC_FOR_BUILD="$$CC"; export CC_FOR_BUILD; \ $(POSTSTAGE1_CXX_EXPORT) \ $(LTO_EXPORTS) \ + GAC="$$r/$(HOST_SUBDIR)/prev-gcc/gac$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \ + -B$(build_tooldir)/bin/ $(GACFLAGS_FOR_TARGET) \ + -B$$r/prev-$(TARGET_SUBDIR)/libgac/.libs"; \ + export GAC; \ + GAC_FOR_BUILD="$$GAC"; export GAC_FOR_BUILD; \ GDC="$$r/$(HOST_SUBDIR)/prev-gcc/gdc$(exeext) -B$$r/$(HOST_SUBDIR)/prev-gcc/ \ -B$(build_tooldir)/bin/ $(GDCFLAGS_FOR_TARGET) \ -B$$r/prev-$(TARGET_SUBDIR)/libphobos/libdruntime/gcc \ @@ -311,6 +316,7 @@ BASE_TARGET_EXPORTS = \ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \ GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \ + GAC="$(GAC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GAC; \ GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \ GDC="$(GDC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GDC; \ GM2="$(GM2_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GM2; \ @@ -379,6 +385,7 @@ CXX_FOR_BUILD = @CXX_FOR_BUILD@ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ DSYMUTIL_FOR_BUILD = @DSYMUTIL_FOR_BUILD@ GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@ +GAC_FOR_BUILD = @GAC_FOR_BUILD@ GOC_FOR_BUILD = @GOC_FOR_BUILD@ GDC_FOR_BUILD = @GDC_FOR_BUILD@ GM2_FOR_BUILD = @GM2_FOR_BUILD@ @@ -441,6 +448,7 @@ STRIP = @STRIP@ WINDRES = @WINDRES@ WINDMC = @WINDMC@ +GAC = @GAC@ GDC = @GDC@ GNATBIND = @GNATBIND@ GNATMAKE = @GNATMAKE@ @@ -451,6 +459,7 @@ LIBCFLAGS = $(CFLAGS) CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates GOCFLAGS = $(CFLAGS) +GACFLAGS = @GACFLAGS@ GDCFLAGS = @GDCFLAGS@ GM2FLAGS = $(CFLAGS) @@ -598,6 +607,7 @@ CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @CXX_FOR_TARGET@ RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @RAW_CXX_FOR_TARGET@ GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@ +GAC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GAC_FOR_TARGET@ GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@ GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@ DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ @@ -627,6 +637,7 @@ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@ GM2FLAGS_FOR_TARGET = -O2 -g GOCFLAGS_FOR_TARGET = -O2 -g +GACFLAGS_FOR_TARGET = -O2 -g GDCFLAGS_FOR_TARGET = -O2 -g FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ @@ -731,6 +742,7 @@ EXTRA_HOST_FLAGS = \ 'DSYMUTIL=$(DSYMUTIL)' \ 'GFORTRAN=$(GFORTRAN)' \ 'GOC=$(GOC)' \ + 'GAC=$(GAC)' \ 'GDC=$(GDC)' \ 'GM2=$(GM2)' \ 'LD=$(LD)' \ @@ -759,6 +771,7 @@ STAGE1_FLAGS_TO_PASS = \ POSTSTAGE1_FLAGS_TO_PASS = \ CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \ CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \ + GAC="$${GAC}" GAC_FOR_BUILD="$${GAC_FOR_BUILD}" \ GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \ GM2="$${GM2}" GM2_FOR_BUILD="$${GM2_FOR_BUILD}" \ GNATBIND="$${GNATBIND}" \ @@ -794,6 +807,7 @@ EXTRA_TARGET_FLAGS = \ 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \ + 'GAC=$$(GAC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ 'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ 'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \ 'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ diff --git a/SECURITY.txt b/SECURITY.txt index b38425ea223..2e448f076f0 100644 --- a/SECURITY.txt +++ b/SECURITY.txt @@ -85,6 +85,7 @@ Language runtime libraries * libcpp * libdecnumber * libffi + * ligac * libgcc * libgfortran * libgm2 diff --git a/config/acx.m4 b/config/acx.m4 index c45e55e7f51..343f66919f2 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -434,6 +434,12 @@ else have_cargo=no fi]) +# Test for Algol 68 +AC_DEFUN([ACX_PROG_GAC], +[AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) +AC_REQUIRE([AC_PROG_CC]) +AC_CHECK_TOOL(GAC, gac, no)]) + # Test for D. AC_DEFUN([ACX_PROG_GDC], [AC_REQUIRE([AC_CHECK_TOOL_PREFIX]) diff --git a/configure.ac b/configure.ac index 9a72b2311bd..c4aac82f9ab 100644 --- a/configure.ac +++ b/configure.ac @@ -163,6 +163,7 @@ target_libraries="target-libgcc \ target-libobjc \ target-libada \ target-libgm2 \ + target-libgac \ target-libgo \ target-libgrust \ target-libphobos \ @@ -511,6 +512,11 @@ if test "${ENABLE_LIBGM2}" != "yes" ; then noconfigdirs="$noconfigdirs gm2tools" fi +AC_ARG_ENABLE(libgac, +[AS_HELP_STRING([--enable-libgac], [build libgac directory])], +ENABLE_LIBGAC=$enableval, +ENABLE_LIBGAC=yes) + AC_ARG_ENABLE(libssp, [AS_HELP_STRING([--enable-libssp], [build libssp directory])], ENABLE_LIBSSP=$enableval, @@ -1362,6 +1368,7 @@ if test "${build}" != "${host}" ; then CXX_FOR_BUILD=${CXX_FOR_BUILD-g++} DSYMUTIL_FOR_BUILD=${DSYMUTIL_FOR_BUILD-dsymutil} GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran} + GAC_FOR_BUILD=${GAC_FOR_BUILD-gac} GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo} GDC_FOR_BUILD=${GDC_FOR_BUILD-gdc} DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool} @@ -1377,6 +1384,7 @@ else CXX_FOR_BUILD="\$(CXX)" DSYMUTIL_FOR_BUILD="\$(DSYMUTIL)" GFORTRAN_FOR_BUILD="\$(GFORTRAN)" + GAC_FOR_BUILD="\$(GAC)" GOC_FOR_BUILD="\$(GOC)" GDC_FOR_BUILD="\$(GDC)" DLLTOOL_FOR_BUILD="\$(DLLTOOL)" @@ -1430,6 +1438,7 @@ int main() {}])], fi ACX_PROG_GNAT +ACX_PROG_GAC ACX_PROG_GDC ACX_PROG_CARGO ACX_PROG_CMP_IGNORE_INITIAL @@ -2336,6 +2345,24 @@ if test -d ${srcdir}/gcc; then ;; esac + # Disable Algol 68 if no preexisting GAC is available. + # XXX + case ${add_this_lang}:${language}:${have_gac} in + yes:d:no) + # Specifically requested language; tell them. + AC_MSG_WARN([GAC is required to build $language]) + ;; + all:d:no) + AC_MSG_WARN([GAC is required to build $language]) + #XXX add_this_lang=unsupported + ;; + *:d:no) + # Silently disable. + #XXX + # add_this_lang=unsupported + ;; + esac + # Disable D if no preexisting GDC is available. case ${add_this_lang}:${language}:${have_gdc} in yes:d:no) @@ -2554,6 +2581,10 @@ AC_ARG_ENABLE(objc-gc, [AS_HELP_STRING([--enable-objc-gc], [enable use of Boehm's garbage collector with the GNU Objective-C runtime])]) +AC_ARG_ENABLE(algol68-gc, +[AS_HELP_STRING([--enable-algol68-gc], + [enable use of Boehm's garbage collector with the + GNU Algol runtime])]) AC_ARG_WITH([target-bdw-gc], [AS_HELP_STRING([--with-target-bdw-gc=PATHLIST], [specify prefix directory for installed bdw-gc package. @@ -2566,21 +2597,22 @@ AC_ARG_WITH([target-bdw-gc-lib], [AS_HELP_STRING([--with-target-bdw-gc-lib=PATHLIST], [specify directories for installed bdw-gc library])]) -case ,${enable_languages},:${enable_objc_gc} in *,objc,*:yes|*,objc,*:auto) - AC_MSG_CHECKING([for bdw garbage collector]) - if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then - dnl no bdw-gw options, assume default locations - AC_MSG_RESULT([using bdw-gc in default locations]) - else - dnl bdw-gw options, first error checking, complete checking in libobjc - if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then - AC_MSG_ERROR([found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing]) - elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then - AC_MSG_ERROR([found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing]) +case ,${enable_languages},:${enable_objc_gc}:${enable_algol68_gc} in + *,objc,*:yes:*|*,objc,*:auto:*|*,algol68,*:*:yes|*,algol68,*:*:auto) + AC_MSG_CHECKING([for bdw garbage collector]) + if test "x$with_target_bdw_gc$with_target_bdw_gc_include$with_target_bdw_gc_lib" = x; then + dnl no bdw-gw options, assume default locations + AC_MSG_RESULT([using bdw-gc in default locations]) else - AC_MSG_RESULT([using paths configured with --with-target-bdw-gc options]) + dnl bdw-gw options, first error checking, complete checking in libobjc and libgac + if test "x$with_target_bdw_gc_include" = x && test "x$with_target_bdw_gc_lib" != x; then + AC_MSG_ERROR([found --with-target-bdw-gc-lib but --with-target-bdw-gc-include missing]) + elif test "x$with_target_bdw_gc_include" != x && test "x$with_target_bdw_gc_lib" = x; then + AC_MSG_ERROR([found --with-target-bdw-gc-include but --with-target-bdw-gc-lib missing]) + else + AC_MSG_RESULT([using paths configured with --with-target-bdw-gc options]) + fi fi - fi esac # Disable libitm, libsanitizer, libvtv if we're not building C++ @@ -3809,6 +3841,7 @@ AC_SUBST(CXX_FOR_BUILD) AC_SUBST(DLLTOOL_FOR_BUILD) AC_SUBST(DSYMUTIL_FOR_BUILD) AC_SUBST(GFORTRAN_FOR_BUILD) +AC_SUBST(GAC_FOR_BUILD) AC_SUBST(GOC_FOR_BUILD) AC_SUBST(GDC_FOR_BUILD) AC_SUBST(LDFLAGS_FOR_BUILD) @@ -3903,6 +3936,9 @@ AC_SUBST(CC) AC_SUBST(CXX) AC_SUBST(CFLAGS) AC_SUBST(CXXFLAGS) +AC_SUBST(GAC) +AC_SUBST(GACFLAGS) +GACFLAGS=${GACFLAGS-${CFLAGS}} AC_SUBST(GDC) AC_SUBST(GDCFLAGS) GDCFLAGS=${GDCFLAGS-${CFLAGS}} @@ -3939,6 +3975,7 @@ NCN_STRICT_CHECK_TARGET_TOOLS(CC_FOR_TARGET, cc gcc) NCN_STRICT_CHECK_TARGET_TOOLS(CXX_FOR_TARGET, c++ g++ cxx gxx) NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TARGET, gcc, ${CC_FOR_TARGET}) NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran) +NCN_STRICT_CHECK_TARGET_TOOLS(GAC_FOR_TARGET, gac) NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo) NCN_STRICT_CHECK_TARGET_TOOLS(GDC_FOR_TARGET, gdc) NCN_STRICT_CHECK_TARGET_TOOLS(GM2_FOR_TARGET, gm2) @@ -3978,6 +4015,8 @@ GCC_TARGET_TOOL(gfortran, GFORTRAN_FOR_TARGET, GFORTRAN, [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran) GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC, [gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go) +GCC_TARGET_TOOL(gac, GAC_FOR_TARGET, GAC, + [gcc/gac -B$$r/$(HOST_SUBDIR)/gcc/], algol68) GCC_TARGET_TOOL(gdc, GDC_FOR_TARGET, GDC, [gcc/gdc -B$$r/$(HOST_SUBDIR)/gcc/], d) GCC_TARGET_TOOL(gm2, GM2_FOR_TARGET, GM2, diff --git a/include/dwarf2.h b/include/dwarf2.h index 1f4dbaf0a1e..5526a646dcb 100644 --- a/include/dwarf2.h +++ b/include/dwarf2.h @@ -425,7 +425,10 @@ enum dwarf_source_language DW_LANG_HP_Assembler = 0x8007, /* Rust extension, but replaced in DWARF 5. */ - DW_LANG_Rust_old = 0x9000 + DW_LANG_Rust_old = 0x9000, + + /* GNU Algol extension. */ + DW_LANG_Algol68 = 0x90001, }; /* Names and codes for macro information. */ -- 2.30.2