From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: ppc soft-float regression
Date: Sun, 17 May 2015 19:20:25 +0200 [thread overview]
Message-ID: <20150517172023.GC11258@port70.net> (raw)
In-Reply-To: <20150517163521.GO17573@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 1629 bytes --]
* Rich Felker <dalias@libc.org> [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).
[-- Attachment #2: powerpcel.diff --]
[-- Type: text/x-diff, Size: 833 bytes --]
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 <endian.h>
+
+#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
prev parent reply other threads:[~2015-05-17 17:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-17 8:03 Waldemar Brodkorb
2015-05-17 10:02 ` Felix Janda
2015-05-17 16:37 ` Rich Felker
2015-05-17 17:50 ` Felix Janda
2015-05-17 18:15 ` Felix Janda
2015-05-17 19:56 ` Felix Janda
2015-05-18 18:39 ` Felix Janda
2015-05-18 20:10 ` Rich Felker
2015-05-18 20:14 ` Rich Felker
2015-05-18 22:07 ` Felix Janda
2015-05-22 6:23 ` Rich Felker
2015-05-24 3:08 ` Rich Felker
2015-05-25 0:36 ` Rich Felker
2015-05-25 6:31 ` Jens Gustedt
2015-05-25 6:57 ` Rich Felker
2015-05-25 7:44 ` Jens Gustedt
2015-05-25 13:26 ` Szabolcs Nagy
2015-05-25 13:40 ` Alexander Monakov
2015-05-25 14:35 ` Szabolcs Nagy
2015-05-25 14:45 ` Alexander Monakov
2015-05-25 21:45 ` Rich Felker
2015-05-25 22:46 ` Rich Felker
2015-05-25 23:51 ` Rich Felker
2015-05-17 13:06 ` Felix Janda
2015-05-17 16:35 ` Rich Felker
2015-05-17 17:20 ` Szabolcs Nagy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150517172023.GC11258@port70.net \
--to=nsz@port70.net \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).