Skip to content

Commit

Permalink
modula2 front end: changes outside gcc/m2, libgm2 and gcc/testsuite.
Browse files Browse the repository at this point in the history
This patch set contains the non machine generated changes found in /
for example the language die and documentation changes.  It also
contains the changes to the top level build Makefile infastructure
and the install.texi sourcebuild.texi documentation.

------8<----------8<----------8<----------8<----------8<----------8<----
  • Loading branch information
Gaius Mulley authored and ouuleilei-bot committed Dec 6, 2022
1 parent 81476bc commit 9d4b510
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Makefile.def
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ target_modules = { module= libffi; no_install=true; };
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; bootstrap=true; lib_path=.libs; };
Expand Down Expand Up @@ -306,6 +307,8 @@ flags_to_pass = { flag= GOC_FOR_TARGET ; };
flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= GDC_FOR_TARGET ; };
flags_to_pass = { flag= GDCFLAGS_FOR_TARGET ; };
flags_to_pass = { flag= GM2_FOR_TARGET ; };
flags_to_pass = { flag= GM2FLAGS_FOR_TARGET ; };
flags_to_pass = { flag= LD_FOR_TARGET ; };
flags_to_pass = { flag= LIPO_FOR_TARGET ; };
flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; };
Expand Down Expand Up @@ -617,6 +620,8 @@ dependencies = { module=configure-target-libgo; on=all-target-libstdc++-v3; };
dependencies = { module=all-target-libgo; on=all-target-libbacktrace; };
dependencies = { module=all-target-libgo; on=all-target-libffi; };
dependencies = { module=all-target-libgo; on=all-target-libatomic; };
dependencies = { module=configure-target-libgm2; on=all-target-libstdc++-v3; };
dependencies = { module=all-target-libgm2; on=all-target-libatomic; };
dependencies = { module=configure-target-libphobos; on=configure-target-libbacktrace; };
dependencies = { module=configure-target-libphobos; on=configure-target-zlib; };
dependencies = { module=all-target-libphobos; on=all-target-libbacktrace; };
Expand Down Expand Up @@ -672,6 +677,8 @@ languages = { language=obj-c++; gcc-check-target=check-obj-c++; };
languages = { language=go; gcc-check-target=check-go;
lib-check-target=check-target-libgo;
lib-check-target=check-gotools; };
languages = { language=m2; gcc-check-target=check-m2;
lib-check-target=check-target-libgm2; };
languages = { language=d; gcc-check-target=check-d;
lib-check-target=check-target-libphobos; };
languages = { language=jit; gcc-check-target=check-jit; };
Expand Down
13 changes: 13 additions & 0 deletions Makefile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ BUILD_EXPORTS = \
GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
GDC="$(GDC_FOR_BUILD)"; export GDC; \
GDCFLAGS="$(GDCFLAGS_FOR_BUILD)"; export GDCFLAGS; \
GM2="$(GM2_FOR_BUILD)"; export GM2; \
GM2FLAGS="$(GM2FLAGS_FOR_BUILD)"; export GM2FLAGS; \
DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
DSYMUTIL="$(DSYMUTIL_FOR_BUILD)"; export DSYMUTIL; \
LD="$(LD_FOR_BUILD)"; export LD; \
Expand Down Expand Up @@ -204,6 +206,7 @@ HOST_EXPORTS = \
GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \
GOC="$(GOC)"; export GOC; \
GDC="$(GDC)"; export GDC; \
GM2="$(GM2)"; export GM2; \
AR="$(AR)"; export AR; \
AS="$(AS)"; export AS; \
CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \
Expand Down Expand Up @@ -307,6 +310,7 @@ BASE_TARGET_EXPORTS = \
GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \
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; \
DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \
DSYMUTIL="$(DSYMUTIL_FOR_TARGET)"; export DSYMUTIL; \
LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
Expand Down Expand Up @@ -373,6 +377,7 @@ DSYMUTIL_FOR_BUILD = @DSYMUTIL_FOR_BUILD@
GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@
GOC_FOR_BUILD = @GOC_FOR_BUILD@
GDC_FOR_BUILD = @GDC_FOR_BUILD@
GM2_FOR_BUILD = @GM2_FOR_BUILD@
LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
LD_FOR_BUILD = @LD_FOR_BUILD@
NM_FOR_BUILD = @NM_FOR_BUILD@
Expand Down Expand Up @@ -443,6 +448,7 @@ CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
GOCFLAGS = $(CFLAGS)
GDCFLAGS = $(CFLAGS)
GM2FLAGS = $(CFLAGS)

# Pass additional PGO and LTO compiler options to the PGO build.
BUILD_CFLAGS = $(PGO_BUILD_CFLAGS) $(PGO_BUILD_LTO_CFLAGS)
Expand Down Expand Up @@ -578,6 +584,7 @@ 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@
GDC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GDC_FOR_TARGET@
GM2_FOR_TARGET=$(STAGE_CC_WRAPPER) @GM2_FOR_TARGET@
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
DSYMUTIL_FOR_TARGET=@DSYMUTIL_FOR_TARGET@
LD_FOR_TARGET=@LD_FOR_TARGET@
Expand All @@ -603,6 +610,7 @@ CXXFLAGS_FOR_TARGET = @CXXFLAGS_FOR_TARGET@
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
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
GDCFLAGS_FOR_TARGET = -O2 -g

