public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
@ 2019-06-14 13:10 Gaius Mulley
  2019-06-29 10:15 ` Richard Sandiford
                   ` (5 more replies)
  0 siblings, 6 replies; 45+ messages in thread
From: Gaius Mulley @ 2019-06-14 13:10 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 19776 bytes --]


Hello,

here is version two of the patches which introduce Modula-2 into the
GCC trunk.  The patches include:

  (*)  a patch to allow all front ends to register a lang spec function.
       (included are patches for all front ends to provide an empty
        callback function).
  (*)  patch diffs to allow the Modula-2 front end driver to be
       built using GCC Makefile and friends.

The compressed tarball includes:

  (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
       Including the need for registering lang spec functions.
  (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
       the gm2 driver is built and can understands --version).

These patches have been re-written after taking on board the comments
found in this thread:

   https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html

it is a revised patch set from:

   https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html

I've run make bootstrap and run the regression tests on trunk and no
extra failures occur for all languages touched in the ChangeLog.

I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
with amd64/arm64/i386) - these patches are currently simply for the
driver to minimise the patch size.  There are also > 1800 tests in a
dejagnu testsuite for gm2 which can be included at some future time.

Here are the proposed patches and ChangeLogs and new files (gm2-v2.tar.gz)
(after the patches):

./ChangeLog

14-06-2019  Gaius Mulley   <gaius.mulley@southwales.ac.uk>

        * configure.ac (GM2_FOR_BUILD): Added.
          (GM2_FOR_TARGET): Added.
          Request build driver program gm2.
        * Makefile.def (GM2_FOR_TARGET): Added.
          (GM2FLAGS_FOR_TARGET): Added.  Assign GM2,
          GM2_FOR_BUILD, GM2_FOR_TARGET and GM2FLAGS.
          Pass variables to make.  Add new language Modula-2
          (m2).
        * Makefile.tpl (GM2FLAGS): Added.  (GM2) Added.
          (GM2_FOR_BUILD) Added.

./gcc/ChangeLog

14-06-2019  Gaius Mulley   <gaius.mulley@southwales.ac.uk>

        * gcc.c (allow_linker): Global variable to disable
          linker by the front end.
          (handle_OPT_B): New function to handle the -B option.
          (fe_save_switch): New function to allow front ends to
          add switches.  (fe_B_prefix): New function to allow
          front ends to add their own -B option.
          (fe_remove_infile): Mark a source file
          as compiled.  (maybe_run_linker): Check allow_linker
          before running the linker.  (lookup_spec_function):
          search language specific functions.
          (driver::set_up_specs):  call lang_register_spec_functions.
        * gcc.h (fe_B_prefix): Prototype.  (fe_save_switch): Prototype.
          (allow_linker): Extern.
          (lang_register_spec_functions): Prototype.
          (fe_add_spec_function): Prototype.
        * gcc/brig/brigspec.c (lang_register_spec_functions): Added.
        * c/gccspec.c (lang_register_spec_functions): Added.
        * c-family/cppspec.c (lang_register_spec_functions): Added.
        * cp/g++spec.c (lang_register_spec_functions): Added.
        * d/d-spec.cc (lang_register_spec_functions): Added.
        * fortran/gfortranspec.c(lang_register_spec_functions): Added.
        * gcc/go/gospec.c (lang_register_spec_functions): Added.
        * jit/jit-spec.c (lang_register_spec_functions): Added.


--- gcc-versionno-orig/configure.ac	2019-05-28 22:11:37.993620055 +0100
+++ gcc-versionno/configure.ac	2019-05-28 22:39:16.345133571 +0100
@@ -1270,6 +1270,7 @@
   GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran}
   GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo}
   GDC_FOR_BUILD=${GDC_FOR_BUILD-gdc}
+  GM2_FOR_BUILD=${GM2_FOR_BUILD-gm2}
   DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool}
   LD_FOR_BUILD=${LD_FOR_BUILD-ld}
   NM_FOR_BUILD=${NM_FOR_BUILD-nm}
@@ -1284,6 +1285,7 @@
   GFORTRAN_FOR_BUILD="\$(GFORTRAN)"
   GOC_FOR_BUILD="\$(GOC)"
   GDC_FOR_BUILD="\$(GDC)"
+  GM2_FOR_BUILD="\$(GM2)"
   DLLTOOL_FOR_BUILD="\$(DLLTOOL)"
   LD_FOR_BUILD="\$(LD)"
   NM_FOR_BUILD="\$(NM)"
@@ -3272,6 +3274,7 @@
 AC_SUBST(GFORTRAN_FOR_BUILD)
 AC_SUBST(GOC_FOR_BUILD)
 AC_SUBST(GDC_FOR_BUILD)
+AC_SUBST(GM2_FOR_BUILD)
 AC_SUBST(LDFLAGS_FOR_BUILD)
 AC_SUBST(LD_FOR_BUILD)
 AC_SUBST(NM_FOR_BUILD)
@@ -3383,6 +3386,7 @@
 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)
@@ -3419,6 +3423,8 @@
 		[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/xgm2 -B$$r/$(HOST_SUBDIR)/gcc/], gm2)
 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])
--- gcc-versionno-orig/gcc/gcc.c	2019-05-28 22:15:19.368276992 +0100
+++ gcc-versionno/gcc/gcc.c	2019-06-05 18:14:52.702739525 +0100
@@ -305,6 +305,9 @@
 static const char *cross_compile = "0";
 #endif
 
+/* The lang specs might wish to override the default linker.  */
+int allow_linker = 1;
+
 /* Greatest exit code of sub-processes that has been encountered up to
    now.  */
 static int greatest_status = 1;
@@ -410,6 +413,7 @@
 static const char *debug_level_greater_than_spec_func (int, const char **);
 static const char *find_fortran_preinclude_file (int, const char **);
 static char *convert_white_space (char *);
+static void handle_OPT_B (const char *arg);
 \f
 /* The Specs Language
 
@@ -1655,6 +1659,10 @@
   { 0, 0 }
 };
 
+/* front end registered spec functions */
+static struct spec_function *lang_spec_functions = NULL;
+static unsigned int lang_spec_functions_length = 0;
+
 static int processing_spec_function;
 \f
 /* Add appropriate libgcc specs to OBSTACK, taking into account
@@ -3725,6 +3733,70 @@
   setenv ("SOURCE_DATE_EPOCH", source_date_epoch, 0);
 }
 
+/* Save an option OPT with N_ARGS arguments in array ARGS, marking it
+   as validated if VALIDATED.  */
+
+void
+fe_save_switch (const char *opt, size_t n_args, const char *const *args,
+		bool validated, bool known)
+{
+  save_switch (opt, n_args, args, validated, known);
+}
+
+/* fe_B_prefix allow the front end to add its own -B option.  */
+
+void
+fe_B_prefix (const char *arg)
+{
+  handle_OPT_B (arg);
+}
+
+/* Handle the -B option by adding the prefix to exec, startfile and
+   include search paths.  */
+
+static
+void handle_OPT_B (const char *arg)
+{
+  size_t len = strlen (arg);
+
+  /* Catch the case where the user has forgotten to append a
+     directory separator to the path.  Note, they may be using
+     -B to add an executable name prefix, eg "i386-elf-", in
+     order to distinguish between multiple installations of
+     GCC in the same directory.  Hence we must check to see
+     if appending a directory separator actually makes a
+     valid directory name.  */
+  if (!IS_DIR_SEPARATOR (arg[len - 1])
+      && is_directory (arg, false))
+    {
+      char *tmp = XNEWVEC (char, len + 2);
+      strcpy (tmp, arg);
+      tmp[len] = DIR_SEPARATOR;
+      tmp[++len] = 0;
+      arg = tmp;
+    }
+
+  add_prefix (&exec_prefixes, arg, NULL,
+	      PREFIX_PRIORITY_B_OPT, 0, 0);
+  add_prefix (&startfile_prefixes, arg, NULL,
+	      PREFIX_PRIORITY_B_OPT, 0, 0);
+  add_prefix (&include_prefixes, arg, NULL,
+	      PREFIX_PRIORITY_B_OPT, 0, 0);
+}
+
+/* Mark a source file as compiled.  */
+
+void
+fe_remove_infile (const char *name)
+{
+  int max = n_infiles + lang_specific_extra_outfiles;
+  int i;
+
+  for (i = 0; i < max; i++)
+    if (filename_cmp (name, infiles[i].name) == 0)
+      infiles[i].compiled = true;
+}
+
 /* Handle an option DECODED that is unknown to the option-processing
    machinery.  */
 
@@ -4204,33 +4276,7 @@
       break;
 
     case OPT_B:
-      {
-	size_t len = strlen (arg);
-
-	/* Catch the case where the user has forgotten to append a
-	   directory separator to the path.  Note, they may be using
-	   -B to add an executable name prefix, eg "i386-elf-", in
-	   order to distinguish between multiple installations of
-	   GCC in the same directory.  Hence we must check to see
-	   if appending a directory separator actually makes a
-	   valid directory name.  */
-	if (!IS_DIR_SEPARATOR (arg[len - 1])
-	    && is_directory (arg, false))
-	  {
-	    char *tmp = XNEWVEC (char, len + 2);
-	    strcpy (tmp, arg);
-	    tmp[len] = DIR_SEPARATOR;
-	    tmp[++len] = 0;
-	    arg = tmp;
-	  }
-
-	add_prefix (&exec_prefixes, arg, NULL,
-		    PREFIX_PRIORITY_B_OPT, 0, 0);
-	add_prefix (&startfile_prefixes, arg, NULL,
-		    PREFIX_PRIORITY_B_OPT, 0, 0);
-	add_prefix (&include_prefixes, arg, NULL,
-		    PREFIX_PRIORITY_B_OPT, 0, 0);
-      }
+      handle_OPT_B (arg);
       validated = true;
       break;
 
@@ -6069,6 +6115,34 @@
   return 0;
 }
 
+/* Allow the front end to register a spec function.  */
+
+void
+fe_add_spec_function (const char *name, const char *(*func) (int, const char **))
+{
+  const struct spec_function *f = lookup_spec_function (name);
+  struct spec_function *fl;
+  unsigned int i;
+
+  if (f != NULL)
+    fatal_error (input_location, "spec function (%s) already registered", name);
+
+  if (lang_spec_functions == NULL)
+    lang_spec_functions_length = 1;
+
+  lang_spec_functions_length++;
+  fl = (struct spec_function *) xmalloc (sizeof (const struct spec_function)*lang_spec_functions_length);
+  for (i=0; i<lang_spec_functions_length-2; i++)
+    fl[i] = lang_spec_functions[i];
+  free (lang_spec_functions);
+  lang_spec_functions = fl;
+
+  lang_spec_functions[lang_spec_functions_length-2].name = name;
+  lang_spec_functions[lang_spec_functions_length-2].func = func;
+  lang_spec_functions[lang_spec_functions_length-1].name = NULL;
+  lang_spec_functions[lang_spec_functions_length-1].func = NULL;
+}
+
 /* Look up a spec function.  */
 
 static const struct spec_function *
@@ -6080,6 +6154,11 @@
     if (strcmp (sf->name, name) == 0)
       return sf;
 
+  if (lang_spec_functions != NULL)
+    for (sf = lang_spec_functions; sf->name != NULL; sf++)
+      if (strcmp (sf->name, name) == 0)
+	return sf;
+
   return NULL;
 }
 
@@ -7563,6 +7642,8 @@
 			   accel_dir_suffix, dir_separator_str, NULL);
   just_machine_suffix = concat (spec_machine, dir_separator_str, NULL);
 
+  lang_register_spec_functions ();
+
   specs_file = find_a_file (&startfile_prefixes, "specs", R_OK, true);
   /* Read the specs file unless it is a default one.  */
   if (specs_file != 0 && strcmp (specs_file, "specs"))
@@ -8259,7 +8340,8 @@
 
   /* Run ld to link all the compiler output files.  */
 
-  if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2)
+  if (num_linker_inputs > 0 && !seen_error () && print_subprocess_help < 2
+      && allow_linker)
     {
       int tmp = execution_count;
 
@@ -8326,7 +8408,7 @@
   /* If options said don't run linker,
      complain about input files to be given to the linker.  */
 
-  if (! linker_was_run && !seen_error ())
+  if (! linker_was_run && !seen_error () && allow_linker)
     for (i = 0; (int) i < n_infiles; i++)
       if (explicit_link_files[i]
 	  && !(infiles[i].language && infiles[i].language[0] == '*'))
--- gcc-versionno-orig/gcc/gcc.h	2019-05-28 22:15:19.368276992 +0100
+++ gcc-versionno/gcc/gcc.h	2019-06-05 21:56:07.100326079 +0100
@@ -72,9 +72,14 @@
 extern int do_spec (const char *);
 extern void record_temp_file (const char *, int, int);
 extern void set_input (const char *);
+extern void fe_save_switch (const char *opt, size_t n_args,
+			    const char *const *args, bool validated);
+extern void fe_B_prefix (const char *arg);
 
 /* Spec files linked with gcc.c must provide definitions for these.  */
 
+extern void lang_register_spec_functions (void);
+
 /* Called before processing to change/add/remove arguments.  */
 extern void lang_specific_driver (struct cl_decoded_option **,
 				  unsigned int *, int *);
@@ -96,4 +101,12 @@
 					      void *user_data),
 				   void *user_data);
 
+/* Default setting is true, but can be overridden by the language
+   front end to prohibit the linker from being invoked.  */
+extern int allow_linker;
+
+extern void
+fe_add_spec_function (const char *name,
+		      const char *(*func) (int, const char **));
+
 #endif /* ! GCC_GCC_H */
--- gcc-versionno-orig/Makefile.def	2019-05-28 22:33:03.786431313 +0100
+++ gcc-versionno/Makefile.def	2019-06-06 20:05:25.389064754 +0100
@@ -284,6 +284,8 @@
 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 ; };
@@ -612,6 +614,7 @@
 				lib-check-target=check-target-libhsail-rt; };
 languages = { language=d;	gcc-check-target=check-d;
 				lib-check-target=check-target-libphobos; };
+languages = { language=m2;	gcc-check-target=check-m2; };
 
 // Toplevel bootstrap
 bootstrap_stage = { id=1 ; };
--- gcc-versionno-orig/Makefile.tpl	2019-05-28 22:33:04.658406768 +0100
+++ gcc-versionno/Makefile.tpl	2019-06-11 14:53:03.033696961 +0100
@@ -161,6 +161,8 @@
 	GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \
 	GDC="$(GDC_FOR_BUILD)"; export GDC; \
 	GDCFLAGS="$(GDCFLAGS_FOR_BUILD)"; export GDCFLAGS; \
+	GM2FLAGS="$(GM2FLAGS_FOR_BUILD)"; export GM2FLAGS; \
+	GM2="$(GM2_FOR_BUILD)"; export GM2; \
 	DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
 	LD="$(LD_FOR_BUILD)"; export LD; \
 	LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
@@ -198,6 +200,7 @@
 	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; \
@@ -295,6 +298,7 @@
 	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; \
 	LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \
 	LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \
@@ -361,6 +365,7 @@
 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@
@@ -430,6 +435,7 @@
 LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
 GOCFLAGS = $(CFLAGS)
 GDCFLAGS = $(CFLAGS)
+GM2FLAGS = $(CFLAGS)
 
 CREATE_GCOV = create_gcov
 
@@ -517,6 +523,7 @@
 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@
 LD_FOR_TARGET=@LD_FOR_TARGET@
 
@@ -543,6 +550,7 @@
 LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@
 GOCFLAGS_FOR_TARGET = -O2 -g
 GDCFLAGS_FOR_TARGET = -O2 -g
+GM2FLAGS_FOR_TARGET = -O2 -g
 
 FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@
 SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
@@ -646,6 +654,7 @@
 	'GFORTRAN=$(GFORTRAN)' \
 	'GOC=$(GOC)' \
 	'GDC=$(GDC)' \
+	'GM2=$(GM2)' \
 	'LD=$(LD)' \
 	'LIPO=$(LIPO)' \
 	'NM=$(NM)' \
@@ -672,6 +681,7 @@
 	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}" \
@@ -706,6 +716,8 @@
 	'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)' \
--- gcc-versionno-orig/gcc/brig/brigspec.c	2019-05-28 22:13:58.673160856 +0100
+++ gcc-versionno/gcc/brig/brigspec.c	2019-05-29 13:26:01.912054593 +0100
@@ -134,3 +134,9 @@
 /* Number of extra output files that lang_specific_pre_link may generate.  */
 
 int lang_specific_extra_outfiles = 0; /* Not used for Brig.  */
+
+/* lang_register_spec_functions.  Not used for Brig.  */
+void
+lang_register_spec_functions (void)
+{
+}
--- gcc-versionno-orig/gcc/c/gccspec.c	2019-05-28 22:14:41.268431069 +0100
+++ gcc-versionno/gcc/c/gccspec.c	2019-05-28 22:39:16.345133571 +0100
@@ -105,3 +105,9 @@
 
 /* Number of extra output files that lang_specific_pre_link may generate.  */
 int lang_specific_extra_outfiles = 0;  /* Not used for C.  */
+
+/* lang_register_spec_functions.  Not used for C.  */
+void
+lang_register_spec_functions (void)
+{
+}
--- gcc-versionno-orig/gcc/c-family/cppspec.c	2019-05-28 22:14:31.693053075 +0100
+++ gcc-versionno/gcc/c-family/cppspec.c	2019-05-28 22:39:16.349133480 +0100
@@ -198,3 +198,9 @@
 
 /* Number of extra output files that lang_specific_pre_link may generate.  */
 int lang_specific_extra_outfiles = 0;  /* Not used for cpp.  */
+
+/* lang_register_spec_functions.  Not used for cpp.  */
+void
+lang_register_spec_functions (void)
+{
+}
--- gcc-versionno-orig/gcc/cp/g++spec.c	2019-05-28 22:25:26.294430659 +0100
+++ gcc-versionno/gcc/cp/g++spec.c	2019-05-28 22:39:16.349133480 +0100
@@ -403,3 +403,9 @@
 
 /* Number of extra output files that lang_specific_pre_link may generate.  */
 int lang_specific_extra_outfiles = 0;  /* Not used for C++.  */
+
+/* lang_register_spec_functions.  Not used for C++.  */
+void
+lang_register_spec_functions (void)
+{
+}
--- gcc-versionno-orig/gcc/d/d-spec.cc	2019-05-28 22:14:48.807588205 +0100
+++ gcc-versionno/gcc/d/d-spec.cc	2019-05-29 13:22:28.178083707 +0100
@@ -514,3 +514,8 @@
 
 int lang_specific_extra_outfiles = 0;  /* Not used for D.  */
 
+/* lang_register_spec_functions.  Not used for D.  */
+void
+lang_register_spec_functions (void)
+{
+}
--- gcc-versionno-orig/gcc/fortran/gfortranspec.c	2019-05-28 22:27:32.773238257 +0100
+++ gcc-versionno/gcc/fortran/gfortranspec.c	2019-05-29 12:10:01.323261736 +0100
@@ -448,3 +448,9 @@
 
 /* Number of extra output files that lang_specific_pre_link may generate.  */
 int lang_specific_extra_outfiles = 0;	/* Not used for F77.  */
+
+/* lang_register_spec_functions.  Not used for F77.  */
+void
+lang_register_spec_functions (void)
+{
+}
--- gcc-versionno-orig/gcc/go/gospec.c	2019-05-28 22:25:46.061568405 +0100
+++ gcc-versionno/gcc/go/gospec.c	2019-05-29 12:08:38.862984663 +0100
@@ -440,3 +440,9 @@
 
 /* Number of extra output files that lang_specific_pre_link may generate.  */
 int lang_specific_extra_outfiles = 0;  /* Not used for Go.  */
+
+/* lang_register_spec_functions.  Not used for Go.  */
+void
+lang_register_spec_functions (void)
+{
+}
--- gcc-versionno-orig/gcc/jit/jit-spec.c	2019-05-28 22:15:27.567416541 +0100
+++ gcc-versionno/gcc/jit/jit-spec.c	2019-05-29 17:36:49.773426782 +0100
@@ -39,3 +39,9 @@
 
 /* Number of extra output files that lang_specific_pre_link may generate.  */
 int lang_specific_extra_outfiles = 0;  /* Not used for jit.  */
+
+/* lang_register_spec_functions.  Not used for jit.  */
+void
+lang_register_spec_functions (void)
+{
+}


[-- Attachment #2: gm2-v2.tar.gz --]
[-- Type: application/gzip, Size: 218914 bytes --]

[-- Attachment #3: Type: text/plain, Size: 47 bytes --]


hope the patches are useful,


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-06-14 13:10 [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2) Gaius Mulley
@ 2019-06-29 10:15 ` Richard Sandiford
  2019-06-29 12:52   ` Richard Biener
  2019-06-29 20:29   ` Gaius Mulley
  2019-06-29 18:08 ` Segher Boessenkool
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 45+ messages in thread
From: Richard Sandiford @ 2019-06-29 10:15 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: gcc-patches

Thanks for the patch and sorry for the slow reply.

Gaius Mulley <gaius.mulley@southwales.ac.uk> writes:
> Hello,
>
> here is version two of the patches which introduce Modula-2 into the
> GCC trunk.  The patches include:
>
>   (*)  a patch to allow all front ends to register a lang spec function.
>        (included are patches for all front ends to provide an empty
>         callback function).
>   (*)  patch diffs to allow the Modula-2 front end driver to be
>        built using GCC Makefile and friends.
>
> The compressed tarball includes:
>
>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>        Including the need for registering lang spec functions.
>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>        the gm2 driver is built and can understands --version).
>
> These patches have been re-written after taking on board the comments
> found in this thread:
>
>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html

Echoing a point Joseph made there: does this approach to linking work
with LTO, especially given the auto-generated main module?

I don't think that should hold up the patch, just curious.

> it is a revised patch set from:
>
>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>
> I've run make bootstrap and run the regression tests on trunk and no
> extra failures occur for all languages touched in the ChangeLog.
>
> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
> with amd64/arm64/i386) - these patches are currently simply for the
> driver to minimise the patch size.  There are also > 1800 tests in a
> dejagnu testsuite for gm2 which can be included at some future time.

It looks like the current GCC driver code is a bit of a half-transition
towards a more C++ way of doing things.  If we were going to embrace
that fully, I guess each frontend driver would get the opportunity
to subclass "driver" and override functions where appropriate.  It then
wouldn't be necessary to add each new hook to every frontend driver
(and force other out-of-tree frontends to do the same).

