[m-rev.] diff: fix for MR_STATIC() fallout
Fergus Henderson
fjh at cs.mu.OZ.AU
Mon May 26 20:24:29 AEST 2003
Estimated hours taken: 1
Branches: main
compiler/Mercury.options:
Back out my previous change to not pass
`-DMR_NO_BACKWARDS_COMPAT' for gcc.c and mlds_to_c.c;
instead, add a comment explaining why this is needed.
runtime/mercury_bootstrap.h:
Move the definition of MR_STATIC() and MR_GOTO_STATIC()
outside of the #ifdef MR_NO_BACKWARDS_COMPAT, since they
are needed for bootstrapping.
Workspace: /home/ceres/fjh/mercury
Index: compiler/Mercury.options
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Mercury.options,v
retrieving revision 1.5
diff -u -d -r1.5 Mercury.options
--- compiler/Mercury.options 19 May 2003 07:52:57 -0000 1.5
+++ compiler/Mercury.options 20 May 2003 09:12:03 -0000
@@ -32,8 +32,11 @@
MCFLAGS-make.program_target = --no-ansi-c
# The c_code in the module gcc.m needs the header files from the GNU C
-# distribution.
-CFLAGS-gcc = -DIN_GCC -DHAVE_CONFIG_H \
+# distribution. Note that we need to compile these with
+# -DMR_NO_BACKWARDS_COMPAT, because otherwise there are name
+# conflicts with symbols defined in the GCC headers.
+CFLAGS-gcc = -DMR_NO_BACKWARDS_COMPAT \
+ -DIN_GCC -DHAVE_CONFIG_H \
-I. \
-I$(GCC_SRC_DIR)/gcc \
-I$(GCC_SRC_DIR)/gcc/mercury \
Index: runtime/mercury_bootstrap.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_bootstrap.h,v
retrieving revision 1.33
diff -u -d -r1.33 mercury_bootstrap.h
--- runtime/mercury_bootstrap.h 7 May 2003 03:21:45 -0000 1.33
+++ runtime/mercury_bootstrap.h 26 May 2003 10:20:45 -0000
@@ -15,15 +15,15 @@
#ifndef MERCURY_BOOTSTRAP_H
#define MERCURY_BOOTSTRAP_H
+#define MR_STATIC(l) MR_ENTRY(l)
+#define MR_GOTO_STATIC(l) MR_GOTO_ENTRY(l)
+
/*
** This stuff is enabled by default,
** but you can disable it by defining MR_NO_BACKWARDS_COMPAT.
*/
#ifndef MR_NO_BACKWARDS_COMPAT
-
-#define MR_STATIC(l) MR_ENTRY(l)
-#define MR_GOTO_STATIC(l) MR_GOTO_ENTRY(l)
/*
** bool, TRUE and FALSE appear in the generated code.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list