aboutsummaryrefslogtreecommitdiff
path: root/Makefile.tpl
diff options
context:
space:
mode:
authorGaius Mulley <gaiusmod2@gmail.com>2023-08-07 13:07:19 +0200
committerAlan Modra <amodra@gmail.com>2023-08-12 09:58:23 +0930
commit917f20be837fde9435e4297f16f2fbb448a0c650 (patch)
tree130ffb04fdf7ae5fbaf257cb4c1665558e43796d /Makefile.tpl
parent8fdbd80f1fce1ddac87d166b82fd41b2dff2824d (diff)
downloadgdb-917f20be837fde9435e4297f16f2fbb448a0c650.zip
gdb-917f20be837fde9435e4297f16f2fbb448a0c650.tar.gz
gdb-917f20be837fde9435e4297f16f2fbb448a0c650.tar.bz2
Merge modula-2 front end onto gcc.
This commit merges the devel/modula2 into master. The libraries reside in libgm2, the compiler in gcc/m2 and the testsuite in gcc/testsuite/gm2. * configure.ac (target_libraries): Add target-libgm2. Add NCN_STRICT_CHECK_TARGET_TOOLS entry for gm2. Add GCC_TARGET_TOOL entry for gm2. (compare_exclusions) add gcc/m2/gm2-compiler/M2Version, gcc/m2/gm2-compiler-boot/SYSTEM and gcc/m2/gm2version. * Makefile.def (target_modules): Add libgm2. (flags_to_pass) Add GM2_FOR_TARGET, GM2FLAGS_FOR_TARGET. (dependencies) Add all-target-libgm2 and on=all-target-libatomic. (languages) Add entry for language=m2 with gcc-check-target=check-m2 and lib-check-target=check-target-libgm2. * Makefile.tpl (BUILD_EXPORTS): Add definition for GM2 and GM2FLAGS. (HOST_EXPORTS) Add definition for GM2. (BASE_TARGET_EXPORTS) Add definition for GM2. (GM2_FOR_BUILD) Defined. (GM2FLAGS) Defined. (GM2_FOR_TARGET) Defined. (GM2FLAGS_FOR_TARGET) Defined. (EXTRA_HOST_FLAGS) Defined. (POSTSTAGE1_FLAGS_TO_PASS) Add GM2 and GM2_FOR_BUILD. (EXTRA_TARGET_FLAGS) Add GM2 and GM2FLAGS. (EXTRA_GCC_FLAGS) Add GM2_FOR_TARGET. Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'Makefile.tpl')
-rw-r--r--Makefile.tpl13
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile.tpl b/Makefile.tpl
index 54faca6..82c795e 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -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; \
@@ -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; \
@@ -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; \
@@ -377,6 +381,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@
@@ -447,6 +452,7 @@ CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
GOCFLAGS = $(CFLAGS)
GDCFLAGS = $(CFLAGS)
+GM2FLAGS = $(CFLAGS)
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
@@ -579,6 +585,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@
@@ -604,6 +611,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
@@ -710,6 +718,7 @@ EXTRA_HOST_FLAGS = \
'GFORTRAN=$(GFORTRAN)' \
'GOC=$(GOC)' \
'GDC=$(GDC)' \
+ 'GM2=$(GM2)' \
'LD=$(LD)' \
'LIPO=$(LIPO)' \
'NM=$(NM)' \
@@ -736,6 +745,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}" \
@@ -771,6 +781,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)' \
@@ -797,6 +809,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=/'`"