[m-rev.] diff: make stage 1 build in the java grade

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Jan 26 18:34:45 AEDT 2011


Branches: main, 11.01

Make building stage 1 of the Mercury system work with the java grade.

compiler/Mmakefile:
deep_profiler/Mmakefile:
profiler/Mmakefile:
slice/Mmakefile:
 	In non-C grades override any attempts to link against object
 	files or archives.

 	Compile with --allow-stubs where things still rely on C
 	foreign procs and there are no alternative definitions
 	currently available.

Julien.

Index: compiler/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/Mmakefile,v
retrieving revision 1.109
diff -u -r1.109 Mmakefile
--- compiler/Mmakefile	19 Jan 2011 07:01:49 -0000	1.109
+++ compiler/Mmakefile	26 Jan 2011 07:26:07 -0000
@@ -65,9 +65,15 @@
  	cd $(GCC_SRC_DIR)/gcc && $(MAKE) mercury_gcc_backend_libs

  MCFLAGS	     += --flags COMP_FLAGS $(CONFIG_OVERRIDE)
+
+ifeq ("$(filter il% csharp% java% erlang%,$(GRADE))","")
  MLOBJS       := ../main.$O \
  		../trace/lib$(EVENTSPEC_LIB_NAME).$A \
  		$(MLOBJS)
+else
+MLOBJS =
+endif
+
  MLLIBS       += $(THREAD_LIBS)
  ALL_MLLIBS    = $(MLLIBS) $(EXTRA_MLLIBS) $(GCC_BACKEND_LIBS)
  MLFLAGS      += --no-main --shared
Index: deep_profiler/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/Mmakefile,v
retrieving revision 1.38
diff -u -r1.38 Mmakefile
--- deep_profiler/Mmakefile	14 Jan 2011 04:07:55 -0000	1.38
+++ deep_profiler/Mmakefile	26 Jan 2011 07:26:07 -0000
@@ -77,6 +77,22 @@

  #-----------------------------------------------------------------------------#

+ifneq ("$(filter il% csharp% java% erlang%,$(GRADE))","")
+MLOBJS =
+endif
+
+#-----------------------------------------------------------------------------#
+
+# The deep profiler contains quite a lot of C code for which there are
+# currently not C#, IL, Java or Erlang implementations.  We need to pass
+# `--allow-stubs' in order to compile it.
+#
+ifneq ("$(filter il% csharp% java% erlang%,$(GRADE))","")
+MCFLAGS += --allow-stubs --no-warn-stubs
+endif
+
+#-----------------------------------------------------------------------------#
+
  .PHONY: nothing
  nothing:

Index: profiler/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/profiler/Mmakefile,v
retrieving revision 1.35
diff -u -r1.35 Mmakefile
--- profiler/Mmakefile	30 Sep 2010 07:23:33 -0000	1.35
+++ profiler/Mmakefile	26 Jan 2011 07:26:08 -0000
@@ -48,6 +48,10 @@

  $(cs_subdir)mercury_profile_init.c: $(UTIL_DIR)/mkinit

+ifneq ("$(filter il% csharp% java% erlang%,$(GRADE))","")
+MLOBJS =
+endif
+
  #-----------------------------------------------------------------------------#

  .PHONY: check
Index: slice/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/slice/Mmakefile,v
retrieving revision 1.24
diff -u -r1.24 Mmakefile
--- slice/Mmakefile	14 Jan 2011 04:07:55 -0000	1.24
+++ slice/Mmakefile	26 Jan 2011 07:26:08 -0000
@@ -66,6 +66,12 @@

  #-----------------------------------------------------------------------------#

+ifneq ("$(filter il% csharp% java% erlang%,$(GRADE))","")
+MLOBJS =
+endif
+
+#-----------------------------------------------------------------------------#
+
  .PHONY: depend
  depend:	$(MDBCOMP_MODULES) $(DEPENDS)

@@ -90,6 +96,16 @@

  #-----------------------------------------------------------------------------#

+# The C#, IL, Java and Erlang implementations of the mdbcomp library are not yet
+# complete, so we need to pass `--allow-stubs' to get them to compile.
+# Since the standard library is compiled with `--halt-at-warn',
+# we also need `--no-warn-stubs'.
+ifneq ("$(filter il% csharp% java% erlang%,$(GRADE))","")
+MCFLAGS += --allow-stubs --no-warn-stubs
+endif
+
+#-----------------------------------------------------------------------------#
+
  # Add some additional dependencies, so that Mmake knows to remake the
  # slicer and dicer if one of the libraries changes.


--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list