am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
-GDCFLAGSX
+WARN_DFLAGS
libtool_VERSION
SPEC_PHOBOS_DEPS
+CHECKING_DFLAGS
+ENABLE_LIBDRUNTIME_ONLY_FALSE
+ENABLE_LIBDRUNTIME_ONLY_TRUE
+ENABLE_LIBPHOBOS_FALSE
+ENABLE_LIBPHOBOS_TRUE
gdc_include_dir
libphobos_toolexeclibdir
libphobos_toolexecdir
DRUNTIME_OS_ARM_EABI_UNWINDER_TRUE
DCFG_ARM_EABI_UNWINDER
DCFG_THREAD_MODEL
+DRUNTIME_OS_POSIX_FALSE
+DRUNTIME_OS_POSIX_TRUE
DRUNTIME_OS_SOLARIS_FALSE
DRUNTIME_OS_SOLARIS_TRUE
DRUNTIME_OS_MINGW_FALSE
DRUNTIME_OS_ANDROID_TRUE
DRUNTIME_OS_AIX_FALSE
DRUNTIME_OS_AIX_TRUE
-DRUNTIME_OS_UNIX_FALSE
-DRUNTIME_OS_UNIX_TRUE
+DRUNTIME_CPU_S390_FALSE
+DRUNTIME_CPU_S390_TRUE
+DRUNTIME_CPU_SYSTEMZ_FALSE
+DRUNTIME_CPU_SYSTEMZ_TRUE
DRUNTIME_CPU_X86_FALSE
DRUNTIME_CPU_X86_TRUE
-DRUNTIME_CPU_POWERPC64_FALSE
-DRUNTIME_CPU_POWERPC64_TRUE
DRUNTIME_CPU_POWERPC_FALSE
DRUNTIME_CPU_POWERPC_TRUE
DRUNTIME_CPU_MIPS_FALSE
DRUNTIME_CPU_ARM_TRUE
DRUNTIME_CPU_AARCH64_FALSE
DRUNTIME_CPU_AARCH64_TRUE
-DRUNTIME_GC_ENABLE_FALSE
-DRUNTIME_GC_ENABLE_TRUE
libphobos_srcdir
libphobos_builddir
get_gcc_base_ver
-ENABLE_LIBPHOBOS_FALSE
-ENABLE_LIBPHOBOS_TRUE
phobos_compiler_shared_flag
phobos_compiler_pic_flag
OTOOL64
CFLAGS_FOR_BUILD
CC_FOR_BUILD
AR
+CET_DFLAGS
+CET_FLAGS
RANLIB
MAINT
MAINTAINER_MODE_FALSE
enable_multilib
enable_silent_rules
enable_maintainer_mode
+enable_cet
enable_shared
enable_static
with_pic
enable_fast_install
with_gnu_ld
enable_libtool_lock
-enable_libphobos
with_gcc_major_version_only
enable_werror
-enable_druntime_gc
-enable_unix
-enable_thread_lib
with_libatomic
with_libbacktrace
with_target_system_zlib
with_cross_host
enable_version_specific_runtime_libs
+with_toolexeclibdir
+enable_libphobos
+with_libphobos_druntime_only
+enable_libphobos_checking
'
ac_precious_vars='build_alias
host_alias
--enable-maintainer-mode
enable make rules and dependencies not useful (and
sometimes confusing) to the casual installer
+ --enable-cet enable Intel CET in target libraries [default=auto]
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
- --enable-libphobos Enable libphobos
--enable-werror turns on -Werror [default=no]
- --enable-druntime-gc enable D runtime garbage collector (default: yes)
- --enable-unix enables Unix runtime (default: yes, for Unix
- targets)
- --enable-thread-lib=<arg>
- specify linker option for the system thread library
- (default: autodetect)
--enable-version-specific-runtime-libs
Specify that runtime libraries should be installed
in a compiler-specific directory
+ --enable-libphobos Enable libphobos
+ --enable-libphobos-checking[=LIST]
+ enable expensive run-time checks. With LIST, enable
+ only specific categories of checks. Categories are:
+ yes,no,all,none,release. Flags are: assert or other
+ strings
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--with-target-system-zlib={yes,no,auto}
use installed libz (default: no)
--with-cross-host=HOST configuring with a cross compiler
+ --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
fi
+# Add CET specific flags if CET is enabled
+ # Check whether --enable-cet was given.
+if test "${enable_cet+set}" = set; then :
+ enableval=$enable_cet;
+ case "$enableval" in
+ yes|no|auto) ;;
+ *) as_fn_error $? "Unknown argument to enable/disable cet" "$LINENO" 5 ;;
+ esac
+
+else
+ enable_cet=auto
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CET support" >&5
+$as_echo_n "checking for CET support... " >&6; }
+
+# NB: Avoid nested save_CFLAGS and save_LDFLAGS.
+case "$host" in
+ i[34567]86-*-linux* | x86_64-*-linux*)
+ case "$enable_cet" in
+ auto)
+ # Check if target supports multi-byte NOPs
+ # and if compiler and assembler support CET insn.
+ cet_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fcf-protection"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !defined(__SSE2__)
+#error target does not support multi-byte NOPs
+#else
+asm ("setssbsy");
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ enable_cet=yes
+else
+ enable_cet=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$cet_save_CFLAGS"
+ ;;
+ yes)
+ # Check if assembler supports CET.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+asm ("setssbsy");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ as_fn_error $? "assembler with CET support is required for --enable-cet" "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ;;
+ esac
+ ;;
+ *)
+ enable_cet=no
+ ;;
+esac
+if test x$enable_cet = xyes; then
+ CET_FLAGS="-fcf-protection -mshstk"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# To ensure that runtime code for CET is compiled in, add in D version flags.
+if test "$enable_cet" = yes; then
+ CET_DFLAGS="$CET_FLAGS -fversion=CET"
+
+fi
+
# This should be inherited in the recursive make, but ensure it is defined.
test "$AR" || AR=ar
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi)
lt_cv_deplibs_check_method=pass_all
;;
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
;;
# This must be Linux ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+
+# uclinux* changes (here and below) have been submitted to the libtool
+# project, but have not yet been accepted: they are GCC-local changes
+# for the time being. (See
+# https://lists.gnu.org/archive/html/libtool-patches/2018-05/msg00000.html)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi)
version_type=linux
need_lib_prefix=no
need_version=no
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11638 "configure"
+#line 11747 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11744 "configure"
+#line 11853 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
archive_expsym_cmds_D='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi)
tmp_diet=no
if test "$host_os" = linux-dietlibc; then
case $cc_basename in
lt_prog_compiler_pic_D="$phobos_compiler_shared_flag"
pic_mode='default'
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-libphobos" >&5
-$as_echo_n "checking for --enable-libphobos... " >&6; }
-# Check whether --enable-libphobos was given.
-if test "${enable_libphobos+set}" = set; then :
- enableval=$enable_libphobos;
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libphobos" >&5
-$as_echo "$enable_libphobos" >&6; }
-
-# See if supported.
-unset LIBPHOBOS_SUPPORTED
-{ $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
-case ${host} in
- x86_64-*-solaris2.* | i?86-*-solaris2.*)
- # libphobos doesn't compile with the Solaris/x86 assembler due to a
- # relatively low linelength limit.
- as_prog=`$CC -print-prog-name=as`
- if test -n "$as_prog" && $as_prog -v /dev/null 2>&1 | grep GNU > /dev/null 2>&1; then
- druntime_cv_use_gas=yes;
- else
- druntime_cv_use_gas=no;
- fi
- rm -f a.out
- if test x$druntime_cv_use_gas = xno; then
- LIBPHOBOS_SUPPORTED=no
- fi
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBPHOBOS_SUPPORTED" >&5
-$as_echo "$LIBPHOBOS_SUPPORTED" >&6; }
-
-# Decide if it's usable.
-case $LIBPHOBOS_SUPPORTED:$enable_libphobos in
-*:no) use_libphobos=no ;;
-*:yes) use_libphobos=yes ;;
-yes:*) use_libphobos=yes ;;
-*:*) use_libphobos=no ;;
-esac
- if test x$use_libphobos = xyes; then
- ENABLE_LIBPHOBOS_TRUE=
- ENABLE_LIBPHOBOS_FALSE='#'
-else
- ENABLE_LIBPHOBOS_TRUE='#'
- ENABLE_LIBPHOBOS_FALSE=
-fi
-
-
# Determine what GCC version number to use in filesystem paths.
get_gcc_base_ver="cat"
fi
- # Check whether --enable-druntime-gc was given.
-if test "${enable_druntime_gc+set}" = set; then :
- enableval=$enable_druntime_gc; enable_druntime_gc=no
-else
- enable_druntime_gc=yes
-fi
-
-
- if test "$enable_druntime_gc" = "yes"; then
- DRUNTIME_GC_ENABLE_TRUE=
- DRUNTIME_GC_ENABLE_FALSE='#'
-else
- DRUNTIME_GC_ENABLE_TRUE='#'
- DRUNTIME_GC_ENABLE_FALSE=
-fi
-
-
-
druntime_target_cpu_parsed=""
case "$target_cpu" in
aarch64*)
;;
mips*) druntime_target_cpu_parsed="mips"
;;
- powerpc) druntime_target_cpu_parsed="powerpc"
+ powerpc*)
+ druntime_target_cpu_parsed="powerpc"
;;
- powerpc64)
- druntime_target_cpu_parsed="powerpc64"
- ;;
- i3456786|x86_64)
+ i[34567]86|x86_64)
druntime_target_cpu_parsed="x86"
;;
+ s390x)
+ druntime_target_cpu_parsed="s390x"
+ ;;
+ s390)
+ druntime_target_cpu_parsed="s390"
+ ;;
esac
if test "$druntime_target_cpu_parsed" = "aarch64"; then
DRUNTIME_CPU_AARCH64_TRUE=
DRUNTIME_CPU_POWERPC_FALSE=
fi
- if test "$druntime_target_cpu_parsed" = "powerpc64"; then
- DRUNTIME_CPU_POWERPC64_TRUE=
- DRUNTIME_CPU_POWERPC64_FALSE='#'
-else
- DRUNTIME_CPU_POWERPC64_TRUE='#'
- DRUNTIME_CPU_POWERPC64_FALSE=
-fi
-
if test "$druntime_target_cpu_parsed" = "x86"; then
DRUNTIME_CPU_X86_TRUE=
DRUNTIME_CPU_X86_FALSE='#'
DRUNTIME_CPU_X86_FALSE=
fi
+ if test "$druntime_target_cpu_parsed" = "s390x"; then
+ DRUNTIME_CPU_SYSTEMZ_TRUE=
+ DRUNTIME_CPU_SYSTEMZ_FALSE='#'
+else
+ DRUNTIME_CPU_SYSTEMZ_TRUE='#'
+ DRUNTIME_CPU_SYSTEMZ_FALSE=
+fi
+
+ if test "$druntime_target_cpu_parsed" = "s390"; then
+ DRUNTIME_CPU_S390_TRUE=
+ DRUNTIME_CPU_S390_FALSE='#'
+else
+ DRUNTIME_CPU_S390_TRUE='#'
+ DRUNTIME_CPU_S390_FALSE=
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target OS" >&5
- # Check whether --enable-unix was given.
-if test "${enable_unix+set}" = set; then :
- enableval=$enable_unix; :
-else
- enable_unix=auto
-fi
-
-
- case "$druntime_cv_target_os" in
- aix*|*bsd*|cygwin*|darwin*|gnu*|linux*|skyos*|*solaris*|sysv*) d_have_unix=1 ;;
- esac
- if test -n "$d_have_unix" && test "$enable_unix" = auto ; then
- enable_unix=yes
- fi
- if test "$enable_unix" = "yes"; then
- DRUNTIME_OS_UNIX_TRUE=
- DRUNTIME_OS_UNIX_FALSE='#'
-else
- DRUNTIME_OS_UNIX_TRUE='#'
- DRUNTIME_OS_UNIX_FALSE=
-fi
-
-
-
-
druntime_target_os_parsed=""
case "$druntime_cv_target_os" in
fi
+ druntime_target_posix="no"
+ case "$druntime_cv_target_os" in
+ aix*|*bsd*|cygwin*|darwin*|gnu*|linux*|skyos*|*solaris*|sysv*)
+ druntime_target_posix="yes"
+ ;;
+ esac
+ if test "$druntime_target_posix" = "yes"; then
+ DRUNTIME_OS_POSIX_TRUE=
+ DRUNTIME_OS_POSIX_FALSE='#'
+else
+ DRUNTIME_OS_POSIX_TRUE='#'
+ DRUNTIME_OS_POSIX_FALSE=
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread model used by GDC" >&5
# relocs. Work around by disabling TLS transitions. Not necessary
# on 32-bit x86, but cannot be distinguished reliably in specs.
druntime_ld_prog=`$CC -print-prog-name=ld`
+ druntime_ld_gld=no
+ druntime_ld_relax_transtls=no
if test -n "$druntime_ld_prog" \
&& $druntime_ld_prog -v 2>&1 | grep GNU > /dev/null 2>&1; then
- :
+ druntime_ld_gld=yes
else
+ echo 'int main (void) { return 0; }' > conftest.c
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,-z,relax=transtls"
+ if $CC $CFLAGS $LDFLAGS -o conftest conftest.c > /dev/null 2>&1; then
+ druntime_ld_relax_transtls=yes
+ fi
+ LDFLAGS="$save_LDFLAGS"
+ rm -f conftest.c conftest
+ fi
+ if test "$druntime_ld_relax_transtls" = "yes"; then
OS_LINK_SPEC='-z relax=transtls'
fi
;;
fi
-
- enable_thread_lib=yes
- # Check whether --enable-thread-lib was given.
-if test "${enable_thread_lib+set}" = set; then :
- enableval=$enable_thread_lib;
-fi
-
-
- if test "x$enable_thread_lib" = "xyes"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5
$as_echo_n "checking for library containing pthread_create... " >&6; }
if ${ac_cv_search_pthread_create+:} false; then :
$as_echo_n "(cached) " >&6
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-fi
-
-
-else
-
- if test "x$enable_thread_lib" = "xno"; then :
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread library" >&5
-$as_echo_n "checking for thread library... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
-$as_echo "disabled" >&6; }
-
-else
-
- as_ac_Lib=`$as_echo "ac_cv_lib_$enable_thread_lib''_pthread_create" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -l$enable_thread_lib" >&5
-$as_echo_n "checking for pthread_create in -l$enable_thread_lib... " >&6; }
-if eval \${$as_ac_Lib+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-l$enable_thread_lib $LIBS"
-cat > conftest.$ac_ext <<_ACEOF
-module mod;
- extern(C) int pthread_create();
-
-extern(C) int main() {
- pthread_create(); return 0;
-}
-_ACEOF
-if ac_fn_d_try_link "$LINENO"; then :
- eval "$as_ac_Lib=yes"
-else
- eval "$as_ac_Lib=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-eval ac_res=\$$as_ac_Lib
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_LIB$enable_thread_lib" | $as_tr_cpp` 1
-_ACEOF
-
- LIBS="-l$enable_thread_lib $LIBS"
-
-else
-
- as_fn_error $? "Thread library not found" "$LINENO" 5
-
-fi
-
-
-fi
-
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing cosf" >&5
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket libraries" >&5
-$as_echo_n "checking for socket libraries... " >&6; }
-if ${druntime_cv_lib_sockets+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- druntime_cv_lib_sockets=
- druntime_check_both=no
- ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
+ druntime_check_both=no
+ ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect"
if test "x$ac_cv_func_connect" = xyes; then :
- druntime_check_socket=no
-else
- druntime_check_socket=yes
-fi
- if test "$druntime_check_socket" = "yes"; then
- unset ac_cv_func_connect
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5
-$as_echo_n "checking for main in -lsocket... " >&6; }
-if ${ac_cv_lib_socket_main+:} false; then :
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
+$as_echo_n "checking for connect in -lsocket... " >&6; }
+if ${ac_cv_lib_socket_connect+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
int
main ()
{
-return main ();
+return connect ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_socket_main=yes
+ ac_cv_lib_socket_connect=yes
else
- ac_cv_lib_socket_main=no
+ ac_cv_lib_socket_connect=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5
-$as_echo "$ac_cv_lib_socket_main" >&6; }
-if test "x$ac_cv_lib_socket_main" = xyes; then :
- druntime_cv_lib_sockets="-lsocket"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
+$as_echo "$ac_cv_lib_socket_connect" >&6; }
+if test "x$ac_cv_lib_socket_connect" = xyes; then :
+ LIBS="$LIBS -lsocket"
else
druntime_check_both=yes
fi
- fi
- if test "$druntime_check_both" = "yes"; then
- druntime_old_libs=$LIBS
- LIBS="$LIBS -lsocket -lnsl"
- unset ac_cv_func_accept
- ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept"
+fi
+
+ if test "$druntime_check_both" = "yes"; then
+ druntime_old_libs=$LIBS
+ LIBS="$LIBS -lsocket -lnsl"
+ ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept"
if test "x$ac_cv_func_accept" = xyes; then :
- druntime_check_nsl=no
- druntime_cv_lib_sockets="-lsocket -lnsl"
+
+else
+ LIBS=$druntime_old_libs
fi
- unset ac_cv_func_accept
- LIBS=$druntime_old_libs
- fi
- unset ac_cv_func_gethostbyname
- druntime_old_libs="$LIBS"
- ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
+ fi
+ ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
if test "x$ac_cv_func_gethostbyname" = xyes; then :
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5
-$as_echo_n "checking for main in -lnsl... " >&6; }
-if ${ac_cv_lib_nsl_main+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
int
main ()
{
-return main ();
+return gethostbyname ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_nsl_main=yes
+ ac_cv_lib_nsl_gethostbyname=yes
else
- ac_cv_lib_nsl_main=no
+ ac_cv_lib_nsl_gethostbyname=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5
-$as_echo "$ac_cv_lib_nsl_main" >&6; }
-if test "x$ac_cv_lib_nsl_main" = xyes; then :
- druntime_cv_lib_sockets="$druntime_cv_lib_sockets -lnsl"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
+ LIBS="$LIBS -lnsl"
+fi
+
fi
+
+
+ # Keep this in sync with core/thread.d, set druntime_fiber_asm_external to
+ # "yes" for targets that have 'version = AsmExternal'.
+ druntime_fiber_asm_external=no
+ case "$target_cpu" in
+ aarch64* | \
+ arm* | \
+ i[34567]86|x86_64 | \
+ powerpc)
+ druntime_fiber_asm_external=yes
+ ;;
+ esac
+ if test "$druntime_fiber_asm_external" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing swapcontext" >&5
+$as_echo_n "checking for library containing swapcontext... " >&6; }
+if ${ac_cv_search_swapcontext+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char swapcontext ();
+int
+main ()
+{
+return swapcontext ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' c ucontext; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_swapcontext=$ac_res
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if ${ac_cv_search_swapcontext+:} false; then :
+ break
+fi
+done
+if ${ac_cv_search_swapcontext+:} false; then :
+else
+ ac_cv_search_swapcontext=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_swapcontext" >&5
+$as_echo "$ac_cv_search_swapcontext" >&6; }
+ac_res=$ac_cv_search_swapcontext
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+else
+ as_fn_error $? "swapcontext required but not found" "$LINENO" 5
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $druntime_cv_lib_sockets" >&5
-$as_echo "$druntime_cv_lib_sockets" >&6; }
- LIBS="$LIBS $druntime_cv_lib_sockets"
+
+ fi
ac_ext=c
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $version_specific_libs" >&5
$as_echo "$version_specific_libs" >&6; }
+
+# Check whether --with-toolexeclibdir was given.
+if test "${with_toolexeclibdir+set}" = set; then :
+ withval=$with_toolexeclibdir; case ${with_toolexeclibdir} in
+ /)
+ ;;
+ */)
+ with_toolexeclibdir=`echo $with_toolexeclibdir | sed 's,/$,,'`
+ ;;
+esac
+else
+ with_toolexeclibdir=no
+fi
+
+
+
# Version-specific runtime libs processing.
if test $version_specific_libs = yes; then
libphobos_toolexecdir='${libdir}/gcc/${host_alias}'
# Install a library built with a cross compiler in tooldir, not libdir.
if test -n "$with_cross_host" && test x"$with_cross_host" != x"no"; then
libphobos_toolexecdir='${exec_prefix}/${host_alias}'
- libphobos_toolexeclibdir='${toolexecdir}/lib'
+ case ${with_toolexeclibdir} in
+ no)
+ libphobos_toolexeclibdir='${toolexecdir}/lib'
+ ;;
+ *)
+ libphobos_toolexeclibdir=${with_toolexeclibdir}
+ ;;
+ esac
else
libphobos_toolexecdir='${libdir}/gcc/${host_alias}'
libphobos_toolexeclibdir='${libdir}'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-libphobos" >&5
+$as_echo_n "checking for --enable-libphobos... " >&6; }
+# Check whether --enable-libphobos was given.
+if test "${enable_libphobos+set}" = set; then :
+ enableval=$enable_libphobos;
+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-libphobos-druntime-only was given.
+if test "${with_libphobos_druntime_only+set}" = set; then :
+ withval=$with_libphobos_druntime_only;
+else
+ with_libphobos_druntime_only=auto
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libphobos_druntime_only" >&5
+$as_echo "$with_libphobos_druntime_only" >&6; }
+
+case "$with_libphobos_druntime_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
+case ${host} in
+ x86_64-*-solaris2.* | i?86-*-solaris2.*)
+ # libphobos doesn't compile with the Solaris/x86 assembler due to a
+ # relatively low linelength limit.
+ as_prog=`$CC -print-prog-name=as`
+ if test -n "$as_prog" && $as_prog -v /dev/null 2>&1 | grep GNU > /dev/null 2>&1; then
+ druntime_cv_use_gas=yes;
+ else
+ druntime_cv_use_gas=no;
+ fi
+ rm -f a.out
+ if test x$druntime_cv_use_gas = xno; then
+ LIBPHOBOS_SUPPORTED=no
+ fi
+ # 64-bit D execution fails with Solaris ld without -z relax=transtls support.
+ if test "$druntime_ld_gld" = "no" && test "$druntime_ld_relax_transtls" = "no"; then
+ LIBPHOBOS_SUPPORTED=no
+ fi
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBPHOBOS_SUPPORTED" >&5
+$as_echo "$LIBPHOBOS_SUPPORTED" >&6; }
+
+# Decide if it's usable.
+case $LIBPHOBOS_SUPPORTED:$enable_libphobos in
+*:no) use_libphobos=no ;;
+*:yes) use_libphobos=yes ;;
+yes:*) use_libphobos=yes ;;
+*:*) use_libphobos=no ;;
+esac
+ if test x$use_libphobos = xyes; then
+ ENABLE_LIBPHOBOS_TRUE=
+ ENABLE_LIBPHOBOS_FALSE='#'
+else
+ ENABLE_LIBPHOBOS_TRUE='#'
+ ENABLE_LIBPHOBOS_FALSE=
+fi
+
+
+# Decide if only libdruntime should be built.
+case $LIBDRUNTIME_ONLY:$with_libphobos_druntime_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 :
+ enableval=$enable_libphobos_checking; ac_checking_flags="${enableval}"
+else
+ ac_checking_flags=release
+fi
+
+IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
+for check in release $ac_checking_flags
+do
+ case $check in
+ # These set all the flags to specific states
+ yes|all) RELEASE_FLAG="-fno-release" ; ASSERT_FLAG= ;;
+ no|none|release) RELEASE_FLAG="-frelease" ; ASSERT_FLAG= ;;
+ # These enable particular checks
+ assert) ASSERT_FLAG="-fassert" ;;
+ # Accept
+ *) ;;
+ esac
+done
+IFS="$ac_save_IFS"
+CHECKING_DFLAGS="$RELEASE_FLAG $ASSERT_FLAG"
+
+
# Add drtbegin.o/drtend.o to startfile/endfile specs in libgphobos.spec
if test "$DCFG_MINFO_BRACKETING" = "false"; then
DRTSTUFF_SPEC=$srcdir/src/drtstuff.spec
# Libdruntime / phobos soname version
-libtool_VERSION=76:3:0
+libtool_VERSION=1:0:0
# Set default flags (after DRUNTIME_WERROR!)
if test -z "$GDCFLAGS"; then
- GDCFLAGS="-Wall $WERROR_FLAG -g -frelease -O2"
+ GDCFLAGS="-g -O2"
fi
-if test -z "$GDCFLAGSX"; then
- GDCFLAGSX="-Wall $WERROR_FLAG -g -fno-release -funittest"
-fi
+WARN_DFLAGS="-Wall $WERROR_FLAG"
# Sanity check for the cross-compilation case:
as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${ENABLE_LIBPHOBOS_TRUE}" && test -z "${ENABLE_LIBPHOBOS_FALSE}"; then
- as_fn_error $? "conditional \"ENABLE_LIBPHOBOS\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${DRUNTIME_GC_ENABLE_TRUE}" && test -z "${DRUNTIME_GC_ENABLE_FALSE}"; then
- as_fn_error $? "conditional \"DRUNTIME_GC_ENABLE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${DRUNTIME_CPU_AARCH64_TRUE}" && test -z "${DRUNTIME_CPU_AARCH64_FALSE}"; then
as_fn_error $? "conditional \"DRUNTIME_CPU_AARCH64\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
as_fn_error $? "conditional \"DRUNTIME_CPU_POWERPC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${DRUNTIME_CPU_POWERPC64_TRUE}" && test -z "${DRUNTIME_CPU_POWERPC64_FALSE}"; then
- as_fn_error $? "conditional \"DRUNTIME_CPU_POWERPC64\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${DRUNTIME_CPU_X86_TRUE}" && test -z "${DRUNTIME_CPU_X86_FALSE}"; then
as_fn_error $? "conditional \"DRUNTIME_CPU_X86\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${DRUNTIME_OS_UNIX_TRUE}" && test -z "${DRUNTIME_OS_UNIX_FALSE}"; then
- as_fn_error $? "conditional \"DRUNTIME_OS_UNIX\" was never defined.
+if test -z "${DRUNTIME_CPU_SYSTEMZ_TRUE}" && test -z "${DRUNTIME_CPU_SYSTEMZ_FALSE}"; then
+ as_fn_error $? "conditional \"DRUNTIME_CPU_SYSTEMZ\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DRUNTIME_CPU_S390_TRUE}" && test -z "${DRUNTIME_CPU_S390_FALSE}"; then
+ as_fn_error $? "conditional \"DRUNTIME_CPU_S390\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${DRUNTIME_OS_AIX_TRUE}" && test -z "${DRUNTIME_OS_AIX_FALSE}"; then
as_fn_error $? "conditional \"DRUNTIME_OS_SOLARIS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${DRUNTIME_OS_POSIX_TRUE}" && test -z "${DRUNTIME_OS_POSIX_FALSE}"; then
+ as_fn_error $? "conditional \"DRUNTIME_OS_POSIX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${DRUNTIME_OS_ARM_EABI_UNWINDER_TRUE}" && test -z "${DRUNTIME_OS_ARM_EABI_UNWINDER_FALSE}"; then
as_fn_error $? "conditional \"DRUNTIME_OS_ARM_EABI_UNWINDER\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
as_fn_error $? "conditional \"DRUNTIME_OS_MINFO_BRACKETING\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${ENABLE_LIBPHOBOS_TRUE}" && test -z "${ENABLE_LIBPHOBOS_FALSE}"; then
+ 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