But that isn't how things work now, and going down that particular
rabbit hole shouldn't be a requirement for this patch.  So IMO the
approach you're taking is fine.

The same goes for the new functions that you're exporting.  Ideally
they'd be (protected?) member functions of "driver", but the internal
callers are at points where the driver object is no longer to hand.
Again, exposing functions follows existing practice so IMO is fine.

> Here are the proposed patches and ChangeLogs and new files (gm2-v2.tar.gz)
> (after the patches):
>
> ./ChangeLog
>

Sorry for the changelog nits, but:

> 14-06-2019  Gaius Mulley   <gaius.mulley@southwales.ac.uk>

Should be: 2019-06-14
Should only be two spaces between your name and email address.
(Not that I care, I just work here :-))

>         * configure.ac (GM2_FOR_BUILD): Added.
>           (GM2_FOR_TARGET): Added.
>           Request build driver program gm2.

Lines should be indented to under the "*" rather than two spaces beyond.

>         * Makefile.def (GM2_FOR_TARGET): Added.
>           (GM2FLAGS_FOR_TARGET): Added.  Assign GM2,
>           GM2_FOR_BUILD, GM2_FOR_TARGET and GM2FLAGS.
>           Pass variables to make.  Add new language Modula-2
>           (m2).
>         * Makefile.tpl (GM2FLAGS): Added.  (GM2) Added.
>           (GM2_FOR_BUILD) Added.

Missing newline before "GM2".  Looks like some of the Makefile.def
entries belong in Makefile.tpl instead.  E.g. GM2_FOR_BUILD is only
mentioned in Makefile.tpl.

Reordering things slightly...

> @@ -1655,6 +1659,10 @@
>    { 0, 0 }
>  };
>  
> +/* front end registered spec functions */
> +static struct spec_function *lang_spec_functions = NULL;
> +static unsigned int lang_spec_functions_length = 0;
> +
>  static int processing_spec_function;
>  \f
>  /* Add appropriate libgcc specs to OBSTACK, taking into account
> [...]
> +/* Allow the front end to register a spec function.  */
> +
> +void
> +fe_add_spec_function (const char *name, const char *(*func) (int, const char **))
> +{
> +  const struct spec_function *f = lookup_spec_function (name);
> +  struct spec_function *fl;
> +  unsigned int i;
> +
> +  if (f != NULL)
> +    fatal_error (input_location, "spec function (%s) already registered", name);
> +
> +  if (lang_spec_functions == NULL)
> +    lang_spec_functions_length = 1;
> +
> +  lang_spec_functions_length++;
> +  fl = (struct spec_function *) xmalloc (sizeof (const struct spec_function)*lang_spec_functions_length);
> +  for (i=0; i<lang_spec_functions_length-2; i++)
> +    fl[i] = lang_spec_functions[i];
> +  free (lang_spec_functions);
> +  lang_spec_functions = fl;
> +
> +  lang_spec_functions[lang_spec_functions_length-2].name = name;
> +  lang_spec_functions[lang_spec_functions_length-2].func = func;
> +  lang_spec_functions[lang_spec_functions_length-1].name = NULL;
> +  lang_spec_functions[lang_spec_functions_length-1].func = NULL;
> +}
> +

This would be simpler if you make lang_spec_functions a vec<spec_function>.

> @@ -3725,6 +3733,70 @@
>    setenv ("SOURCE_DATE_EPOCH", source_date_epoch, 0);
>  }
>  
> +/* Save an option OPT with N_ARGS arguments in array ARGS, marking it
> +   as validated if VALIDATED.  */
> +
> +void
> +fe_save_switch (const char *opt, size_t n_args, const char *const *args,
> +		bool validated, bool known)
> +{
> +  save_switch (opt, n_args, args, validated, known);
> +}
> +
> +/* fe_B_prefix allow the front end to add its own -B option.  */
> +
> +void
> +fe_B_prefix (const char *arg)
> +{
> +  handle_OPT_B (arg);
> +}

It'd be simpler to expose save_switch and handle_OPT_B directly rather
than use wrappers.  The "fe_" prefix isn't used for other public functions.

> +
> +/* Handle the -B option by adding the prefix to exec, startfile and
> +   include search paths.  */
> +
> +static
> +void handle_OPT_B (const char *arg)

Formatting, should be:

static void
handle_OPT_B (const char *arg)

(although I guess no longer static after the above).

> +/* Mark a source file as compiled.  */
> +
> +void
> +fe_remove_infile (const char *name)
> +{
> +  int max = n_infiles + lang_specific_extra_outfiles;
> +  int i;
> +
> +  for (i = 0; i < max; i++)
> +    if (filename_cmp (name, infiles[i].name) == 0)
> +      infiles[i].compiled = true;
> +}

AFAICT this is only used here:

------------------------------------------------------------------------
/* no_objects return an empty string, but also remove all objects
   from the command line.  */

extern void fe_remove_infile (const char *);

static const char *
no_objects (int argc ATTRIBUTE_UNUSED, const char *argv[] ATTRIBUTE_UNUSED)
{
  object_list *o;

  for (o = head_objects; o != NULL; o = o->next)
    fe_remove_infile (o->name);

  return NULL;
}
------------------------------------------------------------------------

which looks unnecessarily quadratic.  Is there a simpler way to do this?

Either way, the name fe_remove_infile seems inconsistent with the
comment and with what the code actually does.

> --- gcc-versionno-orig/gcc/fortran/gfortranspec.c	2019-05-28 22:27:32.773238257 +0100
> +++ gcc-versionno/gcc/fortran/gfortranspec.c	2019-05-29 12:10:01.323261736 +0100
> @@ -448,3 +448,9 @@
>  
>  /* Number of extra output files that lang_specific_pre_link may generate.  */
>  int lang_specific_extra_outfiles = 0;	/* Not used for F77.  */
> +
> +/* lang_register_spec_functions.  Not used for F77.  */
> +void
> +lang_register_spec_functions (void)
> +{
> +}

Heh, the (existing) F77 comments look a bit of out of date :-)

Some comments about the tar file (wasn't sure whether this was part
of the submission yet, or whether you were just including it because
of Joseph's request in the earlier thread):

All in-tree configure files are now called configure.ac, so it would be
good if gm2 did the same.

------------------------------------------------------------------------
AC_INIT(gm2config.h.in, 1.9.1, gm2@nongnu.org)
------------------------------------------------------------------------

Would this stay the same after the merge, or would the Savannah version
of gm2 no longer be maintained?

------------------------------------------------------------------------
#ifndef MATH_LIBRARY_PROFILE
#define MATH_LIBRARY_PROFILE MATH_LIBRARY
#endif

#ifndef LIBSTDCXX
#define LIBSTDCXX "stdc++"
#endif

#ifndef LIBSTDCXX_PROFILE
#define LIBSTDCXX_PROFILE LIBSTDCXX
#endif

#ifndef LIBSTDCXX_STATIC
#define LIBSTDCXX_STATIC NULL
#endif
------------------------------------------------------------------------

These macros in gm2spec.c don't seem to be used.  "stdc++" in particular
is hard-coded further down.

------------------------------------------------------------------------
/* assert, a simple assertion function.  */

static void
assert (int b)
{
  if (!b)
    {
      printf ("assert failed in gm2spec.c");
      exit (1);
    }
}
------------------------------------------------------------------------

Better to use gcc_assert.

------------------------------------------------------------------------
#if defined(DEBUGGING)
static void
printOption (const char *desc, struct cl_decoded_option **in_decoded_options,
             int i)
{
------------------------------------------------------------------------

Realise it's only a debugging function, but should be print_option.

------------------------------------------------------------------------
/* The last entry in libraryName must be the longest string in the
list.  This is the -flibs=name.  */
static const char *libraryName[maxlib]
    = { "iso", "pim", "ulm", "min", "log", "cor" };
------------------------------------------------------------------------

Some comments like this aren't properly indented (but most are).
Mind having a quick scan and fix?  Realise it'll be a bit tedious, sorry.

Why does the last entry need to be the longest?  It only seems to be
used in a strcmp loop, and the list is separated by commas.

The corresponding option documentation says:

------------------------------------------------------------------------
flibs=
Modula-2 Joined
specify the library order, currently legal entries include: logitech, min, pim-coroutine, ulm, iso
------------------------------------------------------------------------

but it sounds like the actual values are: log, min, pim, ulm and iso,
is that right?  Would be worth clarifying the documentation line if so.

------------------------------------------------------------------------
/* get_archive_name, return the corresponding archive name given the library
   name.  */

static const char *
get_archive_name (const char *library)
{
  libs i;

  for (i = iso; i < maxlib; i = (libs) ((int)i + 1))
    if (strcmp (libraryName[i], library) == 0)
      return archiveName[i];
  return NULL;
}

/* build_archive, returns a string containing the a path to the
   archive defined by, libpath, s, and, dialectLib.  */

static char *
build_archive (const char *library)
{
  if (library != NULL)
    {
      const char *a = get_archive_name (library);
      if (a != NULL)
        {
          char *s = (char *)xmalloc (strlen (a) + 1);
          strcpy (s, a);
          return s;
        }
    }
  return NULL;
}
------------------------------------------------------------------------

The comment above build_archive seems to be a bit mangled.

It looks like this code silently ignores unrecognised -flibs= options.
Is that the intended behaviour?  I couldn't see where the valid values
were enforced.

------------------------------------------------------------------------
  else if (gm2_prefix != NULL && !seen_fmakeall0)

    /* no need to issue a warning if seen_fmakeall0 as the parent will
    have set COMPILER_PATH and LIBRARY_PATH because of GM2_ROOT and users
    should not be using -fmakeall0 as it is an internal option.  */
    fprintf (stderr,
             "warning it is not advisible to set " GM2_PREFIX_ENV
             " as well as either " LIBRARY_PATH_ENV " or COMPILER_PATH\n");
------------------------------------------------------------------------

This should be a proper warning, using the diagnostic machinery.

Posting the tar file definitely helped to show how these things are used.
But one thing I'm still not sure about is why gm2 needs it's own -B-related
code, and why for example it needs:

------------------------------------------------------------------------
/* find_executable_path, if argv0 references an executable filename
   then use this path.  */

static const char *
find_executable_path (const char *argv0)
{
  if (access (argv0, X_OK) == 0)
    {
      const char *n = strrchr (argv0, DIR_SEPARATOR);

      /* strip off the program name from argv0, but leave the DIR_SEPARATOR. */
      if (n != NULL)
        {
          char *copy = xstrdup (argv0);
          char *n = strrchr (copy, DIR_SEPARATOR);
          n[1] = (char)0;
          return copy;
        }
    }
  return NULL;
}
------------------------------------------------------------------------

GCC supports a lot of (maybe too many?) different installation layouts,
so it would be good to reuse the existing search code and self-relocation
code if at all possible.  That might mean exposing more functions to the
frontend driver, but IMO that'd still be preferable.

Thanks,
Richard

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-06-29 10:15 ` Richard Sandiford
@ 2019-06-29 12:52   ` Richard Biener
  2019-06-29 20:29   ` Gaius Mulley
  1 sibling, 0 replies; 45+ messages in thread
From: Richard Biener @ 2019-06-29 12:52 UTC (permalink / raw)
  To: gcc-patches, Richard Sandiford, Gaius Mulley

On June 29, 2019 12:15:17 PM GMT+02:00, Richard Sandiford <richard.sandiford@arm.com> wrote:
>Thanks for the patch and sorry for the slow reply.
>
>Gaius Mulley <gaius.mulley@southwales.ac.uk> writes:
>> Hello,
>>
>> here is version two of the patches which introduce Modula-2 into the
>> GCC trunk.  The patches include:
>>
>>   (*)  a patch to allow all front ends to register a lang spec
>function.
>>        (included are patches for all front ends to provide an empty
>>         callback function).
>>   (*)  patch diffs to allow the Modula-2 front end driver to be
>>        built using GCC Makefile and friends.
>>
>> The compressed tarball includes:
>>
>>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>>        Including the need for registering lang spec functions.
>>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>>        the gm2 driver is built and can understands --version).
>>
>> These patches have been re-written after taking on board the comments
>> found in this thread:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
>
>Echoing a point Joseph made there: does this approach to linking work
>with LTO, especially given the auto-generated main module?
>
>I don't think that should hold up the patch, just curious.
>
>> it is a revised patch set from:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>>
>> I've run make bootstrap and run the regression tests on trunk and no
>> extra failures occur for all languages touched in the ChangeLog.
>>
>> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
>> with amd64/arm64/i386) - these patches are currently simply for the
>> driver to minimise the patch size.  There are also > 1800 tests in a
>> dejagnu testsuite for gm2 which can be included at some future time.
>
>It looks like the current GCC driver code is a bit of a half-transition
>towards a more C++ way of doing things.  If we were going to embrace
>that fully, I guess each frontend driver would get the opportunity
>to subclass "driver" and override functions where appropriate.  It then
>wouldn't be necessary to add each new hook to every frontend driver
>(and force other out-of-tree frontends to do the same).
>
>But that isn't how things work now, and going down that particular
>rabbit hole shouldn't be a requirement for this patch.  So IMO the
>approach you're taking is fine.
>
>The same goes for the new functions that you're exporting.  Ideally
>they'd be (protected?) member functions of "driver", but the internal
>callers are at points where the driver object is no longer to hand.
>Again, exposing functions follows existing practice so IMO is fine.

I know we have multiple driver binaries but at the same time we support -x language. How will this continue to work with lang spec files when not integrating all FE drivers into one? 

Richard. 

>> Here are the proposed patches and ChangeLogs and new files
>(gm2-v2.tar.gz)
>> (after the patches):
>>
>> ./ChangeLog
>>
>
>Sorry for the changelog nits, but:
>
>> 14-06-2019  Gaius Mulley   <gaius.mulley@southwales.ac.uk>
>
>Should be: 2019-06-14
>Should only be two spaces between your name and email address.
>(Not that I care, I just work here :-))
>
>>         * configure.ac (GM2_FOR_BUILD): Added.
>>           (GM2_FOR_TARGET): Added.
>>           Request build driver program gm2.
>
>Lines should be indented to under the "*" rather than two spaces
>beyond.
>
>>         * Makefile.def (GM2_FOR_TARGET): Added.
>>           (GM2FLAGS_FOR_TARGET): Added.  Assign GM2,
>>           GM2_FOR_BUILD, GM2_FOR_TARGET and GM2FLAGS.
>>           Pass variables to make.  Add new language Modula-2
>>           (m2).
>>         * Makefile.tpl (GM2FLAGS): Added.  (GM2) Added.
>>           (GM2_FOR_BUILD) Added.
>
>Missing newline before "GM2".  Looks like some of the Makefile.def
>entries belong in Makefile.tpl instead.  E.g. GM2_FOR_BUILD is only
>mentioned in Makefile.tpl.
>
>Reordering things slightly...
>
>> @@ -1655,6 +1659,10 @@
>>    { 0, 0 }
>>  };
>>  
>> +/* front end registered spec functions */
>> +static struct spec_function *lang_spec_functions = NULL;
>> +static unsigned int lang_spec_functions_length = 0;
>> +
>>  static int processing_spec_function;
>>  \f>
>>  /* Add appropriate libgcc specs to OBSTACK, taking into account
>> [...]
>> +/* Allow the front end to register a spec function.  */
>> +
>> +void
>> +fe_add_spec_function (const char *name, const char *(*func) (int,
>const char **))
>> +{
>> +  const struct spec_function *f = lookup_spec_function (name);
>> +  struct spec_function *fl;
>> +  unsigned int i;
>> +
>> +  if (f != NULL)
>> +    fatal_error (input_location, "spec function (%s) already
>registered", name);
>> +
>> +  if (lang_spec_functions == NULL)
>> +    lang_spec_functions_length = 1;
>> +
>> +  lang_spec_functions_length++;
>> +  fl = (struct spec_function *) xmalloc (sizeof (const struct
>spec_function)*lang_spec_functions_length);
>> +  for (i=0; i<lang_spec_functions_length-2; i++)
>> +    fl[i] = lang_spec_functions[i];
>> +  free (lang_spec_functions);
>> +  lang_spec_functions = fl;
>> +
>> +  lang_spec_functions[lang_spec_functions_length-2].name = name;
>> +  lang_spec_functions[lang_spec_functions_length-2].func = func;
>> +  lang_spec_functions[lang_spec_functions_length-1].name = NULL;
>> +  lang_spec_functions[lang_spec_functions_length-1].func = NULL;
>> +}
>> +
>
>This would be simpler if you make lang_spec_functions a
>vec<spec_function>.
>
>> @@ -3725,6 +3733,70 @@
>>    setenv ("SOURCE_DATE_EPOCH", source_date_epoch, 0);
>>  }
>>  
>> +/* Save an option OPT with N_ARGS arguments in array ARGS, marking
>it
>> +   as validated if VALIDATED.  */
>> +
>> +void
>> +fe_save_switch (const char *opt, size_t n_args, const char *const
>*args,
>> +		bool validated, bool known)
>> +{
>> +  save_switch (opt, n_args, args, validated, known);
>> +}
>> +
>> +/* fe_B_prefix allow the front end to add its own -B option.  */
>> +
>> +void
>> +fe_B_prefix (const char *arg)
>> +{
>> +  handle_OPT_B (arg);
>> +}
>
>It'd be simpler to expose save_switch and handle_OPT_B directly rather
>than use wrappers.  The "fe_" prefix isn't used for other public
>functions.
>
>> +
>> +/* Handle the -B option by adding the prefix to exec, startfile and
>> +   include search paths.  */
>> +
>> +static
>> +void handle_OPT_B (const char *arg)
>
>Formatting, should be:
>
>static void
>handle_OPT_B (const char *arg)
>
>(although I guess no longer static after the above).
>
>> +/* Mark a source file as compiled.  */
>> +
>> +void
>> +fe_remove_infile (const char *name)
>> +{
>> +  int max = n_infiles + lang_specific_extra_outfiles;
>> +  int i;
>> +
>> +  for (i = 0; i < max; i++)
>> +    if (filename_cmp (name, infiles[i].name) == 0)
>> +      infiles[i].compiled = true;
>> +}
>
>AFAICT this is only used here:
>
>------------------------------------------------------------------------
>/* no_objects return an empty string, but also remove all objects
>   from the command line.  */
>
>extern void fe_remove_infile (const char *);
>
>static const char *
>no_objects (int argc ATTRIBUTE_UNUSED, const char *argv[]
>ATTRIBUTE_UNUSED)
>{
>  object_list *o;
>
>  for (o = head_objects; o != NULL; o = o->next)
>    fe_remove_infile (o->name);
>
>  return NULL;
>}
>------------------------------------------------------------------------
>
>which looks unnecessarily quadratic.  Is there a simpler way to do
>this?
>
>Either way, the name fe_remove_infile seems inconsistent with the
>comment and with what the code actually does.
>
>> --- gcc-versionno-orig/gcc/fortran/gfortranspec.c	2019-05-28
>22:27:32.773238257 +0100
>> +++ gcc-versionno/gcc/fortran/gfortranspec.c	2019-05-29
>12:10:01.323261736 +0100
>> @@ -448,3 +448,9 @@
>>  
>>  /* Number of extra output files that lang_specific_pre_link may
>generate.  */
>>  int lang_specific_extra_outfiles = 0;	/* Not used for F77.  */
>> +
>> +/* lang_register_spec_functions.  Not used for F77.  */
>> +void
>> +lang_register_spec_functions (void)
>> +{
>> +}
>
>Heh, the (existing) F77 comments look a bit of out of date :-)
>
>Some comments about the tar file (wasn't sure whether this was part
>of the submission yet, or whether you were just including it because
>of Joseph's request in the earlier thread):
>
>All in-tree configure files are now called configure.ac, so it would be
>good if gm2 did the same.
>
>------------------------------------------------------------------------
>AC_INIT(gm2config.h.in, 1.9.1, gm2@nongnu.org)
>------------------------------------------------------------------------
>
>Would this stay the same after the merge, or would the Savannah version
>of gm2 no longer be maintained?
>
>------------------------------------------------------------------------
>#ifndef MATH_LIBRARY_PROFILE
>#define MATH_LIBRARY_PROFILE MATH_LIBRARY
>#endif
>
>#ifndef LIBSTDCXX
>#define LIBSTDCXX "stdc++"
>#endif
>
>#ifndef LIBSTDCXX_PROFILE
>#define LIBSTDCXX_PROFILE LIBSTDCXX
>#endif
>
>#ifndef LIBSTDCXX_STATIC
>#define LIBSTDCXX_STATIC NULL
>#endif
>------------------------------------------------------------------------
>
>These macros in gm2spec.c don't seem to be used.  "stdc++" in
>particular
>is hard-coded further down.
>
>------------------------------------------------------------------------
>/* assert, a simple assertion function.  */
>
>static void
>assert (int b)
>{
>  if (!b)
>    {
>      printf ("assert failed in gm2spec.c");
>      exit (1);
>    }
>}
>------------------------------------------------------------------------
>
>Better to use gcc_assert.
>
>------------------------------------------------------------------------
>#if defined(DEBUGGING)
>static void
>printOption (const char *desc, struct cl_decoded_option
>**in_decoded_options,
>             int i)
>{
>------------------------------------------------------------------------
>
>Realise it's only a debugging function, but should be print_option.
>
>------------------------------------------------------------------------
>/* The last entry in libraryName must be the longest string in the
>list.  This is the -flibs=name.  */
>static const char *libraryName[maxlib]
>    = { "iso", "pim", "ulm", "min", "log", "cor" };
>------------------------------------------------------------------------
>
>Some comments like this aren't properly indented (but most are).
>Mind having a quick scan and fix?  Realise it'll be a bit tedious,
>sorry.
>
>Why does the last entry need to be the longest?  It only seems to be
>used in a strcmp loop, and the list is separated by commas.
>
>The corresponding option documentation says:
>
>------------------------------------------------------------------------
>flibs=
>Modula-2 Joined
>specify the library order, currently legal entries include: logitech,
>min, pim-coroutine, ulm, iso
>------------------------------------------------------------------------
>
>but it sounds like the actual values are: log, min, pim, ulm and iso,
>is that right?  Would be worth clarifying the documentation line if so.
>
>------------------------------------------------------------------------
>/* get_archive_name, return the corresponding archive name given the
>library
>   name.  */
>
>static const char *
>get_archive_name (const char *library)
>{
>  libs i;
>
>  for (i = iso; i < maxlib; i = (libs) ((int)i + 1))
>    if (strcmp (libraryName[i], library) == 0)
>      return archiveName[i];
>  return NULL;
>}
>
>/* build_archive, returns a string containing the a path to the
>   archive defined by, libpath, s, and, dialectLib.  */
>
>static char *
>build_archive (const char *library)
>{
>  if (library != NULL)
>    {
>      const char *a = get_archive_name (library);
>      if (a != NULL)
>        {
>          char *s = (char *)xmalloc (strlen (a) + 1);
>          strcpy (s, a);
>          return s;
>        }
>    }
>  return NULL;
>}
>------------------------------------------------------------------------
>
>The comment above build_archive seems to be a bit mangled.
>
>It looks like this code silently ignores unrecognised -flibs= options.
>Is that the intended behaviour?  I couldn't see where the valid values
>were enforced.
>
>------------------------------------------------------------------------
>  else if (gm2_prefix != NULL && !seen_fmakeall0)
>
>    /* no need to issue a warning if seen_fmakeall0 as the parent will
>  have set COMPILER_PATH and LIBRARY_PATH because of GM2_ROOT and users
>    should not be using -fmakeall0 as it is an internal option.  */
>    fprintf (stderr,
>             "warning it is not advisible to set " GM2_PREFIX_ENV
>         " as well as either " LIBRARY_PATH_ENV " or COMPILER_PATH\n");
>------------------------------------------------------------------------
>
>This should be a proper warning, using the diagnostic machinery.
>
>Posting the tar file definitely helped to show how these things are
>used.
>But one thing I'm still not sure about is why gm2 needs it's own
>-B-related
>code, and why for example it needs:
>
>------------------------------------------------------------------------
>/* find_executable_path, if argv0 references an executable filename
>   then use this path.  */
>
>static const char *
>find_executable_path (const char *argv0)
>{
>  if (access (argv0, X_OK) == 0)
>    {
>      const char *n = strrchr (argv0, DIR_SEPARATOR);
>
>/* strip off the program name from argv0, but leave the DIR_SEPARATOR.
>*/
>      if (n != NULL)
>        {
>          char *copy = xstrdup (argv0);
>          char *n = strrchr (copy, DIR_SEPARATOR);
>          n[1] = (char)0;
>          return copy;
>        }
>    }
>  return NULL;
>}
>------------------------------------------------------------------------
>
>GCC supports a lot of (maybe too many?) different installation layouts,
>so it would be good to reuse the existing search code and
>self-relocation
>code if at all possible.  That might mean exposing more functions to
>the
>frontend driver, but IMO that'd still be preferable.
>
>Thanks,
>Richard

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-06-14 13:10 [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2) Gaius Mulley
  2019-06-29 10:15 ` Richard Sandiford
@ 2019-06-29 18:08 ` Segher Boessenkool
  2019-07-02  0:18   ` Gaius Mulley
  2019-07-03  8:41 ` Rainer Orth
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 45+ messages in thread
From: Segher Boessenkool @ 2019-06-29 18:08 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: gcc-patches

Hi Gaius,

On Fri, Jun 14, 2019 at 02:09:48PM +0100, Gaius Mulley wrote:
> here is version two of the patches which introduce Modula-2 into the
> GCC trunk.  The patches include:
> 
>   (*)  a patch to allow all front ends to register a lang spec function.
>        (included are patches for all front ends to provide an empty
>         callback function).
>   (*)  patch diffs to allow the Modula-2 front end driver to be
>        built using GCC Makefile and friends.
> 
> The compressed tarball includes:
> 
>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>        Including the need for registering lang spec functions.
>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>        the gm2 driver is built and can understands --version).

I built on pwoerpc64-linux, with the patch and the tarball.

I first need this patch, because srcdir is an absolute path for me:

===
diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
index e2d5098..a423a9e 100644
--- a/gcc/m2/Make-lang.in
+++ b/gcc/m2/Make-lang.in
@@ -71,13 +71,13 @@ m2/gm2config.h:
             export AR ; \
             RANLIB=`echo $(RANLIB_FOR_TARGET) | sed -e "s/^ //"` ; \
             export RANLIB ; \
-            $(SHELL) -c '../$(srcdir)/m2/configure --srcdir=../$(srcdir)/m2 --t
+            $(SHELL) -c '$(srcdir)/m2/configure --srcdir=$(srcdir)/m2 --target=
         else \
-            $(SHELL) -c '../$(srcdir)/m2/configure --srcdir=../$(srcdir)/m2 --t
+            $(SHELL) -c '$(srcdir)/m2/configure --srcdir=$(srcdir)/m2 --target=
         fi
 
 m2/gm2version.c: m2/gm2version.h
-	cd m2 ; bash ../$(srcdir)/m2/tools-src/makeversion -p ../$(srcdir)
+	cd m2 ; bash $(srcdir)/m2/tools-src/makeversion -p $(srcdir)
 
 # Build hooks.
 
===

(This patch might not be correct, but it works for me to get things to
build, at least).

But then I still get build failures: it tries to run xgcc when it hasn't
been built yet.  ("it" == "something", I didn't keep logs, sorry).

I let it run overnight with -j1, and it finished.  The testsuite is
running now :-)


Segher

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-06-29 10:15 ` Richard Sandiford
  2019-06-29 12:52   ` Richard Biener
@ 2019-06-29 20:29   ` Gaius Mulley
  1 sibling, 0 replies; 45+ messages in thread
From: Gaius Mulley @ 2019-06-29 20:29 UTC (permalink / raw)
  To: gcc-patches; +Cc: richard.sandiford

Richard Sandiford <richard.sandiford@arm.com> writes:

> Thanks for the patch and sorry for the slow reply.
>
> Gaius Mulley <gaius.mulley@southwales.ac.uk> writes:
>> Hello,
>>
>> here is version two of the patches which introduce Modula-2 into the
>> GCC trunk.  The patches include:
>>
>>   (*)  a patch to allow all front ends to register a lang spec function.
>>        (included are patches for all front ends to provide an empty
>>         callback function).
>>   (*)  patch diffs to allow the Modula-2 front end driver to be
>>        built using GCC Makefile and friends.
>>
>> The compressed tarball includes:
>>
>>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>>        Including the need for registering lang spec functions.
>>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>>        the gm2 driver is built and can understands --version).
>>
>> These patches have been re-written after taking on board the comments
>> found in this thread:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
>
> Echoing a point Joseph made there: does this approach to linking work
> with LTO, especially given the auto-generated main module?
>
> I don't think that should hold up the patch, just curious.

Hi Richard,

many thanks for taking the time to review the patches and tarball.

I'm in the process of altering the ar and ranlib to gcc-ar/gcc-ranlib
and I'll test the -flto within gm2.  I think it should work - as gm2
utilises gcc to perform the final link and passes .o and .a files as
appropriate.  [Just finished testing and indeed it works - I need to
substitute ar and ranlib with their gcc-ar and gcc-ranlib counterparts].

>> it is a revised patch set from:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>>
>> I've run make bootstrap and run the regression tests on trunk and no
>> extra failures occur for all languages touched in the ChangeLog.
>>
>> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
>> with amd64/arm64/i386) - these patches are currently simply for the
>> driver to minimise the patch size.  There are also > 1800 tests in a
>> dejagnu testsuite for gm2 which can be included at some future time.
>
> It looks like the current GCC driver code is a bit of a half-transition
> towards a more C++ way of doing things.  If we were going to embrace
> that fully, I guess each frontend driver would get the opportunity
> to subclass "driver" and override functions where appropriate.  It then
> wouldn't be necessary to add each new hook to every frontend driver
> (and force other out-of-tree frontends to do the same).

