Commit 8b53086a by Iain Buclaw

libphobos: Fix multilib powerpc64 builds

Multilibs should not have been split up as two logically different CPU,
so at configure time, powerpc64 was being detected, but none of the
32-bit support files were being compiled in.

libphobos/ChangeLog:

	PR d/94825
	* configure: Regenerate.
	* libdruntime/Makefile.am (DRUNTIME_SOURCES_CONFIGURED): Add both
	switchcontext.S and callwithstack.S if DRUNTIME_CPU_POWERPC.
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/config/powerpc/switchcontext.S: Add !__PPC64__ guards.
	* libdruntime/config/powerpc64/callwithstack.S: Add __PPC64__ guards.
	* m4/druntime/cpu.m4 (DRUNTIME_CPU_SOURCES): Define DRUNTIME_CPU_POWER
	for all powerpc biarchs.  Remove DRUNTIME_CPU_POWER64 conditional.
parent bce54ed4
2020-04-28 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/94825
* configure: Regenerate.
* libdruntime/Makefile.am (DRUNTIME_SOURCES_CONFIGURED): Add both
switchcontext.S and callwithstack.S if DRUNTIME_CPU_POWERPC.
* libdruntime/Makefile.in: Regenerate.
* libdruntime/config/powerpc/switchcontext.S: Add !__PPC64__ guards.
* libdruntime/config/powerpc64/callwithstack.S: Add __PPC64__ guards.
* m4/druntime/cpu.m4 (DRUNTIME_CPU_SOURCES): Define DRUNTIME_CPU_POWER
for all powerpc biarchs. Remove DRUNTIME_CPU_POWER64 conditional.
2020-04-27 Iain Buclaw <ibuclaw@gdcproject.org>
* libdruntime/Makefile.am (DRUNTIME_DSOURCES_LINUX): Remove
......
......@@ -692,8 +692,6 @@ 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
......@@ -11649,7 +11647,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11652 "configure"
#line 11650 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
......@@ -11755,7 +11753,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11758 "configure"
#line 11756 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
......@@ -13991,12 +13989,9 @@ fi
;;
mips*) druntime_target_cpu_parsed="mips"
;;
powerpc|powerpcle)
powerpc*)
druntime_target_cpu_parsed="powerpc"
;;
powerpc64|powerpc64le)
druntime_target_cpu_parsed="powerpc64"
;;
i[34567]86|x86_64)
druntime_target_cpu_parsed="x86"
;;
......@@ -14039,14 +14034,6 @@ else
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='#'
......@@ -15605,10 +15592,6 @@ if test -z "${DRUNTIME_CPU_POWERPC_TRUE}" && test -z "${DRUNTIME_CPU_POWERPC_FAL
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
......
......@@ -81,10 +81,8 @@ if DRUNTIME_CPU_MIPS
DRUNTIME_SOURCES_CONFIGURED += config/mips/switchcontext.S
endif
if DRUNTIME_CPU_POWERPC
DRUNTIME_SOURCES_CONFIGURED += config/powerpc/switchcontext.S
endif
if DRUNTIME_CPU_POWERPC64
DRUNTIME_SOURCES_CONFIGURED += config/powerpc64/callwithstack.S
DRUNTIME_SOURCES_CONFIGURED += config/powerpc/callwithstack.S \
config/powerpc/switchcontext.S
endif
if DRUNTIME_CPU_X86
if DRUNTIME_OS_MINGW
......
......@@ -24,6 +24,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "../common/threadasm.S"
#if defined(__PPC64__)
#if defined(_CALL_ELF) && _CALL_ELF == 2
#define USE_ABI_2
#define LINKAGE_SZ 32
......@@ -166,3 +168,5 @@ _D4core6thread18callWithStackShellFNbMDFNbPvZvZv:
.Lend:
.size _D4core6thread18callWithStackShellFNbMDFNbPvZvZv, .Lend-.L._D4core6thread18callWithStackShellFNbMDFNbPvZvZv
.cfi_endproc
#endif /* defined(__PPC64__) */
......@@ -24,6 +24,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "../common/threadasm.S"
#if !defined(__PPC64__)
/**
* Performs a context switch.
*
......@@ -148,3 +150,5 @@ CSYM(_fiber_switchContext):
blr
.cfi_endproc
.size CSYM(_fiber_switchContext),.-CSYM(_fiber_switchContext)
#endif /* !defined(__PPC64__) */
......@@ -17,12 +17,9 @@ AC_DEFUN([DRUNTIME_CPU_SOURCES],
;;
mips*) druntime_target_cpu_parsed="mips"
;;
powerpc|powerpcle)
powerpc*)
druntime_target_cpu_parsed="powerpc"
;;
powerpc64|powerpc64le)
druntime_target_cpu_parsed="powerpc64"
;;
i[[34567]]86|x86_64)
druntime_target_cpu_parsed="x86"
;;
......@@ -41,8 +38,6 @@ AC_DEFUN([DRUNTIME_CPU_SOURCES],
[test "$druntime_target_cpu_parsed" = "mips"])
AM_CONDITIONAL([DRUNTIME_CPU_POWERPC],
[test "$druntime_target_cpu_parsed" = "powerpc"])
AM_CONDITIONAL([DRUNTIME_CPU_POWERPC64],
[test "$druntime_target_cpu_parsed" = "powerpc64"])
AM_CONDITIONAL([DRUNTIME_CPU_X86],
[test "$druntime_target_cpu_parsed" = "x86"])
AM_CONDITIONAL([DRUNTIME_CPU_SYSTEMZ],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment