Message ID | 20200426093521.22531-1-ibuclaw@gdcproject.org |
---|---|
State | New |
Headers | show |
Series | [committed] libphobos: Add power*-*-linux* as a supported target | expand |
Hi! On Sun, Apr 26, 2020 at 11:35:21AM +0200, Iain Buclaw wrote: > This patch adds power*-*-linux* as a supported target for libphobos. Many thanks for doing this! A problem though: libphobos/libdruntime is built for -m32 as well, but that builds libphobos/libdruntime/config/powerpc64/callwithstack.S, which cannot work (that file has all kinds of 64-bit only constructs and instructions in it). > diff --git a/libphobos/configure b/libphobos/configure > index c2b49132fda..c923417532f 100755 > --- a/libphobos/configure > +++ b/libphobos/configure > @@ -13991,9 +13991,10 @@ fi > ;; > mips*) druntime_target_cpu_parsed="mips" > ;; > - powerpc) druntime_target_cpu_parsed="powerpc" > + powerpc|powerpcle) > + druntime_target_cpu_parsed="powerpc" > ;; > - powerpc64) > + powerpc64|powerpc64le) > druntime_target_cpu_parsed="powerpc64" > ;; > i[34567]86|x86_64) We are a biarch target, so both powerpc-* and powerpc64-* configurations can do both those configs (potentially, and the default for many configs). Segher
On 28/04/2020 19:12, Segher Boessenkool wrote: > Hi! > > On Sun, Apr 26, 2020 at 11:35:21AM +0200, Iain Buclaw wrote: >> This patch adds power*-*-linux* as a supported target for libphobos. > > Many thanks for doing this! > > A problem though: libphobos/libdruntime is built for -m32 as well, but > that builds libphobos/libdruntime/config/powerpc64/callwithstack.S, > which cannot work (that file has all kinds of 64-bit only constructs and > instructions in it). > Yes, sadly I could not get --enable-multilib/multiarch to work properly locally, so this one unfornately slipped though. >> diff --git a/libphobos/configure b/libphobos/configure >> index c2b49132fda..c923417532f 100755 >> --- a/libphobos/configure >> +++ b/libphobos/configure >> @@ -13991,9 +13991,10 @@ fi >> ;; >> mips*) druntime_target_cpu_parsed="mips" >> ;; >> - powerpc) druntime_target_cpu_parsed="powerpc" >> + powerpc|powerpcle) >> + druntime_target_cpu_parsed="powerpc" >> ;; >> - powerpc64) >> + powerpc64|powerpc64le) >> druntime_target_cpu_parsed="powerpc64" >> ;; >> i[34567]86|x86_64) > > We are a biarch target, so both powerpc-* and powerpc64-* configurations > can do both those configs (potentially, and the default for many configs). > Fixed on master 2110-g8b53086ab6a Iain.
diff --git a/libphobos/configure b/libphobos/configure index c2b49132fda..c923417532f 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -13991,9 +13991,10 @@ fi ;; mips*) druntime_target_cpu_parsed="mips" ;; - powerpc) druntime_target_cpu_parsed="powerpc" + powerpc|powerpcle) + druntime_target_cpu_parsed="powerpc" ;; - powerpc64) + powerpc64|powerpc64le) druntime_target_cpu_parsed="powerpc64" ;; i[34567]86|x86_64) diff --git a/libphobos/configure.tgt b/libphobos/configure.tgt index 66082e36fad..ce4cc1f7527 100644 --- a/libphobos/configure.tgt +++ b/libphobos/configure.tgt @@ -33,6 +33,10 @@ case "${target}" in mips*-*-linux*) LIBPHOBOS_SUPPORTED=yes ;; + power*-*-linux*) + LIBPHOBOS_SUPPORTED=yes + LIBDRUNTIME_ONLY=yes + ;; riscv*-*-linux*) LIBPHOBOS_SUPPORTED=yes ;; diff --git a/libphobos/m4/druntime/cpu.m4 b/libphobos/m4/druntime/cpu.m4 index 4887248fd09..6e88896ca66 100644 --- a/libphobos/m4/druntime/cpu.m4 +++ b/libphobos/m4/druntime/cpu.m4 @@ -17,9 +17,10 @@ AC_DEFUN([DRUNTIME_CPU_SOURCES], ;; mips*) druntime_target_cpu_parsed="mips" ;; - powerpc) druntime_target_cpu_parsed="powerpc" + powerpc|powerpcle) + druntime_target_cpu_parsed="powerpc" ;; - powerpc64) + powerpc64|powerpc64le) druntime_target_cpu_parsed="powerpc64" ;; i[[34567]]86|x86_64)