sounds interesting - I guess this could result in a single driver binary
which could also make for a unified gcc?

> But that isn't how things work now, and going down that particular
> rabbit hole shouldn't be a requirement for this patch.  So IMO the
> approach you're taking is fine.
>
> The same goes for the new functions that you're exporting.  Ideally
> they'd be (protected?) member functions of "driver", but the internal
> callers are at points where the driver object is no longer to hand.
> Again, exposing functions follows existing practice so IMO is fine.

yes all possible I imagine.

>> Here are the proposed patches and ChangeLogs and new files (gm2-v2.tar.gz)
>> (after the patches):
>>
>> ./ChangeLog
>>
>
> Sorry for the changelog nits, but:
>
>> 14-06-2019  Gaius Mulley   <gaius.mulley@southwales.ac.uk>
>
> Should be: 2019-06-14
> Should only be two spaces between your name and email address.
> (Not that I care, I just work here :-))

no problem - I'll adjust to the house convention.

>>         * configure.ac (GM2_FOR_BUILD): Added.
>>           (GM2_FOR_TARGET): Added.
>>           Request build driver program gm2.
>
> Lines should be indented to under the "*" rather than two spaces
> beyond.

ok

>>         * Makefile.def (GM2_FOR_TARGET): Added.
>>           (GM2FLAGS_FOR_TARGET): Added.  Assign GM2,
>>           GM2_FOR_BUILD, GM2_FOR_TARGET and GM2FLAGS.
>>           Pass variables to make.  Add new language Modula-2
>>           (m2).
>>         * Makefile.tpl (GM2FLAGS): Added.  (GM2) Added.
>>           (GM2_FOR_BUILD) Added.
>
> Missing newline before "GM2".  Looks like some of the Makefile.def
> entries belong in Makefile.tpl instead.  E.g. GM2_FOR_BUILD is only
> mentioned in Makefile.tpl.
>
> Reordering things slightly...
>
>> @@ -1655,6 +1659,10 @@
>>    { 0, 0 }
>>  };
>>  
>> +/* front end registered spec functions */
>> +static struct spec_function *lang_spec_functions = NULL;
>> +static unsigned int lang_spec_functions_length = 0;
>> +
>>  static int processing_spec_function;
>>  \f
>>  /* Add appropriate libgcc specs to OBSTACK, taking into account
>> [...]
>> +/* Allow the front end to register a spec function.  */
>> +
>> +void
>> +fe_add_spec_function (const char *name, const char *(*func) (int, const char **))
>> +{
>> +  const struct spec_function *f = lookup_spec_function (name);
>> +  struct spec_function *fl;
>> +  unsigned int i;
>> +
>> +  if (f != NULL)
>> +    fatal_error (input_location, "spec function (%s) already registered", name);
>> +
>> +  if (lang_spec_functions == NULL)
>> +    lang_spec_functions_length = 1;
>> +
>> +  lang_spec_functions_length++;
>> +  fl = (struct spec_function *) xmalloc (sizeof (const struct spec_function)*lang_spec_functions_length);
>> +  for (i=0; i<lang_spec_functions_length-2; i++)
>> +    fl[i] = lang_spec_functions[i];
>> +  free (lang_spec_functions);
>> +  lang_spec_functions = fl;
>> +
>> +  lang_spec_functions[lang_spec_functions_length-2].name = name;
>> +  lang_spec_functions[lang_spec_functions_length-2].func = func;
>> +  lang_spec_functions[lang_spec_functions_length-1].name = NULL;
>> +  lang_spec_functions[lang_spec_functions_length-1].func = NULL;
>> +}
>> +
>
> This would be simpler if you make lang_spec_functions a
> vec<spec_function>.

yes indeed!

>> @@ -3725,6 +3733,70 @@
>>    setenv ("SOURCE_DATE_EPOCH", source_date_epoch, 0);
>>  }
>>  
>> +/* Save an option OPT with N_ARGS arguments in array ARGS, marking it
>> +   as validated if VALIDATED.  */
>> +
>> +void
>> +fe_save_switch (const char *opt, size_t n_args, const char *const *args,
>> +		bool validated, bool known)
>> +{
>> +  save_switch (opt, n_args, args, validated, known);
>> +}
>> +
>> +/* fe_B_prefix allow the front end to add its own -B option.  */
>> +
>> +void
>> +fe_B_prefix (const char *arg)
>> +{
>> +  handle_OPT_B (arg);
>> +}
>
> It'd be simpler to expose save_switch and handle_OPT_B directly rather
> than use wrappers.  The "fe_" prefix isn't used for other public
> functions.

sure

>> +
>> +/* Handle the -B option by adding the prefix to exec, startfile and
>> +   include search paths.  */
>> +
>> +static
>> +void handle_OPT_B (const char *arg)
>
> Formatting, should be:
>
> static void
> handle_OPT_B (const char *arg)
>
> (although I guess no longer static after the above).
>
>> +/* Mark a source file as compiled.  */
>> +
>> +void
>> +fe_remove_infile (const char *name)
>> +{
>> +  int max = n_infiles + lang_specific_extra_outfiles;
>> +  int i;
>> +
>> +  for (i = 0; i < max; i++)
>> +    if (filename_cmp (name, infiles[i].name) == 0)
>> +      infiles[i].compiled = true;
>> +}
>
> AFAICT this is only used here:
>
> ------------------------------------------------------------------------
> /* no_objects return an empty string, but also remove all objects
>    from the command line.  */
>
> extern void fe_remove_infile (const char *);
>
> static const char *
> no_objects (int argc ATTRIBUTE_UNUSED, const char *argv[] ATTRIBUTE_UNUSED)
> {
>   object_list *o;
>
>   for (o = head_objects; o != NULL; o = o->next)
>     fe_remove_infile (o->name);
>
>   return NULL;
> }
> ------------------------------------------------------------------------
>
> which looks unnecessarily quadratic.  Is there a simpler way to do this?
>
> Either way, the name fe_remove_infile seems inconsistent with the
> comment and with what the code actually does.

yes, I'll improve this code.

>> --- gcc-versionno-orig/gcc/fortran/gfortranspec.c	2019-05-28 22:27:32.773238257 +0100
>> +++ gcc-versionno/gcc/fortran/gfortranspec.c	2019-05-29 12:10:01.323261736 +0100
>> @@ -448,3 +448,9 @@
>>  
>>  /* Number of extra output files that lang_specific_pre_link may generate.  */
>>  int lang_specific_extra_outfiles = 0;	/* Not used for F77.  */
>> +
>> +/* lang_register_spec_functions.  Not used for F77.  */
>> +void
>> +lang_register_spec_functions (void)
>> +{
>> +}
>
> Heh, the (existing) F77 comments look a bit of out of date :-)
>
> Some comments about the tar file (wasn't sure whether this was part
> of the submission yet, or whether you were just including it because
> of Joseph's request in the earlier thread):
>
> All in-tree configure files are now called configure.ac, so it would be
> good if gm2 did the same.
>
> ------------------------------------------------------------------------
> AC_INIT(gm2config.h.in, 1.9.1, gm2@nongnu.org)
> ------------------------------------------------------------------------
>
> Would this stay the same after the merge, or would the Savannah version
> of gm2 no longer be maintained?

ah yes thank you, well spotted - yes indeed this should be changed to
https://gcc.gnu.org/bugs (BUGURL). Sure I'll move everything to use .ac

> ------------------------------------------------------------------------
> #ifndef MATH_LIBRARY_PROFILE
> #define MATH_LIBRARY_PROFILE MATH_LIBRARY
> #endif
>
> #ifndef LIBSTDCXX
> #define LIBSTDCXX "stdc++"
> #endif
>
> #ifndef LIBSTDCXX_PROFILE
> #define LIBSTDCXX_PROFILE LIBSTDCXX
> #endif
>
> #ifndef LIBSTDCXX_STATIC
> #define LIBSTDCXX_STATIC NULL
> #endif
> ------------------------------------------------------------------------
>
> These macros in gm2spec.c don't seem to be used.  "stdc++" in particular
> is hard-coded further down.

sure

> ------------------------------------------------------------------------
> /* assert, a simple assertion function.  */
>
> static void
> assert (int b)
> {
>   if (!b)
>     {
>       printf ("assert failed in gm2spec.c");
>       exit (1);
>     }
> }
> ------------------------------------------------------------------------
>
> Better to use gcc_assert.

ok

> ------------------------------------------------------------------------
> #if defined(DEBUGGING)
> static void
> printOption (const char *desc, struct cl_decoded_option **in_decoded_options,
>              int i)
> {
> ------------------------------------------------------------------------
>
> Realise it's only a debugging function, but should be print_option.

yes

> ------------------------------------------------------------------------
> /* The last entry in libraryName must be the longest string in the
> list.  This is the -flibs=name.  */
> static const char *libraryName[maxlib]
>     = { "iso", "pim", "ulm", "min", "log", "cor" };
> ------------------------------------------------------------------------
>
> Some comments like this aren't properly indented (but most are).
> Mind having a quick scan and fix?  Realise it'll be a bit tedious,
> sorry.

will do

> Why does the last entry need to be the longest?  It only seems to be
> used in a strcmp loop, and the list is separated by commas.
>
> The corresponding option documentation says:
>
> ------------------------------------------------------------------------
> flibs=
> Modula-2 Joined
> specify the library order, currently legal entries include: logitech, min, pim-coroutine, ulm, iso
> ------------------------------------------------------------------------
>
> but it sounds like the actual values are: log, min, pim, ulm and iso,
> is that right?  Would be worth clarifying the documentation line if
> so.

will correct the documentation.  The libraries are log, min, pim, ulm,
iso and cor.  The last entry being the longest is no longer true - will
cull that comment.

> ------------------------------------------------------------------------
> /* get_archive_name, return the corresponding archive name given the library
>    name.  */
>
> static const char *
> get_archive_name (const char *library)
> {
>   libs i;
>
>   for (i = iso; i < maxlib; i = (libs) ((int)i + 1))
>     if (strcmp (libraryName[i], library) == 0)
>       return archiveName[i];
>   return NULL;
> }
>
> /* build_archive, returns a string containing the a path to the
>    archive defined by, libpath, s, and, dialectLib.  */
>
> static char *
> build_archive (const char *library)
> {
>   if (library != NULL)
>     {
>       const char *a = get_archive_name (library);
>       if (a != NULL)
>         {
>           char *s = (char *)xmalloc (strlen (a) + 1);
>           strcpy (s, a);
>           return s;
>         }
>     }
>   return NULL;
> }
> ------------------------------------------------------------------------
>
> The comment above build_archive seems to be a bit mangled.

yes true - I'll rewrite it.

>
> It looks like this code silently ignores unrecognised -flibs= options.
> Is that the intended behaviour?  I couldn't see where the valid values
> were enforced.

yes it doesn't enforce them - I thought it would allow for 3rd party
libraries to be added alongside the gcc install.  But I guess it could
still check the directory names inside the install area if required.

> ------------------------------------------------------------------------
>   else if (gm2_prefix != NULL && !seen_fmakeall0)
>
>     /* no need to issue a warning if seen_fmakeall0 as the parent will
>     have set COMPILER_PATH and LIBRARY_PATH because of GM2_ROOT and users
>     should not be using -fmakeall0 as it is an internal option.  */
>     fprintf (stderr,
>              "warning it is not advisible to set " GM2_PREFIX_ENV
>              " as well as either " LIBRARY_PATH_ENV " or COMPILER_PATH\n");
> ------------------------------------------------------------------------
>
> This should be a proper warning, using the diagnostic machinery.

ah yes sorry

> Posting the tar file definitely helped to show how these things are used.
> But one thing I'm still not sure about is why gm2 needs it's own -B-related
> code, and why for example it needs:
>
> ------------------------------------------------------------------------
> /* find_executable_path, if argv0 references an executable filename
>    then use this path.  */
>
> static const char *
> find_executable_path (const char *argv0)
> {
>   if (access (argv0, X_OK) == 0)
>     {
>       const char *n = strrchr (argv0, DIR_SEPARATOR);
>
>       /* strip off the program name from argv0, but leave the DIR_SEPARATOR. */
>       if (n != NULL)
>         {
>           char *copy = xstrdup (argv0);
>           char *n = strrchr (copy, DIR_SEPARATOR);
>           n[1] = (char)0;
>           return copy;
>         }
>     }
>   return NULL;
> }
> ------------------------------------------------------------------------

> GCC supports a lot of (maybe too many?) different installation layouts,
> so it would be good to reuse the existing search code and self-relocation
> code if at all possible.  That might mean exposing more functions to the
> frontend driver, but IMO that'd still be preferable.

this was to allow users to have multiple versions installed (a while
back).  I suspect it is time to cull this code (at least) and re-examine
the current installation support routines and use them instead - as you
mention.

> Thanks,
> Richard

thanks for the patch review,


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-06-29 18:08 ` Segher Boessenkool
@ 2019-07-02  0:18   ` Gaius Mulley
  0 siblings, 0 replies; 45+ messages in thread
From: Gaius Mulley @ 2019-07-02  0:18 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: gcc-patches

Segher Boessenkool <segher@kernel.crashing.org> writes:

> Hi Gaius,
>
> On Fri, Jun 14, 2019 at 02:09:48PM +0100, Gaius Mulley wrote:
>> here is version two of the patches which introduce Modula-2 into the
>> GCC trunk.  The patches include:
>> 
>>   (*)  a patch to allow all front ends to register a lang spec function.
>>        (included are patches for all front ends to provide an empty
>>         callback function).
>>   (*)  patch diffs to allow the Modula-2 front end driver to be
>>        built using GCC Makefile and friends.
>> 
>> The compressed tarball includes:
>> 
>>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>>        Including the need for registering lang spec functions.
>>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>>        the gm2 driver is built and can understands --version).
>
> I built on pwoerpc64-linux, with the patch and the tarball.
>
> I first need this patch, because srcdir is an absolute path for me:
>
> ===
> diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in
> index e2d5098..a423a9e 100644
> --- a/gcc/m2/Make-lang.in
> +++ b/gcc/m2/Make-lang.in
> @@ -71,13 +71,13 @@ m2/gm2config.h:
>              export AR ; \
>              RANLIB=`echo $(RANLIB_FOR_TARGET) | sed -e "s/^ //"` ; \
>              export RANLIB ; \
> -            $(SHELL) -c '../$(srcdir)/m2/configure --srcdir=../$(srcdir)/m2 --t
> +            $(SHELL) -c '$(srcdir)/m2/configure --srcdir=$(srcdir)/m2 --target=
>          else \
> -            $(SHELL) -c '../$(srcdir)/m2/configure --srcdir=../$(srcdir)/m2 --t
> +            $(SHELL) -c '$(srcdir)/m2/configure --srcdir=$(srcdir)/m2 --target=
>          fi
>  
>  m2/gm2version.c: m2/gm2version.h
> -	cd m2 ; bash ../$(srcdir)/m2/tools-src/makeversion -p ../$(srcdir)
> +	cd m2 ; bash $(srcdir)/m2/tools-src/makeversion -p $(srcdir)
>  
>  # Build hooks.
>  
> ===
>
> (This patch might not be correct, but it works for me to get things to
> build, at least).
>
> But then I still get build failures: it tries to run xgcc when it hasn't
> been built yet.  ("it" == "something", I didn't keep logs, sorry).
>
> I let it run overnight with -j1, and it finished.  The testsuite is
> running now :-)
>
>
> Segher

Hi Segher,

many thanks for the patch and highlighting the relative vs absolute
srcdir build.  I've fixed the makeversion with a change to the script
(directory option added).  I'll work on the configure line and explore a
solution.  Yes -j1 is definitely an overnight task!


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-06-14 13:10 [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2) Gaius Mulley
  2019-06-29 10:15 ` Richard Sandiford
  2019-06-29 18:08 ` Segher Boessenkool
@ 2019-07-03  8:41 ` Rainer Orth
  2019-07-08 15:20   ` Gaius Mulley
  2019-07-08 21:21 ` Matthias Klose
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 45+ messages in thread
From: Rainer Orth @ 2019-07-03  8:41 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: gcc-patches

Hi Gaius,

> here is version two of the patches which introduce Modula-2 into the
> GCC trunk.  The patches include:
>
>   (*)  a patch to allow all front ends to register a lang spec function.
>        (included are patches for all front ends to provide an empty
>         callback function).
>   (*)  patch diffs to allow the Modula-2 front end driver to be
>        built using GCC Makefile and friends.
>
> The compressed tarball includes:
>
>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>        Including the need for registering lang spec functions.
>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>        the gm2 driver is built and can understands --version).
>
> These patches have been re-written after taking on board the comments
> found in this thread:
>
>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
>
> it is a revised patch set from:
>
>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>
> I've run make bootstrap and run the regression tests on trunk and no
> extra failures occur for all languages touched in the ChangeLog.
>
> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
> with amd64/arm64/i386) - these patches are currently simply for the
> driver to minimise the patch size.  There are also > 1800 tests in a
> dejagnu testsuite for gm2 which can be included at some future time.

I meant to give a build with gm2 included a try on Solaris, but ended up
pretty much confused:

* I've started with the gm2 repo on savannah.  Running the combine-trees
  script on master tried to combine gm2 with gcc 4.7.4.  Trying again
  with configure --with-gcc=none (no branch, for trunk?) didn't work
  either (don't remember the details off-hand).

* Next, I discovered and tried the gcc_trunk branch there.  While it
  matches the patch set you sent here, it lacks most of the compiler
  proper, which only lives on master!?  In addition, the patches in
  there lack support for building libgm2.  Those are present on the
  master branch (which has both trunk and trunc in
  gcc-versionno/gcc/gm2/patches/gcc).  I tried to merge the trees and
  apply the patches manually, but failed again later.

At this point, I gave up.  Am I missing something fundamental here?

Thanks.
        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-03  8:41 ` Rainer Orth
@ 2019-07-08 15:20   ` Gaius Mulley
  2019-07-08 15:31     ` Rainer Orth
  2019-07-08 15:41     ` Gaius Mulley
  0 siblings, 2 replies; 45+ messages in thread
From: Gaius Mulley @ 2019-07-08 15:20 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 2616 bytes --]

Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> Hi Gaius,
>
>> here is version two of the patches which introduce Modula-2 into the
>> GCC trunk.  The patches include:
>>
>>   (*)  a patch to allow all front ends to register a lang spec function.
>>        (included are patches for all front ends to provide an empty
>>         callback function).
>>   (*)  patch diffs to allow the Modula-2 front end driver to be
>>        built using GCC Makefile and friends.
>>
>> The compressed tarball includes:
>>
>>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>>        Including the need for registering lang spec functions.
>>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>>        the gm2 driver is built and can understands --version).
>>
>> These patches have been re-written after taking on board the comments
>> found in this thread:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
>>
>> it is a revised patch set from:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>>
>> I've run make bootstrap and run the regression tests on trunk and no
>> extra failures occur for all languages touched in the ChangeLog.
>>
>> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
>> with amd64/arm64/i386) - these patches are currently simply for the
>> driver to minimise the patch size.  There are also > 1800 tests in a
>> dejagnu testsuite for gm2 which can be included at some future time.
>
> I meant to give a build with gm2 included a try on Solaris, but ended up
> pretty much confused:
>
> * I've started with the gm2 repo on savannah.  Running the combine-trees
>   script on master tried to combine gm2 with gcc 4.7.4.  Trying again
>   with configure --with-gcc=none (no branch, for trunk?) didn't work
>   either (don't remember the details off-hand).
>
> * Next, I discovered and tried the gcc_trunk branch there.  While it
>   matches the patch set you sent here, it lacks most of the compiler
>   proper, which only lives on master!?  In addition, the patches in
>   there lack support for building libgm2.  Those are present on the
>   master branch (which has both trunk and trunc in
>   gcc-versionno/gcc/gm2/patches/gcc).  I tried to merge the trees and
>   apply the patches manually, but failed again later.
>
> At this point, I gave up.  Am I missing something fundamental here?
>
> Thanks.
>         Rainer

Hi Rainer,

it rather depends upon what you want, if you want the latest complete
gm2 grafting onto the svn gcc trunk then these two scripts will create a
patched tree and also rebuild gm2.


[-- Attachment #2: build scripts for gcc trunk --]
[-- Type: application/gzip, Size: 1110 bytes --]

[-- Attachment #3: Type: text/plain, Size: 748 bytes --]


[however please be careful with the scripts - they do assume that
everything will be built in $HOME/GM2 - read and adapt as necessary].

These will build a complete gm2 (from the master) - whereas the gcc_trunk
branch is used to track the patches which are posted to gcc-patches
(which are currently minimal and just build the gm2 driver).

There are snapshots available for 9.1.0, 8.2.0, 6.4.0 as well as back to
the older 4.7.4 series.

http://floppsie.comp.glam.ac.uk/download/c/gcc-9.1.0+gm2-git-latest.tar.gz
http://floppsie.comp.glam.ac.uk/download/c/gcc-8.2.0+gm2-git-latest.tar.gz
http://floppsie.comp.glam.ac.uk/download/c/gcc-6.4.0+gm2-git-latest.tar.gz

these tarballs are created using combine-trees, hope this helps,


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-08 15:20   ` Gaius Mulley
@ 2019-07-08 15:31     ` Rainer Orth
  2019-07-09  9:25       ` Rainer Orth
  2019-07-08 15:41     ` Gaius Mulley
  1 sibling, 1 reply; 45+ messages in thread
From: Rainer Orth @ 2019-07-08 15:31 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: gcc-patches

Hi Gaius,

>> I meant to give a build with gm2 included a try on Solaris, but ended up
>> pretty much confused:
>>
>> * I've started with the gm2 repo on savannah.  Running the combine-trees
>>   script on master tried to combine gm2 with gcc 4.7.4.  Trying again
>>   with configure --with-gcc=none (no branch, for trunk?) didn't work
>>   either (don't remember the details off-hand).
>>
>> * Next, I discovered and tried the gcc_trunk branch there.  While it
>>   matches the patch set you sent here, it lacks most of the compiler
>>   proper, which only lives on master!?  In addition, the patches in
>>   there lack support for building libgm2.  Those are present on the
>>   master branch (which has both trunk and trunc in
>>   gcc-versionno/gcc/gm2/patches/gcc).  I tried to merge the trees and
>>   apply the patches manually, but failed again later.
>>
>> At this point, I gave up.  Am I missing something fundamental here?
>>
>> Thanks.
>>         Rainer
>
> Hi Rainer,
>
> it rather depends upon what you want, if you want the latest complete
> gm2 grafting onto the svn gcc trunk then these two scripts will create a
> patched tree and also rebuild gm2.

that's my goal: I'd like to see if gm2 and libgm2 build on Solaris and
pass at least a reasonable number of tests.

> [however please be careful with the scripts - they do assume that
> everything will be built in $HOME/GM2 - read and adapt as necessary].

Ok, I will give it a try.

> These will build a complete gm2 (from the master) - whereas the gcc_trunk
> branch is used to track the patches which are posted to gcc-patches
> (which are currently minimal and just build the gm2 driver).

That explains the difference.  While the driver are certainly important
for review, they don't help much by themselves when building the code...

> these tarballs are created using combine-trees, hope this helps,

Certainly.  Thanks a lot.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-08 15:20   ` Gaius Mulley
  2019-07-08 15:31     ` Rainer Orth
@ 2019-07-08 15:41     ` Gaius Mulley
  1 sibling, 0 replies; 45+ messages in thread
From: Gaius Mulley @ 2019-07-08 15:41 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches

Gaius Mulley <gaius.mulley@southwales.ac.uk> writes:

> Hi Rainer,
>
> it rather depends upon what you want, if you want the latest complete
> gm2 grafting onto the svn gcc trunk then these two scripts will create a
> patched tree and also rebuild gm2.
>
>
>
> [however please be careful with the scripts - they do assume that
> everything will be built in $HOME/GM2 - read and adapt as necessary].
>
> These will build a complete gm2 (from the master) - whereas the gcc_trunk
> branch is used to track the patches which are posted to gcc-patches
> (which are currently minimal and just build the gm2 driver).

for clarification - eventually the gcc_trunk branch will contain the
complete compiler as more patches and more tarballs are included.  So
during the integration of gm2 into gcc it should equal the gcc svn trunk
and the current gm2 patch on the gcc-patches mailing list.


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-06-14 13:10 [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2) Gaius Mulley
                   ` (2 preceding siblings ...)
  2019-07-03  8:41 ` Rainer Orth
@ 2019-07-08 21:21 ` Matthias Klose
  2019-07-09  6:37   ` Matthias Klose
                     ` (5 more replies)
  2019-07-19 14:22 ` Matthias Klose
  2019-07-20 21:41 ` Matthias Klose
  5 siblings, 6 replies; 45+ messages in thread
From: Matthias Klose @ 2019-07-08 21:21 UTC (permalink / raw)
  To: Gaius Mulley, gcc-patches

On 14.06.19 15:09, Gaius Mulley wrote:
> 
> Hello,
> 
> here is version two of the patches which introduce Modula-2 into the
> GCC trunk.  The patches include:
> 
>   (*)  a patch to allow all front ends to register a lang spec function.
>        (included are patches for all front ends to provide an empty
>         callback function).
>   (*)  patch diffs to allow the Modula-2 front end driver to be
>        built using GCC Makefile and friends.
> 
> The compressed tarball includes:
> 
>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>        Including the need for registering lang spec functions.
>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>        the gm2 driver is built and can understands --version).
> 
> These patches have been re-written after taking on board the comments
> found in this thread:
> 
>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
> 
> it is a revised patch set from:
> 
>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
> 
> I've run make bootstrap and run the regression tests on trunk and no
> extra failures occur for all languages touched in the ChangeLog.
> 
> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
> with amd64/arm64/i386) - these patches are currently simply for the
> driver to minimise the patch size.  There are also > 1800 tests in a
> dejagnu testsuite for gm2 which can be included at some future time.

I had a look at the GCC 9 version of the patches, with a build including a make
install. Some comments:

 - A parallel build (at least with -j4) isn't working. A sequental
   build works fine.  I think forcing a sequential build will not
   work well, increasing the build time too much.

 - libgm2 multilib builds are not working.  <builddir>/<target>/32/libgm2
   is configured, but not built.

 - The internal tools in the gcclibdir are installed twice, with
   both vanilla names and prefixed/suffixed names.

 - libgm2/configure.a has a libtool version 14:0:0, however all
   shared libraries are installed with soversion 0.

 - no manual page for gm2m.

 - libpth.{a,so} is installed in the system libdir, which
   conflicts with the installation of the libpth packages
   on most distros.

 - There are three letter libraries with pretty generic
   names installed into the system libdir: log, iso, cor,
   min, ulm. At least for log, you have a file conflict
   with another library.  Shouldn't these libraries named
   mpre specific, like libgm2log?

Matthias

The installed tree:

./usr/bin
./usr/bin/x86_64-linux-gnu-gm2-9
./usr/bin/x86_64-linux-gnu-gm2m-9
./usr/lib/gcc/x86_64-linux-gnu
./usr/lib/gcc/x86_64-linux-gnu/9
./usr/lib/gcc/x86_64-linux-gnu/9/cc1gm2
./usr/lib/gcc/x86_64-linux-gnu/9/gm2l
./usr/lib/gcc/x86_64-linux-gnu/9/gm2lcc
./usr/lib/gcc/x86_64-linux-gnu/9/gm2lgen
./usr/lib/gcc/x86_64-linux-gnu/9/gm2lorder
./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-cc1gm2-9
./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2l-9
./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lcc-9
./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lgen-9
./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lorder-9
./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2m-9
./usr/lib/gcc/x86_64-linux-gnu/9/m2
./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor
./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/Debug.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/Debug.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/Executive.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/Executive.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/KeyBoardLEDs.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/libcor.a
./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/SYSTEM.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/SYSTEM.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/TimerHandler.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/TimerHandler.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ChanConsts.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ChanConsts.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/CharClass.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/CharClass.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ClientSocket.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ClientSocket.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ComplexMath.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ComplexMath.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ConvStringLong.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ConvStringLong.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ConvStringReal.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ConvStringReal.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ConvTypes.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ConvTypes.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/COROUTINES.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/COROUTINES.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ErrnoCategory.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/EXCEPTIONS.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/EXCEPTIONS.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/GeneralUserExceptions.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/GeneralUserExceptions.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOChan.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOChan.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOConsts.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOConsts.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOLink.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOLink.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOResult.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOResult.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/libiso.a
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongComplexMath.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongComplexMath.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongConv.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongConv.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongMath.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongMath.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongStr.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongStr.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongWholeIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongWholeIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LowLong.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LowLong.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LowReal.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LowReal.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LowShort.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LowShort.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/M2EXCEPTION.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/M2EXCEPTION.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/M2RTS.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/M2RTS.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/MemStream.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/MemStream.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Processes.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Processes.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ProgramArgs.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ProgramArgs.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/pth.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RandomNumber.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RandomNumber.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RawIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RawIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealConv.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealConv.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealMath.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealMath.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealStr.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealStr.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RndFile.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RndFile.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTdata.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTdata.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTentity.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTentity.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTfio.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTfio.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTgen.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTgenif.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTgenif.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTgen.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTio.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTio.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Semaphores.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Semaphores.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SeqFile.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SeqFile.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ServerSocket.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ServerSocket.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ShortComplexMath.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ShortComplexMath.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ShortIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ShortIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ShortWholeIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ShortWholeIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SimpleCipher.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SimpleCipher.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SIOResult.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SIOResult.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SLongIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SLongIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SLongWholeIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SLongWholeIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SRawIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SRawIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SRealIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SRealIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SShortIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SShortIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SShortWholeIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SShortWholeIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/StdChans.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/StdChans.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/STextIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/STextIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Storage.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Storage.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/StreamFile.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/StreamFile.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/StringChan.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/StringChan.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Strings.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Strings.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SWholeIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SWholeIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SysClock.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SysClock.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SYSTEM.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SYSTEM.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/TermFile.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/TermFile.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/TERMINATION.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/TERMINATION.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/TextIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/TextIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/WholeConv.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/WholeConv.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/WholeIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/WholeIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/WholeStr.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/WholeStr.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/wrapsock.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/wraptime.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BitBlockOps.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BitBlockOps.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BitByteOps.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BitByteOps.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BitWordOps.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BitWordOps.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BlockOps.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BlockOps.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Break.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/CardinalIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/CardinalIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Conversions.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Conversions.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/DebugPMD.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/DebugPMD.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/DebugTrace.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/DebugTrace.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Delay.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Delay.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Display.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Display.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/ErrorCode.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/ErrorCode.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/FileSystem.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/FileSystem.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/FloatingUtilities.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/FloatingUtilities.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/InOut.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/InOut.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Keyboard.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Keyboard.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/liblog.a
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/LongIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/LongIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/NumberConversion.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/NumberConversion.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Random.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Random.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/RealConversions.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/RealConversions.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/RealInOut.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/RealInOut.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Strings.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Strings.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Termbase.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Termbase.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Terminal.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Terminal.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/TimeDate.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/TimeDate.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/min
./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/libc.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/libmin.a
./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/M2RTS.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/M2RTS.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/SYSTEM.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/SYSTEM.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Args.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Args.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/ASCII.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/ASCII.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Assertion.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Assertion.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Break.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Break.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Builtins.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Builtins.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/cbuiltin.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/CmdArgs.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/CmdArgs.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/COROUTINES.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/COROUTINES.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/cxxabi.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Debug.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Debug.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/dtoa.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/DynamicStrings.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/DynamicStrings.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Environment.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Environment.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/errno.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/FIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/FIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/FormatStrings.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/FormatStrings.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/FpuIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/FpuIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/gdbif.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/gdbif.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Indexing.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Indexing.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/IO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/IO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/ldtoa.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/LegacyReal.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/LegacyReal.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/libc.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/libgm2.a
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/libm.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/LMathLib0.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/LMathLib0.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/M2EXCEPTION.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/M2EXCEPTION.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/M2RTS.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/M2RTS.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/MathLib0.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/MathLib0.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/MemUtils.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/MemUtils.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/NumberIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/NumberIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/PushBackInput.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/PushBackInput.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/RTExceptions.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/RTExceptions.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/RTint.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/RTint.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SArgs.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SArgs.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Scan.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Scan.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/sckt.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SCmdArgs.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SCmdArgs.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Selective.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SEnvironment.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SEnvironment.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SFIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SFIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SMathLib0.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SMathLib0.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StdIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StdIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Storage.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Storage.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StrCase.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StrCase.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StringConvert.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StringConvert.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StrIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StrIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StrLib.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StrLib.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SysExceptions.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SysStorage.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SysStorage.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SYSTEM.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SYSTEM.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/termios.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/TimeString.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/TimeString.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/UnixArgs.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/wrapc.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pth
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pth/libpth.a
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Archive.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Archive.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Arguments.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Arguments.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/ASCII.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/ASCII.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Calendar.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Calendar.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/CallShell.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/CallShell.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Clock.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Clock.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Conversions.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Conversions.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Directories.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Directories.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Environment.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Environment.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Errno.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Errno.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/EtcGroup.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/EtcGroup.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Files.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Files.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/FtdIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/FtdIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Functions.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Functions.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/GetPass.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/GetPass.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/InOut.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/InOut.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/libulm.a
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/M2EXCEPTION.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/M2RTS.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/MathLib.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/MathLib.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Passwd.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Passwd.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/PipeIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/PipeIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Plot.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Plot.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RandomGenerator.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RandomGenerator.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/ReadIntCard.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/ReadIntCard.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RealConv.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RealConv.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RealInOut.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RealInOut.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RTErrors.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RTErrors.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RTExceptions.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/ScanPwfile.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/ScanPwfile.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StdFuncs.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StdFuncs.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StdIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StdIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Storage.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Storage.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Strings.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Strings.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StrSpec.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StrSpec.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StrToNum.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StrToNum.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StrToReal.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StrToReal.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysAccess.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysAccess.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysAlarm.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysAlarm.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysBreak.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysBreak.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysClose.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysClose.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysConf.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysConf.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysCreat.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysCreat.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Sys.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysDup.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysDup.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysExec.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysExec.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysExit.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysExit.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysFcntl.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysFcntl.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysFork.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysFork.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysGetpid.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysGetpid.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysGetuid.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysGetuid.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysIoctl.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysIoctl.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysKill.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysKill.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysLink.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysLink.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysLocations.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysLocations.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysLseek.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysLseek.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Sys.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysOpen.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysOpen.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPanic.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPanic.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPause.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPause.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPerror.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPerror.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPipe.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPipe.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysRead.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysRead.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysSetuid.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysSetuid.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysSignal.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysSignal.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysStat.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysStat.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SYSTEM.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SystemTypes.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SystemTypes.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysTermIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysTermIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysTime.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysTime.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysUnlink.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysUnlink.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysWait.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysWait.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysWrite.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysWrite.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Terminal.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Terminal.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/TimeIO.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/TimeIO.mod
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/UnixString.def
./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/UnixString.mod
./usr/lib/gcc/x86_64-linux-gnu/9/plugin
./usr/lib/gcc/x86_64-linux-gnu/9/plugin/m2rte.so
./usr/lib/x86_64-linux-gnu
./usr/lib/x86_64-linux-gnu/libcor.a
./usr/lib/x86_64-linux-gnu/libcor.so
./usr/lib/x86_64-linux-gnu/libcor.so.0
./usr/lib/x86_64-linux-gnu/libcor.so.0.0.0
./usr/lib/x86_64-linux-gnu/libgm2.a
./usr/lib/x86_64-linux-gnu/libgm2.so
./usr/lib/x86_64-linux-gnu/libgm2.so.0
./usr/lib/x86_64-linux-gnu/libgm2.so.0.0.0
./usr/lib/x86_64-linux-gnu/libiso.a
./usr/lib/x86_64-linux-gnu/libiso.so
./usr/lib/x86_64-linux-gnu/libiso.so.0
./usr/lib/x86_64-linux-gnu/libiso.so.0.0.0
./usr/lib/x86_64-linux-gnu/liblog.a
./usr/lib/x86_64-linux-gnu/liblog.so
./usr/lib/x86_64-linux-gnu/liblog.so.0
./usr/lib/x86_64-linux-gnu/liblog.so.0.0.0
./usr/lib/x86_64-linux-gnu/libmin.a
./usr/lib/x86_64-linux-gnu/libmin.so
./usr/lib/x86_64-linux-gnu/libmin.so.0
./usr/lib/x86_64-linux-gnu/libmin.so.0.0.0
./usr/lib/x86_64-linux-gnu/libpth.a
./usr/lib/x86_64-linux-gnu/libpth.so
./usr/lib/x86_64-linux-gnu/libpth.so.0
./usr/lib/x86_64-linux-gnu/libpth.so.0.0.0
./usr/lib/x86_64-linux-gnu/libulm.a
./usr/lib/x86_64-linux-gnu/libulm.so
./usr/lib/x86_64-linux-gnu/libulm.so.0
./usr/lib/x86_64-linux-gnu/libulm.so.0.0.0
./usr/share/info
./usr/share/info/gm2.info
./usr/share/man
./usr/share/man/man1
./usr/share/man/man1/x86_64-linux-gnu-gm2-9.1

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-08 21:21 ` Matthias Klose
@ 2019-07-09  6:37   ` Matthias Klose
  2019-07-09 19:50     ` Gaius Mulley
  2019-07-09  9:56   ` Matthias Klose
                     ` (4 subsequent siblings)
  5 siblings, 1 reply; 45+ messages in thread
From: Matthias Klose @ 2019-07-09  6:37 UTC (permalink / raw)
  To: Gaius Mulley, gcc-patches

On 08.07.19 23:19, Matthias Klose wrote:
> On 14.06.19 15:09, Gaius Mulley wrote:
>>
>> Hello,
>>
>> here is version two of the patches which introduce Modula-2 into the
>> GCC trunk.  The patches include:
>>
>>   (*)  a patch to allow all front ends to register a lang spec function.
>>        (included are patches for all front ends to provide an empty
>>         callback function).
>>   (*)  patch diffs to allow the Modula-2 front end driver to be
>>        built using GCC Makefile and friends.
>>
>> The compressed tarball includes:
>>
>>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>>        Including the need for registering lang spec functions.
>>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>>        the gm2 driver is built and can understands --version).
>>
>> These patches have been re-written after taking on board the comments
>> found in this thread:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
>>
>> it is a revised patch set from:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>>
>> I've run make bootstrap and run the regression tests on trunk and no
>> extra failures occur for all languages touched in the ChangeLog.
>>
>> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
>> with amd64/arm64/i386) - these patches are currently simply for the
>> driver to minimise the patch size.  There are also > 1800 tests in a
>> dejagnu testsuite for gm2 which can be included at some future time.
> 
> I had a look at the GCC 9 version of the patches, with a build including a make
> install. Some comments:
> 
>  - A parallel build (at least with -j4) isn't working. A sequental
>    build works fine.  I think forcing a sequential build will not
>    work well, increasing the build time too much.
> 
>  - libgm2 multilib builds are not working.  <builddir>/<target>/32/libgm2
>    is configured, but not built.
> 
>  - The internal tools in the gcclibdir are installed twice, with
>    both vanilla names and prefixed/suffixed names.
> 
>  - libgm2/configure.a has a libtool version 14:0:0, however all
>    shared libraries are installed with soversion 0.
> 
>  - no manual page for gm2m.
> 
>  - libpth.{a,so} is installed in the system libdir, which
>    conflicts with the installation of the libpth packages
>    on most distros.

