From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7664 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: ppc soft-float regression Date: Sun, 17 May 2015 19:20:25 +0200 Message-ID: <20150517172023.GC11258@port70.net> References: <20150517080321.GL16123@waldemar-brodkorb.de> <20150517163521.GO17573@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="T4sUOijqQbZv57TR" X-Trace: ger.gmane.org 1431883240 23685 80.91.229.3 (17 May 2015 17:20:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 17 May 2015 17:20:40 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7676-gllmg-musl=m.gmane.org@lists.openwall.com Sun May 17 19:20:40 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Yu2Ew-0002yS-Ry for gllmg-musl@m.gmane.org; Sun, 17 May 2015 19:20:38 +0200 Original-Received: (qmail 6053 invoked by uid 550); 17 May 2015 17:20:37 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 6032 invoked from network); 17 May 2015 17:20:37 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20150517163521.GO17573@brightrain.aerifal.cx> User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:7664 Archived-At: --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Rich Felker [2015-05-17 12:35:21 -0400]: > On Sun, May 17, 2015 at 10:03:21AM +0200, Waldemar Brodkorb wrote: > > Hi, > > > > as mentioned the days on IRC. > > 1.1.9 produces a lot of segfaults on Qemu-PPC with Soft-Float. > > 1.1.8 was fine. > > Soft-float has never been a supported configuration for PowerPC, as > you can see from the fact that there's no separate dynamic linker name > for it. I'm surprised it ever seemed to work -- surely setjmp/longjmp > would be broken since they save/restore FPU registers. I don't think > it would be hard to add though, and I'd welcome patches for it. What's > needed is basically: > > - detection in configure, setting $SUBARCH there > - dynamic linker name variants in arch/powerpc/reloc.h > - separate subarch dir for soft-float in src/setjmp > > If you add soft-float it would probably make sense to add > little-endian variant at the same time, if that's useful to anyone, > since once you do the subarch work there's hardly any more work to > make an endian variant too. > note that the current musl-cross powerpc patches don't do the include reordering so the gcc includes will be the first in the path. this is fixed in http://gcc.gnu.org/ml/gcc-patches/2015-04/msg01640.html if there is a ppc soft-float abi musl may support then please invent an abi name for it so i can update the gcc patch before it gets committed. (i think powerpc{el}{-sf} and powerpc64{el}{-sf} should work: it is consistent with the naming for mips). attached the musl dynamic linker name patch for "el" support, similar would be needed for -sf (+setjmp.s etc updates). --T4sUOijqQbZv57TR Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="powerpcel.diff" diff --git a/arch/powerpc/reloc.h b/arch/powerpc/reloc.h index aa5f8c9..4292cea 100644 --- a/arch/powerpc/reloc.h +++ b/arch/powerpc/reloc.h @@ -1,4 +1,12 @@ -#define LDSO_ARCH "powerpc" +#include + +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define ENDIAN_SUFFIX "el" +#else +#define ENDIAN_SUFFIX "" +#endif + +#define LDSO_ARCH "powerpc" ENDIAN_SUFFIX #define TPOFF_K (-0x7000) diff --git a/configure b/configure index 143dc92..4e1a1fe 100755 --- a/configure +++ b/configure @@ -491,6 +491,9 @@ fi test "$ARCH" = "microblaze" && trycppif __MICROBLAZEEL__ "$t" \ && SUBARCH=${SUBARCH}el +test "$ARCH" = "powerpc" && trycppif __LITTLE_ENDIAN__ "$t" \ +&& SUBARCH=${SUBARCH}el + if test "$ARCH" = "sh" ; then trycppif __BIG_ENDIAN__ "$t" && SUBARCH=${SUBARCH}eb if trycppif "__SH_FPU_ANY__ || __SH4__" "$t" ; then --T4sUOijqQbZv57TR--