On 28/04/2020 20:25, Segher Boessenkool wrote: > Hi! > > On Tue, Apr 28, 2020 at 07:58:37PM +0200, Iain Buclaw wrote: >> This patch should fix builds on PPC with multilib enabled. >> >> 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. >> >> Segher, is this OK? > > If it fixes the bootstrap breakage, that is good :-) > >> * configure: Regenerated. > > "Regenerate." (Not passive). > >> diff --git a/libphobos/libdruntime/config/powerpc/switchcontext.S >> b/libphobos/libdruntime/config/powerpc/switchcontext.S >> index 5470f9c4ca3..82ee542064b 100644 >> --- a/libphobos/libdruntime/config/powerpc/switchcontext.S >> +++ b/libphobos/libdruntime/config/powerpc/switchcontext.S >> @@ -24,6 +24,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. >> If not, see >> >> #include "../common/threadasm.S" >> >> +#if defined( __ppc__ ) || defined( __PPC__ ) || defined( __powerpc__ ) > > What is this for? Everything in libphobos/libdruntime/config/powerpc/ > is for PowerPC anyway? Or is this meant to select "not 64 bit"? That > is not what these macros mean. >
I had pulled it from the previous file when everything used to be squashed into one mega source file. On a closer look, the order matters here: #if defined(__PPC64__) #elif defined( __ppc__ ) || defined( __PPC__ ) || defined( __powerpc__ ) #endif I couldn't say where __ppc__ came from I'm afraid, but I'll remove it. Having now looked at how S390/S390x handled multilib, I'll do this in a slightly different way then. Iain.