found out that a system provided libpth can be used.  Otoh if you build the
in-tree libpth, it shouldn't be installed, but built as a convenience library,
like libgo using libffi, or libgphobos using zlib.

>  - There are three letter libraries with pretty generic
>    names installed into the system libdir: log, iso, cor,
>    min, ulm. At least for log, you have a file conflict
>    with another library.  Shouldn't these libraries named
>    mpre specific, like libgm2log?
> 
> Matthias
> 
> The installed tree:
> 
> ./usr/bin
> ./usr/bin/x86_64-linux-gnu-gm2-9
> ./usr/bin/x86_64-linux-gnu-gm2m-9
> ./usr/lib/gcc/x86_64-linux-gnu
> ./usr/lib/gcc/x86_64-linux-gnu/9
> ./usr/lib/gcc/x86_64-linux-gnu/9/cc1gm2
> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2l
> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lcc
> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lgen
> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lorder
> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-cc1gm2-9
> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2l-9
> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lcc-9
> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lgen-9
> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lorder-9
> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2m-9
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/Debug.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/Debug.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/Executive.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/Executive.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/KeyBoardLEDs.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/libcor.a
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/SYSTEM.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/SYSTEM.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/TimerHandler.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/TimerHandler.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ChanConsts.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ChanConsts.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/CharClass.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/CharClass.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ClientSocket.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ClientSocket.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ComplexMath.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ComplexMath.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ConvStringLong.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ConvStringLong.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ConvStringReal.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ConvStringReal.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ConvTypes.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ConvTypes.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/COROUTINES.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/COROUTINES.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ErrnoCategory.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/EXCEPTIONS.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/EXCEPTIONS.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/GeneralUserExceptions.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/GeneralUserExceptions.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOChan.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOChan.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOConsts.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOConsts.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOLink.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOLink.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOResult.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/IOResult.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/libiso.a
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongComplexMath.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongComplexMath.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongConv.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongConv.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongMath.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongMath.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongStr.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongStr.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongWholeIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LongWholeIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LowLong.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LowLong.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LowReal.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LowReal.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LowShort.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/LowShort.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/M2EXCEPTION.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/M2EXCEPTION.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/M2RTS.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/M2RTS.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/MemStream.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/MemStream.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Processes.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Processes.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ProgramArgs.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ProgramArgs.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/pth.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RandomNumber.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RandomNumber.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RawIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RawIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealConv.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealConv.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealMath.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealMath.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealStr.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RealStr.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RndFile.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RndFile.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTdata.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTdata.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTentity.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTentity.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTfio.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTfio.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTgen.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTgenif.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTgenif.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTgen.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTio.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/RTio.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Semaphores.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Semaphores.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SeqFile.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SeqFile.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ServerSocket.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ServerSocket.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ShortComplexMath.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ShortComplexMath.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ShortIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ShortIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ShortWholeIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/ShortWholeIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SimpleCipher.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SimpleCipher.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SIOResult.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SIOResult.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SLongIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SLongIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SLongWholeIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SLongWholeIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SRawIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SRawIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SRealIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SRealIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SShortIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SShortIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SShortWholeIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SShortWholeIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/StdChans.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/StdChans.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/STextIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/STextIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Storage.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Storage.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/StreamFile.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/StreamFile.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/StringChan.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/StringChan.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Strings.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/Strings.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SWholeIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SWholeIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SysClock.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SysClock.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SYSTEM.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/SYSTEM.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/TermFile.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/TermFile.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/TERMINATION.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/TERMINATION.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/TextIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/TextIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/WholeConv.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/WholeConv.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/WholeIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/WholeIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/WholeStr.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/WholeStr.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/wrapsock.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/wraptime.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BitBlockOps.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BitBlockOps.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BitByteOps.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BitByteOps.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BitWordOps.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BitWordOps.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BlockOps.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/BlockOps.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Break.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/CardinalIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/CardinalIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Conversions.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Conversions.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/DebugPMD.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/DebugPMD.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/DebugTrace.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/DebugTrace.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Delay.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Delay.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Display.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Display.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/ErrorCode.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/ErrorCode.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/FileSystem.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/FileSystem.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/FloatingUtilities.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/FloatingUtilities.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/InOut.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/InOut.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Keyboard.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Keyboard.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/liblog.a
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/LongIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/LongIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/NumberConversion.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/NumberConversion.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Random.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Random.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/RealConversions.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/RealConversions.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/RealInOut.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/RealInOut.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Strings.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Strings.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Termbase.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Termbase.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Terminal.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/Terminal.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/TimeDate.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/TimeDate.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/min
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/libc.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/libmin.a
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/M2RTS.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/M2RTS.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/SYSTEM.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/SYSTEM.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Args.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Args.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/ASCII.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/ASCII.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Assertion.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Assertion.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Break.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Break.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Builtins.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Builtins.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/cbuiltin.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/CmdArgs.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/CmdArgs.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/COROUTINES.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/COROUTINES.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/cxxabi.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Debug.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Debug.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/dtoa.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/DynamicStrings.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/DynamicStrings.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Environment.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Environment.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/errno.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/FIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/FIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/FormatStrings.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/FormatStrings.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/FpuIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/FpuIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/gdbif.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/gdbif.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Indexing.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Indexing.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/IO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/IO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/ldtoa.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/LegacyReal.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/LegacyReal.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/libc.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/libgm2.a
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/libm.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/LMathLib0.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/LMathLib0.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/M2EXCEPTION.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/M2EXCEPTION.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/M2RTS.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/M2RTS.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/MathLib0.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/MathLib0.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/MemUtils.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/MemUtils.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/NumberIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/NumberIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/PushBackInput.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/PushBackInput.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/RTExceptions.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/RTExceptions.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/RTint.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/RTint.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SArgs.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SArgs.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Scan.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Scan.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/sckt.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SCmdArgs.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SCmdArgs.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Selective.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SEnvironment.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SEnvironment.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SFIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SFIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SMathLib0.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SMathLib0.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StdIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StdIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Storage.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/Storage.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StrCase.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StrCase.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StringConvert.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StringConvert.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StrIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StrIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StrLib.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/StrLib.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SysExceptions.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SysStorage.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SysStorage.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SYSTEM.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/SYSTEM.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/termios.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/TimeString.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/TimeString.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/UnixArgs.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/wrapc.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pth
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pth/libpth.a
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Archive.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Archive.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Arguments.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Arguments.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/ASCII.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/ASCII.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Calendar.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Calendar.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/CallShell.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/CallShell.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Clock.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Clock.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Conversions.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Conversions.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Directories.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Directories.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Environment.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Environment.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Errno.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Errno.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/EtcGroup.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/EtcGroup.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Files.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Files.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/FtdIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/FtdIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Functions.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Functions.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/GetPass.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/GetPass.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/InOut.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/InOut.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/libulm.a
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/M2EXCEPTION.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/M2RTS.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/MathLib.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/MathLib.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Passwd.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Passwd.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/PipeIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/PipeIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Plot.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Plot.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RandomGenerator.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RandomGenerator.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/ReadIntCard.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/ReadIntCard.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RealConv.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RealConv.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RealInOut.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RealInOut.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RTErrors.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RTErrors.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/RTExceptions.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/ScanPwfile.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/ScanPwfile.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StdFuncs.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StdFuncs.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StdIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StdIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Storage.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Storage.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Strings.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Strings.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StrSpec.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StrSpec.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StrToNum.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StrToNum.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StrToReal.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/StrToReal.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysAccess.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysAccess.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysAlarm.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysAlarm.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysBreak.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysBreak.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysClose.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysClose.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysConf.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysConf.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysCreat.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysCreat.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Sys.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysDup.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysDup.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysExec.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysExec.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysExit.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysExit.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysFcntl.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysFcntl.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysFork.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysFork.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysGetpid.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysGetpid.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysGetuid.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysGetuid.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysIoctl.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysIoctl.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysKill.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysKill.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysLink.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysLink.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysLocations.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysLocations.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysLseek.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysLseek.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Sys.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysOpen.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysOpen.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPanic.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPanic.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPause.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPause.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPerror.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPerror.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPipe.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysPipe.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysRead.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysRead.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysSetuid.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysSetuid.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysSignal.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysSignal.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysStat.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysStat.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SYSTEM.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SystemTypes.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SystemTypes.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysTermIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysTermIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysTime.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysTime.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysUnlink.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysUnlink.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysWait.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysWait.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysWrite.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/SysWrite.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Terminal.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/Terminal.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/TimeIO.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/TimeIO.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/UnixString.def
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/UnixString.mod
> ./usr/lib/gcc/x86_64-linux-gnu/9/plugin
> ./usr/lib/gcc/x86_64-linux-gnu/9/plugin/m2rte.so
> ./usr/lib/x86_64-linux-gnu
> ./usr/lib/x86_64-linux-gnu/libcor.a
> ./usr/lib/x86_64-linux-gnu/libcor.so
> ./usr/lib/x86_64-linux-gnu/libcor.so.0
> ./usr/lib/x86_64-linux-gnu/libcor.so.0.0.0
> ./usr/lib/x86_64-linux-gnu/libgm2.a
> ./usr/lib/x86_64-linux-gnu/libgm2.so
> ./usr/lib/x86_64-linux-gnu/libgm2.so.0
> ./usr/lib/x86_64-linux-gnu/libgm2.so.0.0.0
> ./usr/lib/x86_64-linux-gnu/libiso.a
> ./usr/lib/x86_64-linux-gnu/libiso.so
> ./usr/lib/x86_64-linux-gnu/libiso.so.0
> ./usr/lib/x86_64-linux-gnu/libiso.so.0.0.0
> ./usr/lib/x86_64-linux-gnu/liblog.a
> ./usr/lib/x86_64-linux-gnu/liblog.so
> ./usr/lib/x86_64-linux-gnu/liblog.so.0
> ./usr/lib/x86_64-linux-gnu/liblog.so.0.0.0
> ./usr/lib/x86_64-linux-gnu/libmin.a
> ./usr/lib/x86_64-linux-gnu/libmin.so
> ./usr/lib/x86_64-linux-gnu/libmin.so.0
> ./usr/lib/x86_64-linux-gnu/libmin.so.0.0.0
> ./usr/lib/x86_64-linux-gnu/libpth.a
> ./usr/lib/x86_64-linux-gnu/libpth.so
> ./usr/lib/x86_64-linux-gnu/libpth.so.0
> ./usr/lib/x86_64-linux-gnu/libpth.so.0.0.0
> ./usr/lib/x86_64-linux-gnu/libulm.a
> ./usr/lib/x86_64-linux-gnu/libulm.so
> ./usr/lib/x86_64-linux-gnu/libulm.so.0
> ./usr/lib/x86_64-linux-gnu/libulm.so.0.0.0
> ./usr/share/info
> ./usr/share/info/gm2.info
> ./usr/share/man
> ./usr/share/man/man1
> ./usr/share/man/man1/x86_64-linux-gnu-gm2-9.1
> 

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-08 15:31     ` Rainer Orth
@ 2019-07-09  9:25       ` Rainer Orth
  2019-07-09 11:41         ` Gaius Mulley
  0 siblings, 1 reply; 45+ messages in thread
From: Rainer Orth @ 2019-07-09  9:25 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: gcc-patches

Hi Gaius,

>> it rather depends upon what you want, if you want the latest complete
>> gm2 grafting onto the svn gcc trunk then these two scripts will create a
>> patched tree and also rebuild gm2.
>
> that's my goal: I'd like to see if gm2 and libgm2 build on Solaris and
> pass at least a reasonable number of tests.
>
>> [however please be careful with the scripts - they do assume that
>> everything will be built in $HOME/GM2 - read and adapt as necessary].
>
> Ok, I will give it a try.

here are some initial issues.  I'll reply to Matthias' mail to expand on
other problems he's raised.

* First, the build broke like this:

/vol/gcc/src/hg/trunk/solaris/gcc/gm2/mc-boot/GRTint.c:57:30: error: 'time' redeclared as different kind of symbol
   57 | typedef enum {input, output, time} VectorType;
      |                              ^~~~
In file included from /usr/include/time.h:12,
                 from /usr/include/sys/time.h:448,
                 from /usr/include/sys/select.h:27,
                 from /usr/include/sys/types.h:665,
                 from /usr/include/stdlib.h:22,
                 from /vol/gcc/src/hg/trunk/solaris/gcc/gm2/mc-boot/Glibc.h:15,
                 from /vol/gcc/src/hg/trunk/solaris/gcc/gm2/mc-boot/GRTint.c:42:
/usr/include/iso/time_iso.h:96:15: note: previous declaration of 'time' was here
   96 | extern time_t time(time_t *);
      |               ^~~~

  I've worked around this by renaming the enum value to vtime.  This
  problem is likely to occur on other targets as well.

* Building gm2.info failed with the makeinfo I happened to have
  installed:

makeinfo --split-size=5000000 --split-size=5000000 -I/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/gm2 -o /var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/gm2/gm2.info /vol/gcc/src/hg/trunk/solaris/gcc/gm2/gm2.texi
/vol/gcc/src/hg/trunk/solaris/gcc/gm2/gm2.texi:3070: `Prerequisites' has no Up field (perhaps incorrect sectioning?).
makeinfo: Removing output file `/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/gm2/gm2.info' due to errors; use --force to preserve.
make[2]: *** [/vol/gcc/src/hg/trunk/solaris/gcc/gm2/Make-lang.in:234: /var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/gm2/gm2.info] Error 1

  This is from texinfo 4.13, newer than the required minimum of 4.7.
  Even with makeinfo 6.1, there are a couple of warnings:

/vol/gcc/src/hg/trunk/solaris/gcc/gm2/gm2.texi:82: warning: multiple @menu
/vol/gcc/src/hg/trunk/solaris/gcc/gm2/gm2.texi:581: warning: multiple @menu
/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/gm2/gm2-libs.texi:6043: warning: multiple @menu
/vol/gcc/src/hg/trunk/solaris/gcc/gm2/gm2.texi:3070: warning: unreferenced node `Prerequisites'

Other than that, a sequential (only!) multilibbed build succeeded, and I
even managed to get some testsuite results which aren't too bad, again
for both multilibs:

                === gm2 Summary for unix ===

# of expected passes            7800
# of unexpected failures        1729
# of unresolved testcases       1705

                === gm2 Summary for unix/-m64 ===

# of expected passes            7800
# of unexpected failures        1729
# of unresolved testcases       1705

                === gm2 Summary ===

# of expected passes            15600
# of unexpected failures        3458
# of unresolved testcases       3410

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-08 21:21 ` Matthias Klose
  2019-07-09  6:37   ` Matthias Klose
@ 2019-07-09  9:56   ` Matthias Klose
  2019-07-09 12:14     ` Gaius Mulley
  2019-07-09 12:31   ` Rainer Orth
                     ` (3 subsequent siblings)
  5 siblings, 1 reply; 45+ messages in thread
From: Matthias Klose @ 2019-07-09  9:56 UTC (permalink / raw)
  To: Gaius Mulley, gcc-patches

On 08.07.19 23:19, Matthias Klose wrote:
> On 14.06.19 15:09, Gaius Mulley wrote:
>>
>> Hello,
>>
>> here is version two of the patches which introduce Modula-2 into the
>> GCC trunk.  The patches include:
>>
>>   (*)  a patch to allow all front ends to register a lang spec function.
>>        (included are patches for all front ends to provide an empty
>>         callback function).
>>   (*)  patch diffs to allow the Modula-2 front end driver to be
>>        built using GCC Makefile and friends.
>>
>> The compressed tarball includes:
>>
>>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>>        Including the need for registering lang spec functions.
>>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>>        the gm2 driver is built and can understands --version).
>>
>> These patches have been re-written after taking on board the comments
>> found in this thread:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
>>
>> it is a revised patch set from:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>>
>> I've run make bootstrap and run the regression tests on trunk and no
>> extra failures occur for all languages touched in the ChangeLog.
>>
>> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
>> with amd64/arm64/i386) - these patches are currently simply for the
>> driver to minimise the patch size.  There are also > 1800 tests in a
>> dejagnu testsuite for gm2 which can be included at some future time.
> 
> I had a look at the GCC 9 version of the patches, with a build including a make
> install. Some comments:
> 
>  - A parallel build (at least with -j4) isn't working. A sequental
>    build works fine.  I think forcing a sequential build will not
>    work well, increasing the build time too much.
> 
>  - libgm2 multilib builds are not working.  <builddir>/<target>/32/libgm2
>    is configured, but not built.
> 
>  - The internal tools in the gcclibdir are installed twice, with
>    both vanilla names and prefixed/suffixed names.
> 
>  - libgm2/configure.a has a libtool version 14:0:0, however all
>    shared libraries are installed with soversion 0.
> 
>  - no manual page for gm2m.
> 
>  - libpth.{a,so} is installed in the system libdir, which
>    conflicts with the installation of the libpth packages
>    on most distros.
> 
>  - There are three letter libraries with pretty generic
>    names installed into the system libdir: log, iso, cor,
>    min, ulm. At least for log, you have a file conflict
>    with another library.  Shouldn't these libraries named
>    mpre specific, like libgm2log?
> 
> Matthias
> 
> The installed tree:

> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/libulm.a
> ./usr/lib/x86_64-linux-gnu/libulm.a

and all static libraries are installed twice, not just libulm.a. What is the
correct location?

Matthias

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09  9:25       ` Rainer Orth
@ 2019-07-09 11:41         ` Gaius Mulley
  2019-07-10 11:50           ` Rainer Orth
  0 siblings, 1 reply; 45+ messages in thread
From: Gaius Mulley @ 2019-07-09 11:41 UTC (permalink / raw)
  To: Rainer Orth; +Cc: gcc-patches

Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> here are some initial issues.  I'll reply to Matthias' mail to expand on
> other problems he's raised.
>
> * First, the build broke like this:
>
> /vol/gcc/src/hg/trunk/solaris/gcc/gm2/mc-boot/GRTint.c:57:30: error: 'time' redeclared as different kind of symbol
>    57 | typedef enum {input, output, time} VectorType;
>       |                              ^~~~
> In file included from /usr/include/time.h:12,
>                  from /usr/include/sys/time.h:448,
>                  from /usr/include/sys/select.h:27,
>                  from /usr/include/sys/types.h:665,
>                  from /usr/include/stdlib.h:22,
>                  from /vol/gcc/src/hg/trunk/solaris/gcc/gm2/mc-boot/Glibc.h:15,
>                  from /vol/gcc/src/hg/trunk/solaris/gcc/gm2/mc-boot/GRTint.c:42:
> /usr/include/iso/time_iso.h:96:15: note: previous declaration of 'time' was here
>    96 | extern time_t time(time_t *);
>       |               ^~~~

Hi Rainer,

thanks for the bug report.  Now fixed in the git repro -
the mc bootstrap tool now avoids 'time'.  Also fixed Make-lang.in
to allow parallel builds.

>   I've worked around this by renaming the enum value to vtime.  This
>   problem is likely to occur on other targets as well.
>
> * Building gm2.info failed with the makeinfo I happened to have
>   installed:
>
> makeinfo --split-size=5000000 --split-size=5000000 -I/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/gm2 -o /var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/gm2/gm2.info /vol/gcc/src/hg/trunk/solaris/gcc/gm2/gm2.texi
> /vol/gcc/src/hg/trunk/solaris/gcc/gm2/gm2.texi:3070: `Prerequisites' has no Up field (perhaps incorrect sectioning?).
> makeinfo: Removing output file `/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/gm2/gm2.info' due to errors; use --force to preserve.
> make[2]: *** [/vol/gcc/src/hg/trunk/solaris/gcc/gm2/Make-lang.in:234: /var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/gm2/gm2.info] Error 1
>
>   This is from texinfo 4.13, newer than the required minimum of 4.7.
>   Even with makeinfo 6.1, there are a couple of warnings:
>
> /vol/gcc/src/hg/trunk/solaris/gcc/gm2/gm2.texi:82: warning: multiple @menu
> /vol/gcc/src/hg/trunk/solaris/gcc/gm2/gm2.texi:581: warning: multiple @menu
> /var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/gm2/gm2-libs.texi:6043: warning: multiple @menu
> /vol/gcc/src/hg/trunk/solaris/gcc/gm2/gm2.texi:3070: warning:
> unreferenced node `Prerequisites'

will look into gm2.texi

