summaryrefslogtreecommitdiff
path: root/libphobos/configure
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2020-03-25 09:38:58 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2020-04-18 18:25:49 +0200
commit261bd78d57d40a03f340cfe4fc78ff9717c9602d (patch)
tree56918700689bbafd55af340a13d15c94ac5831fe /libphobos/configure
parentbaf3b9b2e5259558ef86bd62398e2ccecd7a4a4c (diff)
downloadgcc-261bd78d57d40a03f340cfe4fc78ff9717c9602d.tar.gz
libphobos: Add --with-libphobos-druntime-only option.
The intended purpose of the option is both for targets that don't support phobos yet, and for gdc itself to support bootstrapping itself as a self-hosted D compiler. The libphobos testsuite has been updated to only add libphobos to the search paths if it's being built. A new D2 testsuite directive RUNNABLE_PHOBOS_TEST has also been patched in to disable some runnable tests that have phobos dependencies, of which is a temporary measure until upstream DMD fixes or removes these tests entirely. gcc/testsuite/ChangeLog: * lib/gdc-utils.exp (gdc-convert-test): Add dg-skip-if for tests that depending on the phobos standard library. libphobos/ChangeLog: * configure: Regenerate. * configure.ac: Add --with-libphobos-druntime-only option and the conditional ENABLE_LIBDRUNTIME_ONLY. * configure.tgt: Define LIBDRUNTIME_ONLY. * src/Makefile.am: Add phobos sources if not ENABLE_LIBDRUNTIME_ONLY. * src/Makefile.in: Regenerate. * testsuite/testsuite_flags.in: Add phobos path if compiling phobos.
Diffstat (limited to 'libphobos/configure')
-rwxr-xr-xlibphobos/configure48
1 files changed, 46 insertions, 2 deletions
diff --git a/libphobos/configure b/libphobos/configure
index a6f5aec2bfd..2dcf15ed852 100755
--- a/libphobos/configure
+++ b/libphobos/configure
@@ -638,6 +638,8 @@ GDCFLAGSX
libtool_VERSION
SPEC_PHOBOS_DEPS
CHECKING_DFLAGS
+ENABLE_LIBDRUNTIME_ONLY_FALSE
+ENABLE_LIBDRUNTIME_ONLY_TRUE
ENABLE_LIBPHOBOS_FALSE
ENABLE_LIBPHOBOS_TRUE
gdc_include_dir
@@ -840,6 +842,7 @@ with_cross_host
enable_version_specific_runtime_libs
with_toolexeclibdir
enable_libphobos
+with_libdruntime_only
enable_libphobos_checking
'
ac_precious_vars='build_alias
@@ -1509,6 +1512,8 @@ Optional Packages:
--with-toolexeclibdir=DIR
install libraries built with a cross compiler within
DIR
+ --with-libphobos-druntime-only={yes,no,auto}
+ build only the druntime library (default: auto)
Some influential environment variables:
CC C compiler command
@@ -11645,7 +11650,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11648 "configure"
+#line 11653 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11751,7 +11756,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11754 "configure"
+#line 11759 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15230,8 +15235,27 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libphobos" >&5
$as_echo "$enable_libphobos" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libphobos-druntime-only" >&5
+$as_echo_n "checking for --with-libphobos-druntime-only... " >&6; }
+
+# Check whether --with-libdruntime-only was given.
+if test "${with_libdruntime_only+set}" = set; then :
+ withval=$with_libdruntime_only;
+else
+ with_libdruntime_only=auto
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libdruntime_only" >&5
+$as_echo "$with_libdruntime_only" >&6; }
+
+case "$with_libdruntime_only" in
+ yes|no|auto) ;;
+ *) as_fn_error $? "Invalid argument for --with-libphobos-druntime-only" "$LINENO" 5 ;;
+esac
+
# See if supported.
unset LIBPHOBOS_SUPPORTED
+unset LIBDRUNTIME_ONLY
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for host support for libphobos" >&5
$as_echo_n "checking for host support for libphobos... " >&6; }
. ${srcdir}/configure.tgt
@@ -15274,6 +15298,22 @@ else
fi
+# Decide if only libdruntime should be built.
+case $LIBDRUNTIME_ONLY:$with_libdruntime_only in
+*:no) only_libdruntime=no ;;
+*:yes) only_libdruntime=yes ;;
+yes:*) only_libdruntime=yes ;;
+*:*) only_libdruntime=no ;;
+esac
+ if test x$only_libdruntime = xyes; then
+ ENABLE_LIBDRUNTIME_ONLY_TRUE=
+ ENABLE_LIBDRUNTIME_ONLY_FALSE='#'
+else
+ ENABLE_LIBDRUNTIME_ONLY_TRUE='#'
+ ENABLE_LIBDRUNTIME_ONLY_FALSE=
+fi
+
+
# Enable expensive internal checks
# Check whether --enable-libphobos-checking was given.
if test "${enable_libphobos_checking+set}" = set; then :
@@ -15577,6 +15617,10 @@ if test -z "${ENABLE_LIBPHOBOS_TRUE}" && test -z "${ENABLE_LIBPHOBOS_FALSE}"; th
as_fn_error $? "conditional \"ENABLE_LIBPHOBOS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${ENABLE_LIBDRUNTIME_ONLY_TRUE}" && test -z "${ENABLE_LIBDRUNTIME_ONLY_FALSE}"; then
+ as_fn_error $? "conditional \"ENABLE_LIBDRUNTIME_ONLY\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0