summaryrefslogtreecommitdiff
path: root/libphobos/configure
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2019-04-24 22:46:59 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2019-04-24 22:46:59 +0000
commit2493e718159bdee3a589234196ce177d37b1e649 (patch)
tree1fcbbacd1e37224ecd98458ffb0021f4a4efbf5d /libphobos/configure
parent7c3e085e4405ef4148edf4ea5bedd7930df23c58 (diff)
downloadgcc-2493e718159bdee3a589234196ce177d37b1e649.tar.gz
libphobos: Fix linker warning and SEGV in core.thread tests.
The monolithic core/threadasm.S source has been removed, and split into multiple parts, one for each intended target CPU/OS. Added .type and .size directives for all asm implementations of fiber_switchContent and callWithStackShell where they were missing. libphobos/ChangeLog: 2019-04-25 Iain Buclaw <ibuclaw@gdcproject.org> PR d/90086 * m4/druntime/cpu.m4 (DRUNTIME_CPU_SOURCES): New macro. * configure.ac: Use it. * configure: Regenerate. * libdruntime/Makefile.am: Add new config sources to DRUNTIME_SOURCES_CONFIGURED. * libdruntime/Makefile.in: Regenerate. * libdruntime/config/aarch64/switchcontext.S: New file. * libdruntime/config/arm/switchcontext.S: New file. * libdruntime/config/common/threadasm.S: New file. * libdruntime/config/mingw/switchcontext.S: New file. * libdruntime/config/mips/switchcontext.S: New file. * libdruntime/config/powerpc/switchcontext.S: New file. * libdruntime/config/powerpc64/callwithstack.S: New file. * libdruntime/config/x86/switchcontext.S: New file. * libdruntime/core/threadasm.S: Remove. From-SVN: r270560
Diffstat (limited to 'libphobos/configure')
-rwxr-xr-xlibphobos/configure108
1 files changed, 106 insertions, 2 deletions
diff --git a/libphobos/configure b/libphobos/configure
index 7c019899c5c..67fe34d7184 100755
--- a/libphobos/configure
+++ b/libphobos/configure
@@ -681,6 +681,18 @@ DRUNTIME_OS_AIX_FALSE
DRUNTIME_OS_AIX_TRUE
DRUNTIME_OS_UNIX_FALSE
DRUNTIME_OS_UNIX_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_MIPS_TRUE
+DRUNTIME_CPU_ARM_FALSE
+DRUNTIME_CPU_ARM_TRUE
+DRUNTIME_CPU_AARCH64_FALSE
+DRUNTIME_CPU_AARCH64_TRUE
DRUNTIME_GC_ENABLE_FALSE
DRUNTIME_GC_ENABLE_TRUE
libphobos_srcdir
@@ -11623,7 +11635,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11626 "configure"
+#line 11638 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11729,7 +11741,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11732 "configure"
+#line 11744 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14024,6 +14036,74 @@ fi
+ druntime_target_cpu_parsed=""
+ case "$target_cpu" in
+ aarch64*)
+ druntime_target_cpu_parsed="aarch64"
+ ;;
+ arm*) druntime_target_cpu_parsed="arm"
+ ;;
+ mips*) druntime_target_cpu_parsed="mips"
+ ;;
+ powerpc) druntime_target_cpu_parsed="powerpc"
+ ;;
+ powerpc64)
+ druntime_target_cpu_parsed="powerpc64"
+ ;;
+ i3456786|x86_64)
+ druntime_target_cpu_parsed="x86"
+ ;;
+ esac
+ if test "$druntime_target_cpu_parsed" = "aarch64"; then
+ DRUNTIME_CPU_AARCH64_TRUE=
+ DRUNTIME_CPU_AARCH64_FALSE='#'
+else
+ DRUNTIME_CPU_AARCH64_TRUE='#'
+ DRUNTIME_CPU_AARCH64_FALSE=
+fi
+
+ if test "$druntime_target_cpu_parsed" = "arm"; then
+ DRUNTIME_CPU_ARM_TRUE=
+ DRUNTIME_CPU_ARM_FALSE='#'
+else
+ DRUNTIME_CPU_ARM_TRUE='#'
+ DRUNTIME_CPU_ARM_FALSE=
+fi
+
+ if test "$druntime_target_cpu_parsed" = "mips"; then
+ DRUNTIME_CPU_MIPS_TRUE=
+ DRUNTIME_CPU_MIPS_FALSE='#'
+else
+ DRUNTIME_CPU_MIPS_TRUE='#'
+ DRUNTIME_CPU_MIPS_FALSE=
+fi
+
+ if test "$druntime_target_cpu_parsed" = "powerpc"; then
+ DRUNTIME_CPU_POWERPC_TRUE=
+ DRUNTIME_CPU_POWERPC_FALSE='#'
+else
+ DRUNTIME_CPU_POWERPC_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='#'
+else
+ DRUNTIME_CPU_X86_TRUE='#'
+ DRUNTIME_CPU_X86_FALSE=
+fi
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for target OS" >&5
$as_echo_n "checking for target OS... " >&6; }
if ${druntime_cv_target_os+:} false; then :
@@ -15413,6 +15493,30 @@ if test -z "${DRUNTIME_GC_ENABLE_TRUE}" && test -z "${DRUNTIME_GC_ENABLE_FALSE}"
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
+fi
+if test -z "${DRUNTIME_CPU_ARM_TRUE}" && test -z "${DRUNTIME_CPU_ARM_FALSE}"; then
+ as_fn_error $? "conditional \"DRUNTIME_CPU_ARM\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DRUNTIME_CPU_MIPS_TRUE}" && test -z "${DRUNTIME_CPU_MIPS_FALSE}"; then
+ as_fn_error $? "conditional \"DRUNTIME_CPU_MIPS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${DRUNTIME_CPU_POWERPC_TRUE}" && test -z "${DRUNTIME_CPU_POWERPC_FALSE}"; then
+ 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.
Usually this means the macro was only invoked conditionally." "$LINENO" 5