> Other than that, a sequential (only!) multilibbed build succeeded, and I
> even managed to get some testsuite results which aren't too bad, again
> for both multilibs:
>
>                 === gm2 Summary for unix ===
>
> # of expected passes            7800
> # of unexpected failures        1729
> # of unresolved testcases       1705
>
>                 === gm2 Summary for unix/-m64 ===
>
> # of expected passes            7800
> # of unexpected failures        1729
> # of unresolved testcases       1705
>
>                 === gm2 Summary ===
>
> # of expected passes            15600
> # of unexpected failures        3458
> # of unresolved testcases       3410
>
> 	Rainer


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09  9:56   ` Matthias Klose
@ 2019-07-09 12:14     ` Gaius Mulley
  2019-07-09 13:24       ` Matthias Klose
  0 siblings, 1 reply; 45+ messages in thread
From: Gaius Mulley @ 2019-07-09 12:14 UTC (permalink / raw)
  To: Matthias Klose; +Cc: gcc-patches

Matthias Klose <doko@ubuntu.com> writes:

>>  - There are three letter libraries with pretty generic
>>    names installed into the system libdir: log, iso, cor,
>>    min, ulm. At least for log, you have a file conflict
>>    with another library.  Shouldn't these libraries named
>>    mpre specific, like libgm2log?

>> The installed tree:
>
>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/libulm.a
>> ./usr/lib/x86_64-linux-gnu/libulm.a
>
> and all static libraries are installed twice, not just libulm.a. What is the
> correct location?
>
> Matthias

Hi Matthias,

the libraries ./usr/lib/x86_64-linux-gnu/lib{ulm,pim,gm2,cor,iso,min}.a
are not needed the correct locations of the static libraries are:

./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/libulm.a
./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/libmin.a
./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/libcor.a
./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/libgm2.a
./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/liblog.a
./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/libiso.a


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-08 21:21 ` Matthias Klose
  2019-07-09  6:37   ` Matthias Klose
  2019-07-09  9:56   ` Matthias Klose
@ 2019-07-09 12:31   ` Rainer Orth
  2019-07-09 15:57     ` Gaius Mulley
  2019-07-09 21:36   ` Matthias Klose
                     ` (2 subsequent siblings)
  5 siblings, 1 reply; 45+ messages in thread
From: Rainer Orth @ 2019-07-09 12:31 UTC (permalink / raw)
  To: Matthias Klose; +Cc: Gaius Mulley, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 924 bytes --]

Hi Matthias,

> I had a look at the GCC 9 version of the patches, with a build including a make
> install. Some comments:
>
>  - A parallel build (at least with -j4) isn't working. A sequental
>    build works fine.  I think forcing a sequential build will not
>    work well, increasing the build time too much.

absolutely: I'd go as far as claiming that this is the number one
priority.  Otherwise build and test times are just too long for all but
the most dedicated testers, and forcing a sequential build would be a
showstopper for trunk integration.

The same holds for the current requirement of a non-bootstrap build.  At
least that's what I saw initially: it may be that it works sequentially,
but haven't tried since the build time was way too long already.

>  - libgm2 multilib builds are not working.  <builddir>/<target>/32/libgm2
>    is configured, but not built.

True, but the fix is a simple one-liner:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ml.patch --]
[-- Type: text/x-patch, Size: 283 bytes --]

--- ../../../m2/dist/gcc-versionno/libgm2/Makefile.am	2019-06-06 15:17:19.634469354 +0000
+++ libgm2/Makefile.am	2019-07-09 00:41:23.214142811 +0000
@@ -97,3 +97,5 @@
 
 # Subdir rules rely on $(FLAGS_TO_PASS)
 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
+
+include $(top_srcdir)/../multilib.am

[-- Attachment #3: Type: text/plain, Size: 3829 bytes --]


This allowed me to build both 32 and 64-bit gm2 libs on
i386-pc-solaris2.11 and get the testresults I reported earlier, which
are identical for -m32 and -m64.

Here are a couple of other issues I saw:

* There are many many warnings during the build in the gcc/gm2 code.

* The mc output is far too verbose right now: this isn't of interest to
  anyone but gm2 developers ;-)

* Running make check-gm2 in gcc produces gm2 testsuite output directly
  in gcc/testsuite.  This needs to go into a testsuite/gm2 subdir (or
  gm2<N> once the testsuite is parallelized: it is far too large to only
  run sequentially).

* Many tests FAIL like this:

