> "Jose E. Marchesi" <jose.march...@oracle.com> writes: > >> 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) > > 'd' isn't right here, should be 'algo68', but do we need a preexisting GAC? > (If so, where do > I get one?)
I have removed that snippet, which I copied from the libphobos one but I wasn't sure it was necessary (hence the XXX). > >> + # 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) >> [...]