mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-27 15:24:00 +00:00
Estimated hours taken: 0.2 Branches: main Finish the change to allow installed Mercury libraries to be used directly by mmc. bootstrap CVS tag: bootstrap_20011119_fullarch_opt scripts/mmc.in: Pass the value of the `--fullarch' option determined at configuration time. configure.in: Test for the `--fullarch' option. Remove an old test for `.c_date' files.
83 lines
2.8 KiB
Bash
83 lines
2.8 KiB
Bash
#! /bin/sh
|
|
# @configure_input@
|
|
#---------------------------------------------------------------------------#
|
|
# Copyright (C) 1994-1998, 2000-2001 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.
|
|
#---------------------------------------------------------------------------#
|
|
#
|
|
# MMC - Melbourne Mercury Compiler.
|
|
#
|
|
# Use `mmc -h' for help.
|
|
#
|
|
# Environment variables: MERCURY_INT_DIR, MERCURY_C_INCL_DIR,
|
|
# MERCURY_ALL_MC_C_INCL_DIRS,
|
|
# MERCURY_COMPILER, MERCURY_C_COMPILER,
|
|
# MERCURY_DEFAULT_GRADE, MERCURY_DEFAULT_OPT_LEVEL.
|
|
|
|
INTDIR=${MERCURY_INT_DIR=@LIBDIR@/ints}
|
|
MERC_C_INCL_DIR=${MERCURY_C_INCL_DIR=@LIBDIR@/inc}
|
|
MERC_ALL_MC_C_INCL_DIRS=${MERCURY_ALL_MC_C_INCL_DIRS="--c-include-directory $MERC_C_INCL_DIR"}
|
|
MC=${MERCURY_COMPILER="@LIBDIR@/bin/@FULLARCH@/mercury_compile"}
|
|
DEFAULT_GRADE=${MERCURY_DEFAULT_GRADE=@DEFAULT_GRADE@}
|
|
CC=${MERCURY_C_COMPILER="@CC@"}
|
|
CFLAGS_FOR_REGS="@CFLAGS_FOR_REGS@"
|
|
CFLAGS_FOR_GOTOS="@CFLAGS_FOR_GOTOS@"
|
|
CFLAGS_FOR_THREADS="@CFLAGS_FOR_THREADS@"
|
|
CFLAG_TO_NAME_OBJECT_FILE="@OBJFILE_OPT@"
|
|
OBJECT_FILE_EXTENSION=".@OBJ_SUFFIX@"
|
|
FULLARCH=@FULLARCH@
|
|
LOW_TAG_BITS=@LOW_TAG_BITS@
|
|
BITS_PER_WORD=@BITS_PER_WORD@
|
|
BYTES_PER_WORD=@BYTES_PER_WORD@
|
|
NUM_REAL_R_REGS=@NUM_REAL_R_REGS@
|
|
NUM_REAL_R_TEMPS=@NUM_REAL_R_TEMPS@
|
|
HAVE_DELAY_SLOT=@HAVE_DELAY_SLOT@
|
|
HAVE_BOXED_FLOATS=@HAVE_BOXED_FLOATS@
|
|
DEFAULT_OPT_LEVEL=${MERCURY_DEFAULT_OPT_LEVEL="-O2"}
|
|
|
|
# The default optimization level should be after
|
|
# all the options that describe the machine configuration.
|
|
|
|
case $# in
|
|
0) exec $MC \
|
|
$MERC_ALL_MC_C_INCL_DIRS \
|
|
--cc "$CC" --grade "$DEFAULT_GRADE" \
|
|
--cflags-for-threads "$CFLAGS_FOR_THREADS" \
|
|
--cflags-for-regs "$CFLAGS_FOR_REGS" \
|
|
--cflags-for-gotos "$CFLAGS_FOR_GOTOS" \
|
|
--c-flag-to-name-object-file "$CFLAG_TO_NAME_OBJECT_FILE" \
|
|
--object-file-extension "$OBJECT_FILE_EXTENSION" \
|
|
--fullarch "$FULLARCH" \
|
|
--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" \
|
|
$HAVE_DELAY_SLOT \
|
|
$HAVE_BOXED_FLOATS \
|
|
$DEFAULT_OPT_LEVEL \
|
|
-I "$INTDIR"
|
|
;;
|
|
*) exec $MC \
|
|
$MERC_ALL_MC_C_INCL_DIRS \
|
|
--cc "$CC" --grade "$DEFAULT_GRADE" \
|
|
--cflags-for-threads "$CFLAGS_FOR_THREADS" \
|
|
--cflags-for-regs "$CFLAGS_FOR_REGS" \
|
|
--cflags-for-gotos "$CFLAGS_FOR_GOTOS" \
|
|
--c-flag-to-name-object-file "$CFLAG_TO_NAME_OBJECT_FILE" \
|
|
--object-file-extension "$OBJECT_FILE_EXTENSION" \
|
|
--fullarch "$FULLARCH" \
|
|
--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" \
|
|
$HAVE_DELAY_SLOT \
|
|
$HAVE_BOXED_FLOATS \
|
|
$DEFAULT_OPT_LEVEL \
|
|
"$@" \
|
|
-I "$INTDIR"
|
|
;;
|
|
esac
|