[m-dev.] for review: use new compiler when building library grades
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed May 24 17:40:39 AEST 2000
Peter Ross volunteered to test & review this.
----------
Estimated hours taken: 0.75
Fix a problem bootstrapping introduced by the MLDS back-end changes.
Also reduce the vulnerability of the installation process to these
kind of bootstrapping problems, by using the newly installed compiler
to build the library grades.
configure.in:
When testing whether the installed compiler is sufficiently up-to-date,
use `--high-level-code', since the installation process now requires
the compiler to generate .dep files that support --high-level-code.
Mmakefile:
In the rule for `install_grades', override PATH and MC,
so that we build the different grades of the libraries
using the newly installed compiler rather than the bootstrap
compiler. This means that if the `.c' files that we ship
are up-to-date, and don't need to be rebuilt for a different
grade or a different word size (as may be desirable on some
architectures), then the bootstrap compiler will not be used
at all.
configure.in:
Mmake.common.in:
Put the bootstrap mmc flags in a separate variable BOOTSTRAP_MC_FLAGS,
for use by Mmakefile.
Workspace: /home/pgrad/fjh/ws/hg
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.204
diff -u -d -r1.204 configure.in
--- configure.in 2000/05/17 12:16:06 1.204
+++ configure.in 2000/05/24 07:17:50
@@ -102,7 +102,8 @@
EOF
if
echo $BOOTSTRAP_MC conftest >&AC_FD_CC 2>&1 &&
- $BOOTSTRAP_MC conftest </dev/null >&AC_FD_CC 2>&1 &&
+ $BOOTSTRAP_MC --high-level-code conftest \
+ </dev/null >&AC_FD_CC 2>&1 &&
test "`./conftest 2>&1`" = "Hello, world"
then
AC_MSG_RESULT(yes)
@@ -2054,8 +2055,9 @@
if test "$BOOTSTRAP_MC" = ""; then
BOOTSTRAP_MC=mmc
fi
-BOOTSTRAP_MC="$BOOTSTRAP_MC $HAVE_BOXED_FLOATS --conf-low-tag-bits $LOW_TAG_BITS --bits-per-word $BITS_PER_WORD --bytes-per-word $BYTES_PER_WORD"
+BOOTSTRAP_MC_FLAGS="$BOOTSTRAP_MC $HAVE_BOXED_FLOATS --conf-low-tag-bits $LOW_TAG_BITS --bits-per-word $BITS_PER_WORD --bytes-per-word $BYTES_PER_WORD"
AC_SUBST(BOOTSTRAP_MC)
+AC_SUBST(BOOTSTRAP_MC_FLAGS)
#-----------------------------------------------------------------------------#
# The following allows us to share some subroutines between the
Index: Mmake.common.in
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmake.common.in,v
retrieving revision 1.44
diff -u -d -r1.44 Mmake.common.in
--- Mmake.common.in 1999/12/08 14:28:04 1.44
+++ Mmake.common.in 2000/05/24 07:18:47
@@ -22,7 +22,9 @@
#-----------------------------------------------------------------------------#
# Specify the Mercury compiler to use for bootstrapping
-MC = @BOOTSTRAP_MC@
+BOOTSTRAP_MC = @BOOTSTRAP_MC@
+BOOTSTRAP_MC_FLAGS = @BOOTSTRAP_MC_FLAGS@
+MC = $(BOOTSTRAP_MC) $(BOOTSTRAP_MC_FLAGS)
# Specify the compilation model to use for compiling the compiler
GRADE = @GRADE@
Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmakefile,v
retrieving revision 1.52
diff -u -d -r1.52 Mmakefile
--- Mmakefile 2000/05/20 10:50:19 1.52
+++ Mmakefile 2000/05/24 07:21:36
@@ -349,6 +349,13 @@
Mercury/cs/*.c Mercury/os/*.o tmp_dir || true; }
cd trace && rm -rf tmp_dir && mkdir tmp_dir && \
{ mv -f *.o *.pic_o *.a *.so tmp_dir || true; }
+ #
+ # Use the newly installed compiler to build the libraries
+ # in various different grades. We need to override MC
+ # and PATH to use the newly installed compiler rather than
+ # the bootstrap compiler.
+ #
+ PATH="$(INSTALL_BINDIR):$$PATH"; \
for grade in x $(LIBGRADES); do \
if [ "$$grade" != "x" ]; then \
case "$$grade" in \
@@ -360,18 +367,26 @@
;; \
esac; \
( cd boehm_gc && \
- $(SUBDIR_MMAKE) GRADE=$$grade PROF=$$prof install_lib ) && \
+ $(SUBDIR_MMAKE) MC="mmc $(BOOSTRAP_MC_FLAGS)" GRADE=$$grade \
+ PROF=$$prof install_lib ) && \
( cd runtime && \
- $(SUBDIR_MMAKE) GRADE=$$grade install_lib ) && \
+ $(SUBDIR_MMAKE) MC="mmc $(BOOSTRAP_MC_FLAGS)" GRADE=$$grade \
+ install_lib ) && \
( cd library && \
- $(SUBDIR_MMAKE) GRADE=$$grade depend && \
- $(SUBDIR_MMAKE) GRADE=$$grade install_hdrs && \
- $(SUBDIR_MMAKE) GRADE=$$grade install_library ) && \
+ $(SUBDIR_MMAKE) MC="mmc $(BOOSTRAP_MC_FLAGS)" GRADE=$$grade \
+ depend && \
+ $(SUBDIR_MMAKE) MC="mmc $(BOOSTRAP_MC_FLAGS)" GRADE=$$grade \
+ install_hdrs && \
+ $(SUBDIR_MMAKE) MC="mmc $(BOOSTRAP_MC_FLAGS)" GRADE=$$grade \
+ install_library ) && \
( cd browser && \
- $(SUBDIR_MMAKE) GRADE=$$grade depend && \
- $(SUBDIR_MMAKE) GRADE=$$grade install_library ) && \
+ $(SUBDIR_MMAKE) MC="mmc $(BOOSTRAP_MC_FLAGS)" GRADE=$$grade \
+ depend && \
+ $(SUBDIR_MMAKE) MC="mmc $(BOOSTRAP_MC_FLAGS)" GRADE=$$grade \
+ install_library ) && \
( cd trace && \
- $(SUBDIR_MMAKE) GRADE=$$grade install_lib ) && \
+ $(SUBDIR_MMAKE) MC="mmc $(BOOSTRAP_MC_FLAGS)" GRADE=$$grade \
+ install_lib ) && \
( cd boehm_gc && rm -f *.o *.pic_o *.a *.so ) && \
( cd runtime && rm -f *.o *.pic_o *.a *.so ) && \
( cd library && rm -f *.dep *.h *.c *.o *.pic_o *.a *.so \
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list