mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-18 07:15:19 +00:00
Fix linking error for hlc.par.gc grade on Darwin.
Estimated hours taken: 3 Branches: main Fix linking error for hlc.par.gc grade on Darwin. The problem was that the "-undefined suppress" option is not allowed with two level namespaces. The solution is to use "-undefined dynamic_lookup" instead. However this means the MACOSX_DEPLOYMENT_TARGET environment variable must be set to 10.3 since this feature will not work on Mac OS < 10.3. To allow hlc.gc.par to be built on Mac 10.3, but targetted for Mac OS 10.0 - 10.2 add a configuration option to force the use of flat namespaces (the "-undefined suppress" option may be used with flat namespaces). configure.in Add --enable-darwin-flat-namespace option. This is the default for Mac OS < 10.3. For Mac OS 10.3 two level namespaces are used unless this option is given. Set a variable to cause the MACOSX_DEPLOYMENT_TARGET environment variable to be set if two level namespaces are being used. scripts/mmake.in scripts/ml.in scripts/mmc.in Set the MACOSX_DEPLOYMENT_TARGET environment variable wherever the linker may be called.
This commit is contained in:
@@ -57,6 +57,9 @@ MATH_LIB=${MERCURY_MATH_LIB="@MATH_LIB@"}
|
||||
# since @SHARED_LIBS_SH@ may refer to $MATH_LIB.
|
||||
SHARED_LIBS=${MERCURY_SHARED_LIBS="@SHARED_LIBS_SH@"}
|
||||
|
||||
# Set the MACOSX_DEPLOYMENT_TARGET environment variable if needed.
|
||||
@SET_MACOSX_DEPLOYMENT_TARGET@
|
||||
|
||||
# When compiling in the hlc.gc grade using the Microsoft Visual C
|
||||
# compiler, the default maximum stack size of 4Mb is too low for a
|
||||
# recursive language.
|
||||
|
||||
@@ -80,6 +80,9 @@ MERCURY_DEFAULT_GRADE=${MERCURY_DEFAULT_GRADE=@DEFAULT_GRADE@}
|
||||
MKTEMP=@MKTEMP@
|
||||
TMPDIR=${TMPDIR=/tmp}
|
||||
|
||||
# Set the MACOSX_DEPLOYMENT_TARGET environment variable if needed.
|
||||
@SET_MACOSX_DEPLOYMENT_TARGET@
|
||||
|
||||
MMAKE=$0
|
||||
include_makefile=
|
||||
verbose=false
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
# @configure_input@
|
||||
#---------------------------------------------------------------------------#
|
||||
# Copyright (C) 1994-1998, 2000-2003 The University of Melbourne.
|
||||
# Copyright (C) 1994-1998, 2000-2004 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.
|
||||
#---------------------------------------------------------------------------#
|
||||
@@ -18,6 +18,9 @@ MERCURY_COMPILER=${MERCURY_COMPILER-'@LIBDIR@/bin/@FULLARCH@/mercury_compile'}
|
||||
MERCURY_CONFIG_DIR=${MERCURY_CONFIG_DIR-${MERCURY_STDLIB_DIR-'@CONFIG_LIBDIR@'}}
|
||||
export MERCURY_COMPILER MERCURY_CONFIG_DIR
|
||||
|
||||
# Set the MACOSX_DEPLOYMENT_TARGET environment variable if needed.
|
||||
@SET_MACOSX_DEPLOYMENT_TARGET@
|
||||
|
||||
case $# in
|
||||
0) exec $MERCURY_COMPILER ;;
|
||||
*) exec $MERCURY_COMPILER "$@" ;;
|
||||
|
||||
Reference in New Issue
Block a user