ESC[01mESC[Kxgm2:ESC[mESC[K ESC[01;31mESC[Kfatal error: ESC[mESC[Kcannot execute �<80><98>ESC[01mESC[Kgm2lESC[mESC[K�<80><99>: execvp: No such file or directory
compilation terminated.
compiler exited with status 1
FAIL: gm2/calling-c/datatypes/unbounded/run/pass/m.mod compilation,  -g 

  For one, I didn't have gm2l anywhere in my tree.  Besides, the tests
  absolutely need to be run with -fno-diagnostics-show-caret
  -fno-diagnostics-show-line-numbers -fdiagnostics-color=never

  This problem seems to account for the vast majority of failing tests
  right now:

   6820 xgm2: fatal error: cannot execute ‘gm2l’: execvp: No such file or directory
      6 xgm2: fatal error: no input files

  gm2l and a couple of other tools are built by gm2/Make-lang.in's
  gm2.all.build rule, that the seems not to be referenced anywhere.
  Even after manually building them, the stay in stage1/gm2 and need a
  make gm2l to be copied into gcc/gm2.  This all needs to work without
  such manual steps or without installing gm2 first.

* There are a couple of broken testcase names in gm2.sum, e.g.

PASS: /vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gm2/pim/options/optimize/run/pass/addition.mod compilation, -g {compiler=/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/xgm2 -B/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc -I/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libpim:/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/../gm2/gm2-libs -I/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libiso:/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/../gm2/gm2-libs-iso -I/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gm2/pim/options/optimize/run/pass -fpim -L/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libpim/.libs -L/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libiso/.libs}

  Names are required to be unique, and must not contain absolute
  pathnames to allow for comparing different test results.  All this
  stuff in braces above should go.

With the missing gm2l worked around as above, my i386-pc-solaris2.11
testresults are way better now:

                === gm2 Summary for unix ===

# of expected passes            11186
# of unexpected failures        24
# of unresolved testcases       12

                === gm2 Summary for unix/-m64 ===

# of expected passes            10976
# of unexpected failures        156
# of unresolved testcases       90

                === gm2 Summary ===

# of expected passes            22162
# of unexpected failures        180
# of unresolved testcases       102

However, you may want to reconsider if really the whole gm2 testsuite
needs to be torture-tested, i.e. run at -g/-O/-O -g/-Os/-O3
-fomit-frame-pointer/-O3 -fomit-frame-pointer -finline-functions.  This
seems pretty excessive to me.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09 12:14     ` Gaius Mulley
@ 2019-07-09 13:24       ` Matthias Klose
  2019-07-09 13:49         ` Gaius Mulley
  0 siblings, 1 reply; 45+ messages in thread
From: Matthias Klose @ 2019-07-09 13:24 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: gcc-patches

On 09.07.19 14:02, Gaius Mulley wrote:
> Matthias Klose <doko@ubuntu.com> writes:
> 
>>>  - There are three letter libraries with pretty generic
>>>    names installed into the system libdir: log, iso, cor,
>>>    min, ulm. At least for log, you have a file conflict
>>>    with another library.  Shouldn't these libraries named
>>>    mpre specific, like libgm2log?
> 
>>> The installed tree:
>>
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/libulm.a
>>> ./usr/lib/x86_64-linux-gnu/libulm.a
>>
>> and all static libraries are installed twice, not just libulm.a. What is the
>> correct location?
>>
>> Matthias
> 
> Hi Matthias,
> 
> the libraries ./usr/lib/x86_64-linux-gnu/lib{ulm,pim,gm2,cor,iso,min}.a
> are not needed the correct locations of the static libraries are:
> 
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/libulm.a
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/libmin.a
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/libcor.a
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/libgm2.a
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/liblog.a
> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/libiso.a

ok, then I assume that could be the place for the .so files as well (not the
.so.* files/links), if I don't want to install those in the system libdir.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09 13:24       ` Matthias Klose
@ 2019-07-09 13:49         ` Gaius Mulley
  2019-07-09 16:23           ` Matthias Klose
  0 siblings, 1 reply; 45+ messages in thread
From: Gaius Mulley @ 2019-07-09 13:49 UTC (permalink / raw)
  To: Matthias Klose; +Cc: gcc-patches

Matthias Klose <doko@ubuntu.com> writes:

>> the libraries ./usr/lib/x86_64-linux-gnu/lib{ulm,pim,gm2,cor,iso,min}.a
>> are not needed the correct locations of the static libraries are:
>> 
>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/libulm.a
>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/libmin.a
>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/libcor.a
>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/libgm2.a
>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/liblog.a
>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/libiso.a
>
> ok, then I assume that could be the place for the .so files as well (not the
> .so.* files/links), if I don't want to install those in the system libdir.

yes sure this should work fine,


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09 12:31   ` Rainer Orth
@ 2019-07-09 15:57     ` Gaius Mulley
  2019-07-09 17:32       ` Matthias Klose
  2019-07-10 12:11       ` Rainer Orth
  0 siblings, 2 replies; 45+ messages in thread
From: Gaius Mulley @ 2019-07-09 15:57 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Matthias Klose, gcc-patches

Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

> Hi Matthias,
>
>> I had a look at the GCC 9 version of the patches, with a build including a make
>> install. Some comments:
>>
>>  - A parallel build (at least with -j4) isn't working. A sequental
>>    build works fine.  I think forcing a sequential build will not
>>    work well, increasing the build time too much.
>
> absolutely: I'd go as far as claiming that this is the number one
> priority.  Otherwise build and test times are just too long for all but
> the most dedicated testers, and forcing a sequential build would be a
> showstopper for trunk integration.

Hi,

Many thanks for all the feedback/bugs/patches.
I've been working through some of these.  The parallel build is now done.

> The same holds for the current requirement of a non-bootstrap build.  At
> least that's what I saw initially: it may be that it works sequentially,
> but haven't tried since the build time was way too long already.
>
>>  - libgm2 multilib builds are not working.  <builddir>/<target>/32/libgm2
>>    is configured, but not built.
>
> True, but the fix is a simple one-liner:
>
> --- ../../../m2/dist/gcc-versionno/libgm2/Makefile.am	2019-06-06 15:17:19.634469354 +0000
> +++ libgm2/Makefile.am	2019-07-09 00:41:23.214142811 +0000
> @@ -97,3 +97,5 @@
>  
>  # Subdir rules rely on $(FLAGS_TO_PASS)
>  FLAGS_TO_PASS = $(AM_MAKEFLAGS)
> +
> +include $(top_srcdir)/../multilib.am

thanks - applied to the master and 9.1.0 branch of gm2.

> This allowed me to build both 32 and 64-bit gm2 libs on
> i386-pc-solaris2.11 and get the testresults I reported earlier, which
> are identical for -m32 and -m64.
>
> Here are a couple of other issues I saw:
>
> * There are many many warnings during the build in the gcc/gm2 code.
>
> * The mc output is far too verbose right now: this isn't of interest to
>   anyone but gm2 developers ;-)

added --quiet to all invocations of mc on master - will apply to 9.1.0
soon.

> * Running make check-gm2 in gcc produces gm2 testsuite output directly
>   in gcc/testsuite.  This needs to go into a testsuite/gm2 subdir (or
>   gm2<N> once the testsuite is parallelized: it is far too large to only
>   run sequentially).
>
> * Many tests FAIL like this:
>
> ESC[01mESC[Kxgm2:ESC[mESC[K ESC[01;31mESC[Kfatal error: ESC[mESC[Kcannot execute �<80><98>ESC[01mESC[Kgm2lESC[mESC[K�<80><99>: execvp: No such file or directory
> compilation terminated.
> compiler exited with status 1
> FAIL: gm2/calling-c/datatypes/unbounded/run/pass/m.mod compilation,  -g 
>
>   For one, I didn't have gm2l anywhere in my tree.  Besides, the tests
>   absolutely need to be run with -fno-diagnostics-show-caret
>   -fno-diagnostics-show-line-numbers -fdiagnostics-color=never

applied to master and 9.1.0.

>   This problem seems to account for the vast majority of failing tests
>   right now:
>
>    6820 xgm2: fatal error: cannot execute ‘gm2l’: execvp: No such file or directory
>       6 xgm2: fatal error: no input files
>
>   gm2l and a couple of other tools are built by gm2/Make-lang.in's
>   gm2.all.build rule, that the seems not to be referenced anywhere.
>   Even after manually building them, the stay in stage1/gm2 and need a
>   make gm2l to be copied into gcc/gm2.  This all needs to work without
>   such manual steps or without installing gm2 first.

rewritten some of the top level targets to build these tools
(applied/pushed on master) will apply to 9.1.0.

> * There are a couple of broken testcase names in gm2.sum, e.g.
>
> PASS: /vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gm2/pim/options/optimize/run/pass/addition.mod compilation, -g {compiler=/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/xgm2 -B/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc -I/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libpim:/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/../gm2/gm2-libs -I/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libiso:/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/../gm2/gm2-libs-iso -I/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gm2/pim/options/optimize/run/pass -fpim -L/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libpim/.libs -L/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libiso/.libs}
>
>   Names are required to be unique, and must not contain absolute
>   pathnames to allow for comparing different test results.  All this
>   stuff in braces above should go.

thanks for the heads up about this - I'll rename them.

> With the missing gm2l worked around as above, my i386-pc-solaris2.11
> testresults are way better now:
>
>                 === gm2 Summary for unix ===
>
> # of expected passes            11186
> # of unexpected failures        24
> # of unresolved testcases       12

these results are great for solaris.  On the amd64/GNU/Linux I get 12
failures (long.mod and long2.mod) run 6 times each.

>                 === gm2 Summary for unix/-m64 ===
>
> # of expected passes            10976
> # of unexpected failures        156
> # of unresolved testcases       90
>
>                 === gm2 Summary ===
>
> # of expected passes            22162
> # of unexpected failures        180
> # of unresolved testcases       102
>
> However, you may want to reconsider if really the whole gm2 testsuite
> needs to be torture-tested, i.e. run at -g/-O/-O -g/-Os/-O3
> -fomit-frame-pointer/-O3 -fomit-frame-pointer -finline-functions.  This
> seems pretty excessive to me.

ok, I'll cull some of the permutations,


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09 13:49         ` Gaius Mulley
@ 2019-07-09 16:23           ` Matthias Klose
  2019-07-09 17:22             ` Gaius Mulley
  0 siblings, 1 reply; 45+ messages in thread
From: Matthias Klose @ 2019-07-09 16:23 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: gcc-patches

On 09.07.19 15:41, Gaius Mulley wrote:
> Matthias Klose <doko@ubuntu.com> writes:
> 
>>> the libraries ./usr/lib/x86_64-linux-gnu/lib{ulm,pim,gm2,cor,iso,min}.a
>>> are not needed the correct locations of the static libraries are:
>>>
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/ulm/libulm.a
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/min/libmin.a
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/cor/libcor.a
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/pim/libgm2.a
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/log/liblog.a
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/m2/iso/libiso.a
>>
>> ok, then I assume that could be the place for the .so files as well (not the
>> .so.* files/links), if I don't want to install those in the system libdir.
> 
> yes sure this should work fine,

but then you'll end up with separate m2 subdirs for each multilib build?  That's
maybe not what you want.

And an unrelated one: You are introducing python2 as a build-dependency.
Afaics, it's only one invocation

python ../../src/gcc/gm2/tools-src/def2texi.py -uLibraries -s../../src/gcc/gm2
-b/home/packages/gcc/9/u/gcc-9-9.1.1/build/gcc/gm2 >
/home/packages/gcc/9/u/gcc-9-9.1.1/build/gcc/gm2/gm2-libs.texi

but there might be more implicit python calls via a shebang line.

Also it's python2, not ready to run with python3.  I think you should not rely
on python2 only code anymore.

Matthias

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09 16:23           ` Matthias Klose
@ 2019-07-09 17:22             ` Gaius Mulley
  0 siblings, 0 replies; 45+ messages in thread
From: Gaius Mulley @ 2019-07-09 17:22 UTC (permalink / raw)
  To: Matthias Klose; +Cc: gcc-patches

Matthias Klose <doko@ubuntu.com> writes:

> And an unrelated one: You are introducing python2 as a build-dependency.
> Afaics, it's only one invocation
>
> python ../../src/gcc/gm2/tools-src/def2texi.py -uLibraries -s../../src/gcc/gm2
> -b/home/packages/gcc/9/u/gcc-9-9.1.1/build/gcc/gm2 >
> /home/packages/gcc/9/u/gcc-9-9.1.1/build/gcc/gm2/gm2-libs.texi
>
> but there might be more implicit python calls via a shebang line.
>
> Also it's python2, not ready to run with python3.  I think you should not rely
> on python2 only code anymore.

Hi Matthias,

ah yes, true - I'll convert the scripts to Python 3

regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09 15:57     ` Gaius Mulley
@ 2019-07-09 17:32       ` Matthias Klose
  2019-07-10 20:45         ` Gaius Mulley
  2019-07-10 12:11       ` Rainer Orth
  1 sibling, 1 reply; 45+ messages in thread
From: Matthias Klose @ 2019-07-09 17:32 UTC (permalink / raw)
  To: Gaius Mulley, Rainer Orth; +Cc: gcc-patches

On 09.07.19 17:53, Gaius Mulley wrote:
> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
> 
>> Hi Matthias,
>>
>>> I had a look at the GCC 9 version of the patches, with a build including a make
>>> install. Some comments:
>>>
>>>  - A parallel build (at least with -j4) isn't working. A sequental
>>>    build works fine.  I think forcing a sequential build will not
>>>    work well, increasing the build time too much.
>>
>> absolutely: I'd go as far as claiming that this is the number one
>> priority.  Otherwise build and test times are just too long for all but
>> the most dedicated testers, and forcing a sequential build would be a
>> showstopper for trunk integration.
> 
> Hi,
> 
> Many thanks for all the feedback/bugs/patches.
> I've been working through some of these.  The parallel build is now done.

It seems to work, however I see

make[11]: Entering directory
'/home/packages/gcc/9/u/gcc-9-9.1.1/build/x86_64-linux-gnu/32/libgm2/libpth/pth'
make[11]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
/bin/bash: line 0: test: !=: unary operator expected
../../../../../../src/libgm2/libpth/pth/shtool scpp -o pth_p.h -t
../../../../../../src/libgm2/libpth/pth/pth_p.h.in -Dcpp -Cintern -M '==#==' \

not sure what's going wrong.

In both gcc/gm2 and libgm2, there are explicit calls to make, which probably
should bre replaced by $(MAKE).


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09  6:37   ` Matthias Klose
@ 2019-07-09 19:50     ` Gaius Mulley
  2019-07-09 21:35       ` Matthias Klose
  0 siblings, 1 reply; 45+ messages in thread
From: Gaius Mulley @ 2019-07-09 19:50 UTC (permalink / raw)
  To: Matthias Klose; +Cc: gcc-patches

Matthias Klose <doko@ubuntu.com> writes:

>>  - libpth.{a,so} is installed in the system libdir, which
>>    conflicts with the installation of the libpth packages
>>    on most distros.
>
> found out that a system provided libpth can be used.  Otoh if you build the
> in-tree libpth, it shouldn't be installed, but built as a convenience library,
> like libgo using libffi, or libgphobos using zlib.

Hi Matthias,

as far as I know Redhat doesn't support libpth-dev - therefore it was
decided to include libpth in the gm2 tree and autodetect build/install
it as necessary.


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09 19:50     ` Gaius Mulley
@ 2019-07-09 21:35       ` Matthias Klose
  2019-07-10 17:56         ` Matthias Klose
  0 siblings, 1 reply; 45+ messages in thread
From: Matthias Klose @ 2019-07-09 21:35 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: gcc-patches

On 09.07.19 21:48, Gaius Mulley wrote:
> Matthias Klose <doko@ubuntu.com> writes:
> 
>>>  - libpth.{a,so} is installed in the system libdir, which
>>>    conflicts with the installation of the libpth packages
>>>    on most distros.
>>
>> found out that a system provided libpth can be used.  Otoh if you build the
>> in-tree libpth, it shouldn't be installed, but built as a convenience library,
>> like libgo using libffi, or libgphobos using zlib.
> 
> Hi Matthias,
> 
> as far as I know Redhat doesn't support libpth-dev - therefore it was
> decided to include libpth in the gm2 tree and autodetect build/install
> it as necessary.

That's ok, but then please don't install it as a system library.  that's what
convenience libraries are for (a libpth.a built with -fPIC, which you can link
against).

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-08 21:21 ` Matthias Klose
                     ` (2 preceding siblings ...)
  2019-07-09 12:31   ` Rainer Orth
@ 2019-07-09 21:36   ` Matthias Klose
  2019-07-10 17:11     ` Matthias Klose
  2019-07-11  7:57   ` Matthias Klose
  2019-07-18 20:15   ` Matthias Klose
  5 siblings, 1 reply; 45+ messages in thread
From: Matthias Klose @ 2019-07-09 21:36 UTC (permalink / raw)
  To: Gaius Mulley, gcc-patches

On 08.07.19 23:19, Matthias Klose wrote:
> On 14.06.19 15:09, Gaius Mulley wrote:
>>
>> Hello,
>>
>> here is version two of the patches which introduce Modula-2 into the
>> GCC trunk.  The patches include:
>>
>>   (*)  a patch to allow all front ends to register a lang spec function.
>>        (included are patches for all front ends to provide an empty
>>         callback function).
>>   (*)  patch diffs to allow the Modula-2 front end driver to be
>>        built using GCC Makefile and friends.
>>
>> The compressed tarball includes:
>>
>>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>>        Including the need for registering lang spec functions.
>>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>>        the gm2 driver is built and can understands --version).
>>
>> These patches have been re-written after taking on board the comments
>> found in this thread:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
>>
>> it is a revised patch set from:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>>
>> I've run make bootstrap and run the regression tests on trunk and no
>> extra failures occur for all languages touched in the ChangeLog.
>>
>> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
>> with amd64/arm64/i386) - these patches are currently simply for the
>> driver to minimise the patch size.  There are also > 1800 tests in a
>> dejagnu testsuite for gm2 which can be included at some future time.
> 
> I had a look at the GCC 9 version of the patches, with a build including a make
> install. Some comments:

[...]

>  - The internal tools in the gcclibdir are installed twice, with
>    both vanilla names and prefixed/suffixed names.
> The installed tree:
> 
> ./usr/bin
> ./usr/bin/x86_64-linux-gnu-gm2-9
> ./usr/bin/x86_64-linux-gnu-gm2m-9
> ./usr/lib/gcc/x86_64-linux-gnu
> ./usr/lib/gcc/x86_64-linux-gnu/9
> ./usr/lib/gcc/x86_64-linux-gnu/9/cc1gm2
> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2l
> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lcc
> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lgen
> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lorder
> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-cc1gm2-9
> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2l-9
> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lcc-9
> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lgen-9
> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lorder-9
> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2m-9

With a fresh build, configured with

         --program-suffix=-9
         --program-prefix=x86_64-linux-gnu-

the latter set of internal binaries is installed, while I would expect just the
un-pre/post-fixed tool names.

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09 11:41         ` Gaius Mulley
@ 2019-07-10 11:50           ` Rainer Orth
  0 siblings, 0 replies; 45+ messages in thread
From: Rainer Orth @ 2019-07-10 11:50 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: gcc-patches

Hi Gaius,

> Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:
>
>> here are some initial issues.  I'll reply to Matthias' mail to expand on
>> other problems he's raised.
>>
>> * First, the build broke like this:
>>
>> /vol/gcc/src/hg/trunk/solaris/gcc/gm2/mc-boot/GRTint.c:57:30: error:
>> 'time' redeclared as different kind of symbol
>>    57 | typedef enum {input, output, time} VectorType;
>>       |                              ^~~~
>> In file included from /usr/include/time.h:12,
>>                  from /usr/include/sys/time.h:448,
>>                  from /usr/include/sys/select.h:27,
>>                  from /usr/include/sys/types.h:665,
>>                  from /usr/include/stdlib.h:22,
>>                  from /vol/gcc/src/hg/trunk/solaris/gcc/gm2/mc-boot/Glibc.h:15,
>>                  from /vol/gcc/src/hg/trunk/solaris/gcc/gm2/mc-boot/GRTint.c:42:
>> /usr/include/iso/time_iso.h:96:15: note: previous declaration of 'time' was here
>>    96 | extern time_t time(time_t *);
>>       |               ^~~~
>
> Hi Rainer,
>
> thanks for the bug report.  Now fixed in the git repro -
> the mc bootstrap tool now avoids 'time'.  Also fixed Make-lang.in
> to allow parallel builds.

excellent, thanks.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09 15:57     ` Gaius Mulley
  2019-07-09 17:32       ` Matthias Klose
@ 2019-07-10 12:11       ` Rainer Orth
  1 sibling, 0 replies; 45+ messages in thread
From: Rainer Orth @ 2019-07-10 12:11 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: Matthias Klose, gcc-patches

Hi Gaius,

> Many thanks for all the feedback/bugs/patches.
> I've been working through some of these.  The parallel build is now done.

thank you for the blazingly quick fixes.

>> * The mc output is far too verbose right now: this isn't of interest to
>>   anyone but gm2 developers ;-)
>
> added --quiet to all invocations of mc on master - will apply to 9.1.0
> soon.

Perfect.

>> With the missing gm2l worked around as above, my i386-pc-solaris2.11
>> testresults are way better now:
>>
>>                 === gm2 Summary for unix ===
>>
>> # of expected passes            11186
>> # of unexpected failures        24
>> # of unresolved testcases       12
>
> these results are great for solaris.  On the amd64/GNU/Linux I get 12
> failures (long.mod and long2.mod) run 6 times each.

Indeed: I'm pretty pleased by those results myself.

The remaining failures mostly fall in two categories:

Undefined			first referenced
 symbol  			    in file
KeyBoardLEDs_SwitchScroll           /var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libcor/.libs/libcor.so
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
compiler exited with status 1
FAIL: gm2/coroutines/pim/run/pass/testiotransfer.mod compilation,  -g 
UNRESOLVED: gm2/coroutines/pim/run/pass/testiotransfer.mod execution,  -g  (link failed)

The definition lives in libgm2/libcor/KeyBoardLEDs.c and is Linux-only,
requiring the KGETLED/KSETLED ioctls.  An empty fallback implementation
is missing from the !linux section.

Then there's

/var/tmp//ccrqpjSdcpp:1:failed to find module name
compiler exited with status 1
FAIL: gm2/cpp/pass/cpph.mod,  -g  

FAIL: gm2/pim/fail/TestLong4.mod,  -g  

with no further indication in gm2.log what might be wrong.  Will have a
look.

Most 64-bit testcases FAIL for the same reason:

Undefined			first referenced
 symbol  			    in file
funcString                          /var/tmp//ccGNv4Zd.a(m.o)
ld: fatal: symbol referencing errors
collect2: error: ld returned 1 exit status
compiler exited with status 1
FAIL: gm2/calling-c/datatypes/unbounded/run/pass/m.mod compilation,  -g 
UNRESOLVED: gm2/calling-c/datatypes/unbounded/run/pass/m.mod execution,  -g  (link failed)

funcString *is* defined in c.c, but that file is compiled in the .exp
file `under the hood' with exec ${XGCC} (not even visible in gm2.log)
and without the correct multilib flag.

[01m[K/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gm2/cpp/pass/subaddr.mod:32:3:[m[K [01;31m[Kerror: [m[Kcan only CAST objects of the same size
   32 | #else
      |   [01;31m[K^[m[K
compiler exited with status 1
FAIL: gm2/cpp/pass/subaddr.mod,  -g  

Haven't looked yet, but might be a generic multilib testing problem.

I also noticed that quite a number of temp files are left behind in
gcc/testsuite:

* many *_m2.s files.

* several .o files:

-rw-r--r-- 1 ro gcc 8928 Jul  9 13:45 cpp.o
-rw-r--r-- 1 ro gcc 3772 Jul  9 13:46 cvararg.o
-rw-r--r-- 1 ro gcc 5248 Jul  9 13:52 except2.o
-rw-r--r-- 1 ro gcc 4616 Jul  9 13:52 except4.o
-rw-r--r-- 1 ro gcc 4480 Jul  9 13:52 except5.o
-rw-r--r-- 1 ro gcc 6152 Jul  9 13:52 except7.o
-rw-r--r-- 1 ro gcc 5408 Jul  9 13:52 except8.o
-rw-r--r-- 1 ro gcc 2888 Jul  9 13:56 exceptiontest.o
-rw-r--r-- 1 ro gcc 1968 Jul  9 13:55 fileio.o
-rw-r--r-- 1 ro gcc 1712 Jul  9 14:19 hello.o
-rw-r--r-- 1 ro gcc 6424 Jul  9 13:45 libexcept.o
-rw-r--r-- 1 ro gcc 9780 Jul  9 13:45 mycpp.o
-rw-r--r-- 1 ro gcc 3392 Jul  9 13:56 raise.o
-rw-r--r-- 1 ro gcc 3520 Jul  9 13:57 raise2.o
-rw-r--r-- 1 ro gcc 1760 Jul  9 14:17 rangesupport.o
-rw-r--r-- 1 ro gcc 3488 Jul  9 14:14 sys.o

* a few *.x[0-5] files:

except2
except4
except5
except7
except8
exceptiontest
libexcept
raise
raise2

* 3 others:

-rw-r--r--   1 ro       gcc         4199 Jul  9 14:00 integer_m2.cpp
-rw-r--r--   1 ro       gcc           36 Jul  9 14:14 results.dat
-rw-r--r--   1 ro       gcc           26 Jul  9 13:56 test.txt

Besides, gm2.log is very full with debug output, making it hard to see
what's going on:

Stuff like

looking for /var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libpim/.libs/libiso.a

even seems to run several times for the same lib!?

Same for

about to call target_compile with /vol/gcc/src/hg/trunk/solaris/gcc/testsuite/../gm2/examples/callingC/hello.mod /var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/testsuite/hello.o object {additional_flags= -g  } {compiler=/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc/xgm2 -B/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/gcc -I/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libpim:/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/../gm2/gm2-libs -I/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libiso:/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/../gm2/gm2-libs-iso -I/vol/gcc/src/hg/trunk/solaris/gcc/testsuite/../gm2/examples/callingC -fpim -L/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libpim/.libs -L/var/gcc/gcc-10.0.0-20190708/11.5-gcc-gas-gm2-no-bootstrap-j1/i386-pc-solaris2.11/./libgm2/libiso/.libs
 }

They are currently written with send_log, but should use verbose instead
so they are off by default, but can be enabled if need be by running
runtest with an appropriate number of -v options.

And finally the testsuite should live in gm2.dg.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09 21:36   ` Matthias Klose
@ 2019-07-10 17:11     ` Matthias Klose
  2019-07-10 20:49       ` Gaius Mulley
  0 siblings, 1 reply; 45+ messages in thread
From: Matthias Klose @ 2019-07-10 17:11 UTC (permalink / raw)
  To: Gaius Mulley, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 2890 bytes --]

On 09.07.19 23:35, Matthias Klose wrote:
> On 08.07.19 23:19, Matthias Klose wrote:
>> On 14.06.19 15:09, Gaius Mulley wrote:
>>>
>>> Hello,
>>>
>>> here is version two of the patches which introduce Modula-2 into the
>>> GCC trunk.  The patches include:
>>>
>>>   (*)  a patch to allow all front ends to register a lang spec function.
>>>        (included are patches for all front ends to provide an empty
>>>         callback function).
>>>   (*)  patch diffs to allow the Modula-2 front end driver to be
>>>        built using GCC Makefile and friends.
>>>
>>> The compressed tarball includes:
>>>
>>>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>>>        Including the need for registering lang spec functions.
>>>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>>>        the gm2 driver is built and can understands --version).
>>>
>>> These patches have been re-written after taking on board the comments
>>> found in this thread:
>>>
>>>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
>>>
>>> it is a revised patch set from:
>>>
>>>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>>>
>>> I've run make bootstrap and run the regression tests on trunk and no
>>> extra failures occur for all languages touched in the ChangeLog.
>>>
>>> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
>>> with amd64/arm64/i386) - these patches are currently simply for the
>>> driver to minimise the patch size.  There are also > 1800 tests in a
>>> dejagnu testsuite for gm2 which can be included at some future time.
>>
>> I had a look at the GCC 9 version of the patches, with a build including a make
>> install. Some comments:
> 
> [...]
> 
>>  - The internal tools in the gcclibdir are installed twice, with
>>    both vanilla names and prefixed/suffixed names.
>> The installed tree:
>>
>> ./usr/bin
>> ./usr/bin/x86_64-linux-gnu-gm2-9
>> ./usr/bin/x86_64-linux-gnu-gm2m-9
>> ./usr/lib/gcc/x86_64-linux-gnu
>> ./usr/lib/gcc/x86_64-linux-gnu/9
>> ./usr/lib/gcc/x86_64-linux-gnu/9/cc1gm2
>> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2l
>> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lcc
>> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lgen
>> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lorder
>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-cc1gm2-9
>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2l-9
>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lcc-9
>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lgen-9
>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lorder-9
>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2m-9
> 
> With a fresh build, configured with
> 
>          --program-suffix=-9
>          --program-prefix=x86_64-linux-gnu-
> 
> the latter set of internal binaries is installed, while I would expect just the
> un-pre/post-fixed tool names.

fixed by the attached patch.




[-- Attachment #2: install.diff --]
[-- Type: text/x-patch, Size: 1247 bytes --]

diff --git a/gcc-versionno/gcc/gm2/Make-lang.in b/gcc-versionno/gcc/gm2/Make-lang.in
index 6fc4ee84..81f5cbbc 100644
--- a/gcc-versionno/gcc/gm2/Make-lang.in
+++ b/gcc-versionno/gcc/gm2/Make-lang.in
@@ -373,12 +373,11 @@ gm2.install-common: installdirs $(GM2_LINK_TOOLS_BOOT) \
           chmod a+x $(DESTDIR)$(bindir)/$(GM2_INSTALL_NAME)$(exeext); \
           for tool in stage1/gm2/cc1gm2$(exeext) \
                       $(GM2_LINK_TOOLS_BOOT) stage1/gm2/gm2m$(exeext) ; do \
-            toolbase=`basename $$tool` ; \
-            tool_transformed_name=`echo $$toolbase|sed '$(program_transform_name)'`; \
+            tool_name=`basename $$tool` ; \
             if [ -f $$tool ]; then \
-              rm -f $(DESTDIR)$(libexecsubdir)/$$tool_transformed_name; \
-              $(INSTALL_PROGRAM) $$tool $(DESTDIR)$(libexecsubdir)/$$tool_transformed_name; \
-              chmod a+x $(DESTDIR)$(libexecsubdir)/$$tool_transformed_name; \
+              rm -f $(DESTDIR)$(libexecsubdir)/$$tool_name; \
+              $(INSTALL_PROGRAM) $$tool $(DESTDIR)$(libexecsubdir)/$$tool_name; \
+              chmod a+x $(DESTDIR)$(libexecsubdir)/$$tool_name; \
             else \
               echo "odd cannot find $$tool" ; \
             fi ; \

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09 21:35       ` Matthias Klose
@ 2019-07-10 17:56         ` Matthias Klose
  2019-07-10 20:18           ` Gaius Mulley
  0 siblings, 1 reply; 45+ messages in thread
From: Matthias Klose @ 2019-07-10 17:56 UTC (permalink / raw)
  To: gcc-patches, Gaius Mulley

On 09.07.19 23:30, Matthias Klose wrote:
> On 09.07.19 21:48, Gaius Mulley wrote:
>> Matthias Klose <doko@ubuntu.com> writes:
>>
>>>>  - libpth.{a,so} is installed in the system libdir, which
>>>>    conflicts with the installation of the libpth packages
>>>>    on most distros.
>>>
>>> found out that a system provided libpth can be used.  Otoh if you build the
>>> in-tree libpth, it shouldn't be installed, but built as a convenience library,
>>> like libgo using libffi, or libgphobos using zlib.
>>
>> Hi Matthias,
>>
>> as far as I know Redhat doesn't support libpth-dev - therefore it was
>> decided to include libpth in the gm2 tree and autodetect build/install
>> it as necessary.
> 
> That's ok, but then please don't install it as a system library.  that's what
> convenience libraries are for (a libpth.a built with -fPIC, which you can link
> against).

I still think installing libpth is wrong, however currently all multilib
variants install into $libdir, and not into the system multilib dir, e.g. lib64,
lib32, ...  So the last multilib wins, and you end up with the wrong arch in
your $libdir.

Matthias


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-10 17:56         ` Matthias Klose
@ 2019-07-10 20:18           ` Gaius Mulley
  2019-07-10 20:38             ` Matthias Klose
  0 siblings, 1 reply; 45+ messages in thread
From: Gaius Mulley @ 2019-07-10 20:18 UTC (permalink / raw)
  To: Matthias Klose; +Cc: gcc-patches

Matthias Klose <doko@ubuntu.com> writes:

> On 09.07.19 23:30, Matthias Klose wrote:
>> On 09.07.19 21:48, Gaius Mulley wrote:
>>> Matthias Klose <doko@ubuntu.com> writes:
>>>
>>>>>  - libpth.{a,so} is installed in the system libdir, which
>>>>>    conflicts with the installation of the libpth packages
>>>>>    on most distros.
>>>>
>>>> found out that a system provided libpth can be used.  Otoh if you build the
>>>> in-tree libpth, it shouldn't be installed, but built as a convenience library,
>>>> like libgo using libffi, or libgphobos using zlib.
>>>
>>> Hi Matthias,
>>>
>>> as far as I know Redhat doesn't support libpth-dev - therefore it was
>>> decided to include libpth in the gm2 tree and autodetect build/install
>>> it as necessary.
>> 
>> That's ok, but then please don't install it as a system library.  that's what
>> convenience libraries are for (a libpth.a built with -fPIC, which you can link
>> against).
>
> I still think installing libpth is wrong, however currently all multilib
> variants install into $libdir, and not into the system multilib dir, e.g. lib64,
> lib32, ...  So the last multilib wins, and you end up with the wrong arch in
> your $libdir.

Hi Matthias,

ah thanks for the explanation.  The multilib build system is still new
to me.  So regarding the libpth issue, what happens if the native os
does not provide libpth?  From your experience with building multilib
and shared library packages on multiple platforms - what is the best
solution :-)


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-10 20:18           ` Gaius Mulley
@ 2019-07-10 20:38             ` Matthias Klose
  2019-07-10 21:16               ` Gaius Mulley
  0 siblings, 1 reply; 45+ messages in thread
From: Matthias Klose @ 2019-07-10 20:38 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: gcc-patches

On 10.07.19 22:07, Gaius Mulley wrote:
> Matthias Klose <doko@ubuntu.com> writes:
> 
>> On 09.07.19 23:30, Matthias Klose wrote:
>>> On 09.07.19 21:48, Gaius Mulley wrote:
>>>> Matthias Klose <doko@ubuntu.com> writes:
>>>>
>>>>>>  - libpth.{a,so} is installed in the system libdir, which
>>>>>>    conflicts with the installation of the libpth packages
>>>>>>    on most distros.
>>>>>
>>>>> found out that a system provided libpth can be used.  Otoh if you build the
>>>>> in-tree libpth, it shouldn't be installed, but built as a convenience library,
>>>>> like libgo using libffi, or libgphobos using zlib.
>>>>
>>>> Hi Matthias,
>>>>
>>>> as far as I know Redhat doesn't support libpth-dev - therefore it was
>>>> decided to include libpth in the gm2 tree and autodetect build/install
>>>> it as necessary.
>>>
>>> That's ok, but then please don't install it as a system library.  that's what
>>> convenience libraries are for (a libpth.a built with -fPIC, which you can link
>>> against).
>>
>> I still think installing libpth is wrong, however currently all multilib
>> variants install into $libdir, and not into the system multilib dir, e.g. lib64,
>> lib32, ...  So the last multilib wins, and you end up with the wrong arch in
>> your $libdir.
> 
> Hi Matthias,
> 
> ah thanks for the explanation.  The multilib build system is still new
> to me.  So regarding the libpth issue, what happens if the native os
> does not provide libpth?  From your experience with building multilib
> and shared library packages on multiple platforms - what is the best
> solution :-)

I don't know about a best solution, but I contributed changes to
DRUNTIME_LIBRARIES_ZLIB in libphobos/m4/druntime/libraries.m4 and
gcc/doc/install.texi (--with-target-system-zlib).

Or you look at libffi/libgo, with libgo always linking the convenience libffi
library.

Matthias

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-09 17:32       ` Matthias Klose
@ 2019-07-10 20:45         ` Gaius Mulley
  0 siblings, 0 replies; 45+ messages in thread
From: Gaius Mulley @ 2019-07-10 20:45 UTC (permalink / raw)
  To: Matthias Klose; +Cc: Rainer Orth, gcc-patches

Matthias Klose <doko@ubuntu.com> writes:

> In both gcc/gm2 and libgm2, there are explicit calls to make, which probably
> should bre replaced by $(MAKE).

thanks - now fixed in 9.1.0 and master


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-10 17:11     ` Matthias Klose
@ 2019-07-10 20:49       ` Gaius Mulley
  0 siblings, 0 replies; 45+ messages in thread
From: Gaius Mulley @ 2019-07-10 20:49 UTC (permalink / raw)
  To: Matthias Klose; +Cc: gcc-patches

Matthias Klose <doko@ubuntu.com> writes:

>>>  - The internal tools in the gcclibdir are installed twice, with
>>>    both vanilla names and prefixed/suffixed names.
>>> The installed tree:
>>>
>>> ./usr/bin
>>> ./usr/bin/x86_64-linux-gnu-gm2-9
>>> ./usr/bin/x86_64-linux-gnu-gm2m-9
>>> ./usr/lib/gcc/x86_64-linux-gnu
>>> ./usr/lib/gcc/x86_64-linux-gnu/9
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/cc1gm2
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2l
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lcc
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lgen
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/gm2lorder
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-cc1gm2-9
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2l-9
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lcc-9
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lgen-9
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2lorder-9
>>> ./usr/lib/gcc/x86_64-linux-gnu/9/x86_64-linux-gnu-gm2m-9
>> 
>> With a fresh build, configured with
>> 
>>          --program-suffix=-9
>>          --program-prefix=x86_64-linux-gnu-
>> 
>> the latter set of internal binaries is installed, while I would expect just the
>> un-pre/post-fixed tool names.
>
> fixed by the attached patch.

Hi Matthias,

thank you - I think we were both working on the same code at the same
time!  I've checked in some fixes to both the master gm2/Make-lang.in
(and 9.1.0 branch).  I've culled gm2m from /usr/bin and relegated it to
libexecsubdir,




regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-10 20:38             ` Matthias Klose
@ 2019-07-10 21:16               ` Gaius Mulley
  0 siblings, 0 replies; 45+ messages in thread
From: Gaius Mulley @ 2019-07-10 21:16 UTC (permalink / raw)
  To: Matthias Klose; +Cc: gcc-patches

Matthias Klose <doko@ubuntu.com> writes:

> I don't know about a best solution, but I contributed changes to
> DRUNTIME_LIBRARIES_ZLIB in libphobos/m4/druntime/libraries.m4 and
> gcc/doc/install.texi (--with-target-system-zlib).
>
> Or you look at libffi/libgo, with libgo always linking the convenience libffi
> library.

many thanks for the pointers - will read the code,


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-08 21:21 ` Matthias Klose
                     ` (3 preceding siblings ...)
  2019-07-09 21:36   ` Matthias Klose
@ 2019-07-11  7:57   ` Matthias Klose
  2019-07-11 12:12     ` Gaius Mulley
  2019-07-18 20:15   ` Matthias Klose
  5 siblings, 1 reply; 45+ messages in thread
From: Matthias Klose @ 2019-07-11  7:57 UTC (permalink / raw)
  To: Gaius Mulley, gcc-patches; +Cc: Segher Boessenkool

On 08.07.19 23:19, Matthias Klose wrote:
> On 14.06.19 15:09, Gaius Mulley wrote:
>>
>> Hello,
>>
>> here is version two of the patches which introduce Modula-2 into the
>> GCC trunk.  The patches include:
>>
>>   (*)  a patch to allow all front ends to register a lang spec function.
>>        (included are patches for all front ends to provide an empty
>>         callback function).
>>   (*)  patch diffs to allow the Modula-2 front end driver to be
>>        built using GCC Makefile and friends.
>>
>> The compressed tarball includes:
>>
>>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>>        Including the need for registering lang spec functions.
>>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>>        the gm2 driver is built and can understands --version).
>>
>> These patches have been re-written after taking on board the comments
>> found in this thread:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
>>
>> it is a revised patch set from:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>>
>> I've run make bootstrap and run the regression tests on trunk and no
>> extra failures occur for all languages touched in the ChangeLog.
>>
>> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
>> with amd64/arm64/i386) - these patches are currently simply for the
>> driver to minimise the patch size.  There are also > 1800 tests in a
>> dejagnu testsuite for gm2 which can be included at some future time.
> 
> I had a look at the GCC 9 version of the patches, with a build including a make
> install. Some comments:

Had a test build based on the gcc-9 branch,
https://launchpad.net/~doko/+archive/ubuntu/toolchain/+sourcepub/10331180/+listing-archive-extra

powerpc64le-linux-gnu fails to build (search for "unfinished" in the build log)

during RTL pass: final
../../src/gcc/gm2/gm2-libs-coroutines/SYSTEM.def: In function '_M2_SYSTEM_init':
../../src/gcc/gm2/gm2-libs-coroutines/SYSTEM.def:20: internal compiler error: in
rs6000_output_function_epilogue, at conf
ig/rs6000/rs6000.c:29169
   20 | DEFINITION MODULE SYSTEM ;
      |
0x10b6b7c7 rs6000_output_function_epilogue
        ../../src/gcc/config/rs6000/rs6000.c:29169
0x1043f80f final_end_function()
        ../../src/gcc/final.c:1887
0x10445313 rest_of_handle_final
        ../../src/gcc/final.c:4667
0x10445313 execute
        ../../src/gcc/final.c:4737
Please submit a full bug report,
with preprocessed source if appropriate.

this is using GCC 8 as the bootstrap compiler.

search the build logs for "test_summary" to see the test results.  The binary
packages gcc-9-test-results contain the log/sum files for the tests.

all the link tests fail with:

xgm2: fatal error: cannot execute 'gm2l': execvp: No such file or directory
compilation terminated.
compiler exited with status 1

Matthias

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-11  7:57   ` Matthias Klose
@ 2019-07-11 12:12     ` Gaius Mulley
  2019-07-11 16:40       ` Segher Boessenkool
  0 siblings, 1 reply; 45+ messages in thread
From: Gaius Mulley @ 2019-07-11 12:12 UTC (permalink / raw)
  To: Matthias Klose; +Cc: gcc-patches, Segher Boessenkool

Matthias Klose <doko@ubuntu.com> writes:

>> I had a look at the GCC 9 version of the patches, with a build including a make
>> install. Some comments:
>
> Had a test build based on the gcc-9 branch,
> https://launchpad.net/~doko/+archive/ubuntu/toolchain/+sourcepub/10331180/+listing-archive-extra
>
> powerpc64le-linux-gnu fails to build (search for "unfinished" in the build log)
>
> during RTL pass: final
> ../../src/gcc/gm2/gm2-libs-coroutines/SYSTEM.def: In function '_M2_SYSTEM_init':
> ../../src/gcc/gm2/gm2-libs-coroutines/SYSTEM.def:20: internal compiler error: in
> rs6000_output_function_epilogue, at conf
> ig/rs6000/rs6000.c:29169
>    20 | DEFINITION MODULE SYSTEM ;
>       |
> 0x10b6b7c7 rs6000_output_function_epilogue
>         ../../src/gcc/config/rs6000/rs6000.c:29169
> 0x1043f80f final_end_function()
>         ../../src/gcc/final.c:1887
> 0x10445313 rest_of_handle_final
>         ../../src/gcc/final.c:4667
> 0x10445313 execute
>         ../../src/gcc/final.c:4737
> Please submit a full bug report,
> with preprocessed source if appropriate.
>
> this is using GCC 8 as the bootstrap compiler.
>
> search the build logs for "test_summary" to see the test results.  The binary
> packages gcc-9-test-results contain the log/sum files for the tests.
>
> all the link tests fail with:
>
> xgm2: fatal error: cannot execute 'gm2l': execvp: No such file or directory
> compilation terminated.
> compiler exited with status 1

Hi Matthias,

many thanks for the build results.  There is a newer version of
gm2/Make-lang.in on the 9.1.0 branch which (quietens the output for mc)
and fixes the gm2l execvp (on other platforms).

The ICE is very interesting!



regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-11 12:12     ` Gaius Mulley
@ 2019-07-11 16:40       ` Segher Boessenkool
  2019-07-11 17:26         ` Gaius Mulley
  0 siblings, 1 reply; 45+ messages in thread
From: Segher Boessenkool @ 2019-07-11 16:40 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: Matthias Klose, gcc-patches

On Thu, Jul 11, 2019 at 12:49:44PM +0100, Gaius Mulley wrote:
> Matthias Klose <doko@ubuntu.com> writes:
> > powerpc64le-linux-gnu fails to build (search for "unfinished" in the build log)
> >
> > during RTL pass: final
> > ../../src/gcc/gm2/gm2-libs-coroutines/SYSTEM.def: In function '_M2_SYSTEM_init':
> > ../../src/gcc/gm2/gm2-libs-coroutines/SYSTEM.def:20: internal compiler error: in
> > rs6000_output_function_epilogue, at conf
> > ig/rs6000/rs6000.c:29169

We don't yet support Modula2 in the traceback tables.  I'll add it.
What is the exact spelling in lang_hooks.name?  "GNU Modula 2"?  Or
"GNU Modula2"?  Or what else :-)

> Hi Matthias,
> 
> many thanks for the build results.  There is a newer version of
> gm2/Make-lang.in on the 9.1.0 branch which (quietens the output for mc)
> and fixes the gm2l execvp (on other platforms).
> 
> The ICE is very interesting!

Should I add this to the GCC 9 branch as well?  Does that help testing,
I mean?


Segher

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-11 16:40       ` Segher Boessenkool
@ 2019-07-11 17:26         ` Gaius Mulley
  2019-07-12 15:41           ` Segher Boessenkool
  0 siblings, 1 reply; 45+ messages in thread
From: Gaius Mulley @ 2019-07-11 17:26 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Matthias Klose, gcc-patches

Segher Boessenkool <segher@kernel.crashing.org> writes:

> On Thu, Jul 11, 2019 at 12:49:44PM +0100, Gaius Mulley wrote:
>> Matthias Klose <doko@ubuntu.com> writes:
>> > powerpc64le-linux-gnu fails to build (search for "unfinished" in the build log)
>> >
>> > during RTL pass: final
>> > ../../src/gcc/gm2/gm2-libs-coroutines/SYSTEM.def: In function '_M2_SYSTEM_init':
>> > ../../src/gcc/gm2/gm2-libs-coroutines/SYSTEM.def:20: internal compiler error: in
>> > rs6000_output_function_epilogue, at conf
>> > ig/rs6000/rs6000.c:29169
>
> We don't yet support Modula2 in the traceback tables.  I'll add it.
> What is the exact spelling in lang_hooks.name?  "GNU Modula 2"?  Or
> "GNU Modula2"?  Or what else :-)

Hi Segher,

very close !

#define LANG_HOOKS_NAME "GNU Modula-2"

>> Hi Matthias,
>> 
>> many thanks for the build results.  There is a newer version of
>> gm2/Make-lang.in on the 9.1.0 branch which (quietens the output for mc)
>> and fixes the gm2l execvp (on other platforms).
>> 
>> The ICE is very interesting!
>
> Should I add this to the GCC 9 branch as well?  Does that help testing,
> I mean?

yes please - all that helps is good,


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-11 17:26         ` Gaius Mulley
@ 2019-07-12 15:41           ` Segher Boessenkool
  2019-07-12 18:35             ` Gaius Mulley
  0 siblings, 1 reply; 45+ messages in thread
From: Segher Boessenkool @ 2019-07-12 15:41 UTC (permalink / raw)
  To: Gaius Mulley; +Cc: Matthias Klose, gcc-patches

On Thu, Jul 11, 2019 at 06:09:10PM +0100, Gaius Mulley wrote:
> Segher Boessenkool <segher@kernel.crashing.org> writes:
> 
> > On Thu, Jul 11, 2019 at 12:49:44PM +0100, Gaius Mulley wrote:
> >> Matthias Klose <doko@ubuntu.com> writes:
> >> > powerpc64le-linux-gnu fails to build (search for "unfinished" in the build log)
> >> >
> >> > during RTL pass: final
> >> > ../../src/gcc/gm2/gm2-libs-coroutines/SYSTEM.def: In function '_M2_SYSTEM_init':
> >> > ../../src/gcc/gm2/gm2-libs-coroutines/SYSTEM.def:20: internal compiler error: in
> >> > rs6000_output_function_epilogue, at conf
> >> > ig/rs6000/rs6000.c:29169
> >
> > We don't yet support Modula2 in the traceback tables.  I'll add it.
> > What is the exact spelling in lang_hooks.name?  "GNU Modula 2"?  Or
> > "GNU Modula2"?  Or what else :-)
> 
> Hi Segher,
> 
> very close !
> 
> #define LANG_HOOKS_NAME "GNU Modula-2"
> 
> >> Hi Matthias,
> >> 
> >> many thanks for the build results.  There is a newer version of
> >> gm2/Make-lang.in on the 9.1.0 branch which (quietens the output for mc)
> >> and fixes the gm2l execvp (on other platforms).
> >> 
> >> The ICE is very interesting!
> >
> > Should I add this to the GCC 9 branch as well?  Does that help testing,
> > I mean?
> 
> yes please - all that helps is good,

I committed support for this to both trunk and 9 yesterday, fwiw.


Segher

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-12 15:41           ` Segher Boessenkool
@ 2019-07-12 18:35             ` Gaius Mulley
  0 siblings, 0 replies; 45+ messages in thread
From: Gaius Mulley @ 2019-07-12 18:35 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Matthias Klose, gcc-patches

Segher Boessenkool <segher@kernel.crashing.org> writes:

> On Thu, Jul 11, 2019 at 06:09:10PM +0100, Gaius Mulley wrote:
>> Segher Boessenkool <segher@kernel.crashing.org> writes:
>> 
>> > On Thu, Jul 11, 2019 at 12:49:44PM +0100, Gaius Mulley wrote:
>> >> Matthias Klose <doko@ubuntu.com> writes:
>> >> > powerpc64le-linux-gnu fails to build (search for "unfinished" in the build log)
>> >> >
>> >> > during RTL pass: final
>> >> > ../../src/gcc/gm2/gm2-libs-coroutines/SYSTEM.def: In function '_M2_SYSTEM_init':
>> >> > ../../src/gcc/gm2/gm2-libs-coroutines/SYSTEM.def:20: internal compiler error: in
>> >> > rs6000_output_function_epilogue, at conf
>> >> > ig/rs6000/rs6000.c:29169
>> >
>> > We don't yet support Modula2 in the traceback tables.  I'll add it.
>> > What is the exact spelling in lang_hooks.name?  "GNU Modula 2"?  Or
>> > "GNU Modula2"?  Or what else :-)
>> 
>> Hi Segher,
>> 
>> very close !
>> 
>> #define LANG_HOOKS_NAME "GNU Modula-2"
>> 
>> >> Hi Matthias,
>> >> 
>> >> many thanks for the build results.  There is a newer version of
>> >> gm2/Make-lang.in on the 9.1.0 branch which (quietens the output for mc)
>> >> and fixes the gm2l execvp (on other platforms).
>> >> 
>> >> The ICE is very interesting!
>> >
>> > Should I add this to the GCC 9 branch as well?  Does that help testing,
>> > I mean?
>> 
>> yes please - all that helps is good,
> I committed support for this to both trunk and 9 yesterday, fwiw.

Hi Segher,

many thanks for applying a speedy patch - should be useful when
searching for errors,


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-08 21:21 ` Matthias Klose
                     ` (4 preceding siblings ...)
  2019-07-11  7:57   ` Matthias Klose
@ 2019-07-18 20:15   ` Matthias Klose
  2019-11-20 10:10     ` Gaius Mulley
  5 siblings, 1 reply; 45+ messages in thread
From: Matthias Klose @ 2019-07-18 20:15 UTC (permalink / raw)
  To: Gaius Mulley, gcc-patches

On 08.07.19 23:19, Matthias Klose wrote:
> On 14.06.19 15:09, Gaius Mulley wrote:
>>
>> Hello,
>>
>> here is version two of the patches which introduce Modula-2 into the
>> GCC trunk.  The patches include:
>>
>>   (*)  a patch to allow all front ends to register a lang spec function.
>>        (included are patches for all front ends to provide an empty
>>         callback function).
>>   (*)  patch diffs to allow the Modula-2 front end driver to be
>>        built using GCC Makefile and friends.
>>
>> The compressed tarball includes:
>>
>>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>>        Including the need for registering lang spec functions.
>>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>>        the gm2 driver is built and can understands --version).
>>
>> These patches have been re-written after taking on board the comments
>> found in this thread:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
>>
>> it is a revised patch set from:
>>
>>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>>
>> I've run make bootstrap and run the regression tests on trunk and no
>> extra failures occur for all languages touched in the ChangeLog.
>>
>> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
>> with amd64/arm64/i386) - these patches are currently simply for the
>> driver to minimise the patch size.  There are also > 1800 tests in a
>> dejagnu testsuite for gm2 which can be included at some future time.
> 
> I had a look at the GCC 9 version of the patches, with a build including a make
> install. Some comments:

A look at the licenses:

libgm2/p2c/*: GPL 3+
libgm2/libiso/*: LGPL 2.1+
libgm2/libmin/libc.c: GPL 3+
libgm2/liblog/*: LGPL 2.1+
libgm2/libpim/*: LGPL 2.1+
libgm2/libpim/Selective.c: GPL 3+
libgm2/libpim/wrapc.c: GPL 3+
libgm2/libpth/*: LGPL 2.1+

gcc/gm2/ulm-lib-gm2/* GPL 3+, Ulm copyright holder?

gcc/gm2/gm2-libs/*.def GPL 3+
gcc/gm2/gm2-libs/Break.def LGPL 2.1+
gcc/gm2/gm2-libs/*.mod LGPL 2.1+
gcc/gm2/gm2-libs/Builtins.mod GPL 3+

I didn't look at everything in gcc/gm2, however it's not clear for me when a
file is LGPL or GPL.  And at least in gm2-libs, it seems to be mixed randomly.
First I thought all definition modules were GPL, and implementation modules were
LGPL, but that's not the case.

So currently all code linked with the runtime libs becomes GPL 3+?

For the ulm lib, the files mention the Ulm university as the copyright holder,
but it's not clear which license these files had before they were imported.

libgm2 seems to be mostly LGPL except for two files. Intended?

Matthias

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-06-14 13:10 [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2) Gaius Mulley
                   ` (3 preceding siblings ...)
  2019-07-08 21:21 ` Matthias Klose
@ 2019-07-19 14:22 ` Matthias Klose
  2019-07-20 21:41 ` Matthias Klose
  5 siblings, 0 replies; 45+ messages in thread
From: Matthias Klose @ 2019-07-19 14:22 UTC (permalink / raw)
  To: Gaius Mulley, gcc-patches

On 14.06.19 15:09, Gaius Mulley wrote:
> 
> Hello,
> 
> here is version two of the patches which introduce Modula-2 into the
> GCC trunk.  The patches include:
> 
>   (*)  a patch to allow all front ends to register a lang spec function.
>        (included are patches for all front ends to provide an empty
>         callback function).

fyi, the hook patches for brig, D, Fortran and Go are not yet part of your gm2
repository for the trunk (while they are for gcc-9).  The patches are also
duplicated as trunc and trunk.

Matthias


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-06-14 13:10 [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2) Gaius Mulley
                   ` (4 preceding siblings ...)
  2019-07-19 14:22 ` Matthias Klose
@ 2019-07-20 21:41 ` Matthias Klose
  5 siblings, 0 replies; 45+ messages in thread
From: Matthias Klose @ 2019-07-20 21:41 UTC (permalink / raw)
  To: Gaius Mulley, gcc-patches

On 14.06.19 15:09, Gaius Mulley wrote:

I checked that gm2 cross compilers can be built. One minor nit: The man page is
installed without suffix and prefix.

gcc/gm2/Make-lang.in has

GM2_CROSS_NAME = `echo gm2|sed '$(program_transform_cross_name)'`

The program_transform_cross_name macro was removed in 2003, and doesn't do
anything.  The installation of the man page shouldn't be special-cased for a
cross build.

Matthias

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)
  2019-07-18 20:15   ` Matthias Klose
@ 2019-11-20 10:10     ` Gaius Mulley
  0 siblings, 0 replies; 45+ messages in thread
From: Gaius Mulley @ 2019-11-20 10:10 UTC (permalink / raw)
  To: Matthias Klose; +Cc: gcc-patches

Matthias Klose <doko@ubuntu.com> writes:

> On 08.07.19 23:19, Matthias Klose wrote:
>> On 14.06.19 15:09, Gaius Mulley wrote:
>>>
>>> Hello,
>>>
>>> here is version two of the patches which introduce Modula-2 into the
>>> GCC trunk.  The patches include:
>>>
>>>   (*)  a patch to allow all front ends to register a lang spec function.
>>>        (included are patches for all front ends to provide an empty
>>>         callback function).
>>>   (*)  patch diffs to allow the Modula-2 front end driver to be
>>>        built using GCC Makefile and friends.
>>>
>>> The compressed tarball includes:
>>>
>>>   (*)  gcc/m2  (compiler driver and lang-spec stuff for Modula-2).
>>>        Including the need for registering lang spec functions.
>>>   (*)  gcc/testsuite/gm2  (a Modula-2 dejagnu test to ensure that
>>>        the gm2 driver is built and can understands --version).
>>>
>>> These patches have been re-written after taking on board the comments
>>> found in this thread:
>>>
>>>    https://gcc.gnu.org/ml/gcc-patches/2013-11/msg02620.html
>>>
>>> it is a revised patch set from:
>>>
>>>    https://gcc.gnu.org/ml/gcc-patches/2019-06/msg00220.html
>>>
>>> I've run make bootstrap and run the regression tests on trunk and no
>>> extra failures occur for all languages touched in the ChangeLog.
>>>
>>> I'm currently tracking gcc trunk and gcc-9 with gm2 (which works well
>>> with amd64/arm64/i386) - these patches are currently simply for the
>>> driver to minimise the patch size.  There are also > 1800 tests in a
>>> dejagnu testsuite for gm2 which can be included at some future time.
>> 
>> I had a look at the GCC 9 version of the patches, with a build
>> including a make
>> install. Some comments:
>
> A look at the licenses:
>
> libgm2/p2c/*: GPL 3+
> libgm2/libiso/*: LGPL 2.1+
> libgm2/libmin/libc.c: GPL 3+
> libgm2/liblog/*: LGPL 2.1+
> libgm2/libpim/*: LGPL 2.1+
> libgm2/libpim/Selective.c: GPL 3+
> libgm2/libpim/wrapc.c: GPL 3+
> libgm2/libpth/*: LGPL 2.1+
>
> gcc/gm2/ulm-lib-gm2/* GPL 3+, Ulm copyright holder?
>
> gcc/gm2/gm2-libs/*.def GPL 3+
> gcc/gm2/gm2-libs/Break.def LGPL 2.1+
> gcc/gm2/gm2-libs/*.mod LGPL 2.1+
> gcc/gm2/gm2-libs/Builtins.mod GPL 3+
>
> I didn't look at everything in gcc/gm2, however it's not clear for me when a
> file is LGPL or GPL.  And at least in gm2-libs, it seems to be mixed randomly.
> First I thought all definition modules were GPL, and implementation modules were
> LGPL, but that's not the case.
>
> So currently all code linked with the runtime libs becomes GPL 3+?
>
> For the ulm lib, the files mention the Ulm university as the copyright holder,
> but it's not clear which license these files had before they were imported.
>
> libgm2 seems to be mostly LGPL except for two files. Intended?
>
> Matthias

Hi Matthias,

many thanks for the analysis.  I've now:

  *  removed all gnu pth code and rewritten the coroutine libraries to
     use libgcc/gthr.h.
  *  removed all Univ Ulm libraries
  *  changed all remaining library code to use GPL3+ gcc runtime
     extensions
  *  checked all compiler code is GPL3

(on the master branch of gm2)

[I've still working on the testsuite]


regards,
Gaius

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2019-11-20 10:07 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-14 13:10 [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2) Gaius Mulley
2019-06-29 10:15 ` Richard Sandiford
2019-06-29 12:52   ` Richard Biener
2019-06-29 20:29   ` Gaius Mulley
2019-06-29 18:08 ` Segher Boessenkool
2019-07-02  0:18   ` Gaius Mulley
2019-07-03  8:41 ` Rainer Orth
2019-07-08 15:20   ` Gaius Mulley
2019-07-08 15:31     ` Rainer Orth
2019-07-09  9:25       ` Rainer Orth
2019-07-09 11:41         ` Gaius Mulley
2019-07-10 11:50           ` Rainer Orth
2019-07-08 15:41     ` Gaius Mulley
2019-07-08 21:21 ` Matthias Klose
2019-07-09  6:37   ` Matthias Klose
2019-07-09 19:50     ` Gaius Mulley
2019-07-09 21:35       ` Matthias Klose
2019-07-10 17:56         ` Matthias Klose
2019-07-10 20:18           ` Gaius Mulley
2019-07-10 20:38             ` Matthias Klose
2019-07-10 21:16               ` Gaius Mulley
2019-07-09  9:56   ` Matthias Klose
2019-07-09 12:14     ` Gaius Mulley
2019-07-09 13:24       ` Matthias Klose
2019-07-09 13:49         ` Gaius Mulley
2019-07-09 16:23           ` Matthias Klose
2019-07-09 17:22             ` Gaius Mulley
2019-07-09 12:31   ` Rainer Orth
2019-07-09 15:57     ` Gaius Mulley
2019-07-09 17:32       ` Matthias Klose
2019-07-10 20:45         ` Gaius Mulley
2019-07-10 12:11       ` Rainer Orth
2019-07-09 21:36   ` Matthias Klose
2019-07-10 17:11     ` Matthias Klose
2019-07-10 20:49       ` Gaius Mulley
2019-07-11  7:57   ` Matthias Klose
2019-07-11 12:12     ` Gaius Mulley
2019-07-11 16:40       ` Segher Boessenkool
2019-07-11 17:26         ` Gaius Mulley
2019-07-12 15:41           ` Segher Boessenkool
2019-07-12 18:35             ` Gaius Mulley
2019-07-18 20:15   ` Matthias Klose
2019-11-20 10:10     ` Gaius Mulley
2019-07-19 14:22 ` Matthias Klose
2019-07-20 21:41 ` Matthias Klose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).