mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-11 20:03:28 +00:00
Make it easier to boostrap the addition of new configuration
Estimated hours taken: 0.5 Branches: main Make it easier to boostrap the addition of new configuration options. scripts/Mercury.config.bootstrap.in: A version of Mercury.config.in that does not contain any options which are not understood by the installed compilers. This is used when building the stage1 compiler. Mercury.config is used to build the stage2 and stage3 compilers, and when running the tests. Mercury.config is installed by `mmake install'. Mercury.config.bootstrap.in is currently the same as Mercury.config.in. Mmake.workspace: tools/bootcheck: tools/binary_step: tools/lmc.in: Work out which configuration file to use. configure.in: scripts/Mmakefile: scripts/mercury_config.in: Handle Mercury.config.bootstrap.
This commit is contained in:
92
scripts/Mercury.config.bootstrap.in
Normal file
92
scripts/Mercury.config.bootstrap.in
Normal file
@@ -0,0 +1,92 @@
|
||||
#! /bin/sh
|
||||
# @configure_input@
|
||||
#---------------------------------------------------------------------------#
|
||||
# Copyright (C) 2003 The University of Melbourne.
|
||||
# This file may only be copied under the terms of the GNU General
|
||||
# Public License - see the file COPYING in the Mercury distribution.
|
||||
#---------------------------------------------------------------------------#
|
||||
#
|
||||
# Mercury.config.bootstrap
|
||||
#
|
||||
# Configuration file for the Melbourne Mercury Compiler.
|
||||
#
|
||||
# This file is used instead of Mercury.config when building the
|
||||
# stage1 compiler. It should only refer to options which are
|
||||
# understood by the installed compilers.
|
||||
#
|
||||
# Environment variables: MERCURY_STDLIB_DIR, MERCURY_C_COMPILER,
|
||||
# MERCURY_DEFAULT_GRADE, MERCURY_DEFAULT_OPT_LEVEL.
|
||||
|
||||
# These settings won't override settings in the environment.
|
||||
MERCURY_STDLIB_DIR=@LIBDIR@
|
||||
MERCURY_DEFAULT_OPT_LEVEL=-O2
|
||||
MERCURY_DEFAULT_GRADE=@DEFAULT_GRADE@
|
||||
MERCURY_C_COMPILER=@CC@
|
||||
MERCURY_MATH_LIB=@MATH_LIB@
|
||||
# $(MATH_LIB) needs to be defined because it may
|
||||
# be used by the substitution for SHARED_LIBS.
|
||||
MATH_LIB=$(MERCURY_MATH_LIB)
|
||||
|
||||
DEFAULT_MERCURY_LINKAGE=@DEFAULT_LINKAGE@
|
||||
|
||||
# The default optimization level should be after
|
||||
# all the options that describe the machine configuration.
|
||||
DEFAULT_MCFLAGS=\
|
||||
@ALL_LOCAL_C_INCL_DIR_MMC_OPTS@ \
|
||||
@ALL_LOCAL_C_LIB_DIR_MMC_OPTS@ \
|
||||
--cc "$(MERCURY_C_COMPILER)" \
|
||||
--grade "$(MERCURY_DEFAULT_GRADE)" \
|
||||
--cflags-for-ansi "@CFLAGS_FOR_ANSI@" \
|
||||
--cflags-for-optimization "@CFLAGS_FOR_OPT@" \
|
||||
--cflags-for-warnings "@CFLAGS_FOR_WARNINGS@" \
|
||||
--cflags-for-threads "@CFLAGS_FOR_THREADS@" \
|
||||
--cflags-for-debug "@CFLAGS_FOR_DEBUG@" \
|
||||
--cflags-for-regs "@CFLAGS_FOR_REGS@" \
|
||||
--cflags-for-gotos "@CFLAGS_FOR_GOTOS@" \
|
||||
--cflags-for-pic "@CFLAGS_FOR_PIC@" \
|
||||
--c-flag-to-name-object-file "@OBJFILE_OPT@" \
|
||||
--object-file-extension ".@OBJ_SUFFIX@" \
|
||||
--pic-object-file-extension ".@EXT_FOR_PIC_OBJECTS@" \
|
||||
--link-with-pic-object-file-extension ".@EXT_FOR_LINK_WITH_PIC_OBJECTS@" \
|
||||
--executable-file-extension "@EXT_FOR_EXE@" \
|
||||
--shared-library-extension ".@EXT_FOR_SHARED_LIB@" \
|
||||
--library-extension ".@LIB_SUFFIX@" \
|
||||
--create-archive-command "@AR@" \
|
||||
--create-archive-command-output-flag "@AR_LIBFILE_OPT@" \
|
||||
--create-archive-command-flags "@ARFLAGS@" \
|
||||
--ranlib-command "@RANLIB@" \
|
||||
--link-executable-command "@LINK_EXE@" \
|
||||
--link-shared-lib-command "@LINK_SHARED_OBJ@" \
|
||||
--trace-libs "@TRACE_LIBS_SYSTEM@" \
|
||||
--thread-libs "@THREAD_LIBS@" \
|
||||
--shared-libs "@SHARED_LIBS@" \
|
||||
--math-lib "@MATH_LIB@" \
|
||||
--readline-libs "@READLINE_LIBRARIES@" \
|
||||
--linker-thread-flags "@LDFLAGS_FOR_THREADS@" \
|
||||
--shlib-linker-thread-flags "@LD_LIBFLAGS_FOR_THREADS@" \
|
||||
--linker-trace-flags "@LDFLAGS_FOR_TRACE@" \
|
||||
--shlib-linker-trace-flags "@LD_LIBFLAGS_FOR_TRACE@" \
|
||||
--linker-static-flags "@LD_STATIC_FLAGS@" \
|
||||
--linker-strip-flag "@LD_STRIP_FLAG@" \
|
||||
--linker-debug-flags "@LDFLAGS_FOR_DEBUG@" \
|
||||
--shlib-linker-debug-flags "@LD_LIBFLAGS_FOR_DEBUG@" \
|
||||
--linker-rpath-flag "@EXE_RPATH_OPT@" \
|
||||
--linker-rpath-separator "@EXE_RPATH_SEP@" \
|
||||
--shlib-linker-rpath-flag "@SHLIB_RPATH_OPT@" \
|
||||
--shlib-linker-rpath-separator "@SHLIB_RPATH_SEP@" \
|
||||
--linker-allow-undefined-flag "@ALLOW_UNDEFINED@" \
|
||||
--linker-error-undefined-flag "@ERROR_UNDEFINED@" \
|
||||
--fullarch "@FULLARCH@" \
|
||||
--install-prefix "@prefix@" \
|
||||
--num-real-r-regs "@NUM_REAL_R_REGS@" \
|
||||
--num-real-r-temps "@NUM_REAL_R_TEMPS@" \
|
||||
--conf-low-tag-bits "@LOW_TAG_BITS@" \
|
||||
--bits-per-word "@BITS_PER_WORD@" \
|
||||
--bytes-per-word "@BYTES_PER_WORD@" \
|
||||
--dotnet-library-version "@MS_DOTNET_LIBRARY_VERSION@" \
|
||||
@HAVE_DELAY_SLOT@ \
|
||||
@HAVE_BOXED_FLOATS@ \
|
||||
@MCFLAGS_FOR_CC@ \
|
||||
$(MERCURY_DEFAULT_OPT_LEVEL) \
|
||||
@LIBGRADE_OPTS@
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
#
|
||||
# Configuration file for the Melbourne Mercury Compiler.
|
||||
#
|
||||
# Note to developers: when updating this file consider whether
|
||||
# Mercury.config.bootstrap.in should also be updated.
|
||||
#
|
||||
# Environment variables: MERCURY_STDLIB_DIR, MERCURY_C_COMPILER,
|
||||
# MERCURY_DEFAULT_GRADE, MERCURY_DEFAULT_OPT_LEVEL.
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ EMACS_SCRIPTS = gud.el
|
||||
|
||||
.PHONY: all
|
||||
all: $(SCRIPTS) $(DEBUGGER_SCRIPTS) $(EMACS_SCRIPTS)
|
||||
all: Mmake.vars Mercury.config
|
||||
all: Mmake.vars Mercury.config Mercury.config.bootstrap
|
||||
|
||||
#-----------------------------------------------------------------------------#
|
||||
|
||||
|
||||
@@ -126,6 +126,7 @@ cp -r $input_libdir/reconf/* $TMPDIR || exit 1
|
||||
mkdir $TMPDIR/bindist || exit 1
|
||||
|
||||
# The configure script tries to process these files, but they won't be used.
|
||||
touch $TMPDIR/scripts/Mercury.config.bootstrap.in || exit 1
|
||||
touch $TMPDIR/Mmake.common.in $TMPDIR/bindist/bindist.INSTALL.in || exit 1
|
||||
touch $TMPDIR/bindist/bindist.Makefile.in || exit 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user