Expand Down Expand Up @@ -709,6 +717,7 @@ EXTRA_HOST_FLAGS = \
'GFORTRAN=$(GFORTRAN)' \
'GOC=$(GOC)' \
'GDC=$(GDC)' \
'GM2=$(GM2)' \
'LD=$(LD)' \
'LIPO=$(LIPO)' \
'NM=$(NM)' \
Expand All @@ -735,6 +744,7 @@ POSTSTAGE1_FLAGS_TO_PASS = \
CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
CXX="$${CXX}" CXX_FOR_BUILD="$${CXX_FOR_BUILD}" \
GDC="$${GDC}" GDC_FOR_BUILD="$${GDC_FOR_BUILD}" \
GM2="$${GM2}" GM2_FOR_BUILD="$${GM2_FOR_BUILD}" \
GNATBIND="$${GNATBIND}" \
LDFLAGS="$${LDFLAGS}" \
HOST_LIBS="$${HOST_LIBS}" \
Expand Down Expand Up @@ -770,6 +780,8 @@ EXTRA_TARGET_FLAGS = \
'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \
'GDC=$$(GDC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'GDCFLAGS=$$(GDCFLAGS_FOR_TARGET)' \
'GM2=$$(GM2_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \
'GM2FLAGS=$$(GM2FLAGS_FOR_TARGET)' \
'LD=$(COMPILER_LD_FOR_TARGET)' \
'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \
'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \
Expand All @@ -796,6 +808,7 @@ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
# cross-building scheme.
EXTRA_GCC_FLAGS = \
"GCC_FOR_TARGET=$(GCC_FOR_TARGET) $$TFLAGS" \
"GM2_FOR_TARGET=$(GM2_FOR_TARGET) $$TFLAGS" \
"`echo 'STMP_FIXPROTO=$(STMP_FIXPROTO)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`" \
"`echo 'LIMITS_H_TEST=$(LIMITS_H_TEST)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"

Expand Down
17 changes: 16 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktr
# binutils, gas and ld appear in that order because it makes sense to run
# "make check" in that particular order.
# If --enable-gold is used, "gold" may replace "ld".
host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gotools c++tools"
host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gdbserver gprof etc expect dejagnu m4 utils guile fastjar gnattools libcc1 gm2tools gotools c++tools"

# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
Expand All @@ -161,6 +161,7 @@ target_libraries="target-libgcc \
target-libffi \
target-libobjc \
target-libada \
target-libgm2 \
target-libgo \
target-libphobos \
target-zlib"
Expand Down Expand Up @@ -464,6 +465,14 @@ if test "${ENABLE_LIBADA}" != "yes" ; then
noconfigdirs="$noconfigdirs gnattools"
fi

AC_ARG_ENABLE(libgm2,
[AS_HELP_STRING([--enable-libgm2], [build libgm2 directory])],
ENABLE_LIBGM2=$enableval,
ENABLE_LIBGM2=no)
if test "${ENABLE_LIBGM2}" != "yes" ; then
noconfigdirs="$noconfigdirs gm2tools"
fi

AC_ARG_ENABLE(libssp,
[AS_HELP_STRING([--enable-libssp], [build libssp directory])],
ENABLE_LIBSSP=$enableval,
Expand Down Expand Up @@ -3569,6 +3578,7 @@ 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(GOC_FOR_TARGET, gccgo)
NCN_STRICT_CHECK_TARGET_TOOLS(GDC_FOR_TARGET, gdc)
NCN_STRICT_CHECK_TARGET_TOOLS(GM2_FOR_TARGET, gm2)

ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar)
ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as)
Expand Down Expand Up @@ -3607,6 +3617,8 @@ GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC,
[gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go)
GCC_TARGET_TOOL(gdc, GDC_FOR_TARGET, GDC,
[gcc/gdc -B$$r/$(HOST_SUBDIR)/gcc/], d)
GCC_TARGET_TOOL(gm2, GM2_FOR_TARGET, GM2,
[gcc/gm2 -B$$r/$(HOST_SUBDIR)/gcc/], m2)
GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new])
GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO)
GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new])
Expand Down Expand Up @@ -3733,6 +3745,9 @@ AC_SUBST(stage2_werror_flag)
# Specify what files to not compare during bootstrap.

compare_exclusions="gcc/cc*-checksum\$(objext) | gcc/ada/*tools/*"
compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/M2Version*"
compare_exclusions="$compare_exclusions | gcc/m2/gm2-compiler-boot/SYSTEM*"
compare_exclusions="$compare_exclusions | gcc/m2/gm2version*"
case "$target" in
hppa*64*-*-hpux*) ;;
powerpc*-ibm-aix*) compare_exclusions="$compare_exclusions | *libgomp*\$(objext)" ;;
Expand Down
2 changes: 2 additions & 0 deletions gcc/dwarf2out.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25206,6 +25206,8 @@ gen_compile_unit_die (const char *filename)
}
else if (strcmp (language_string, "GNU F77") == 0)
language = DW_LANG_Fortran77;
else if (strcmp (language_string, "GNU Modula-2") == 0)
language = DW_LANG_Modula2;
else if (dwarf_version >= 3 || !dwarf_strict)
{
if (strcmp (language_string, "GNU Ada") == 0)
Expand Down

0 comments on commit 9d4b510

Please sign in to comment.