[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#632863: eglibc: add support for arch powerpcspe



Source: eglibc
Version: 2.13-10
Severity: minor
Tags: sid, patch

The attached patch makes eglibc 2.13 work on architecture powerpcspe (an
unofficial port hosted on www.debian-ports.org, [1]).

It adds two patches in debian/patches/powerpcspe that fix some
floating-point related issues (powerpcspe uses a different FPU than
powerpc).  There should not be any effects on non-powerpcspe builds.

cheers,

David

[1] http://wiki.debian.org/PowerPCSPEPort
-- 
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40

diff -u eglibc-2.13/debian/changelog eglibc-2.13/debian/changelog
--- eglibc-2.13/debian/changelog
+++ eglibc-2.13/debian/changelog
@@ -1,3 +1,12 @@
+eglibc (2.13-10+powerpcspe1) unstable; urgency=low
+
+  * forward-port powerpcspe-specific changes form 2.11.1-2+powerpcspe1
+  * dropped 0002-replace-eieio-with-mbar-on-__SPE__.patch since that
+    should nowadays be handled by GNU 'as'
+  * added local-no-fma.patch to fix new compile problem on powerpcspe
+
+ -- David Kuehling <dvdkhlng@gmx.de>  Wed, 06 Jul 2011 16:36:54 +0200
+
 eglibc (2.13-10) unstable; urgency=low
 
   * control.in/main: tag libc-bin Essential: yes.
diff -u eglibc-2.13/debian/patches/series eglibc-2.13/debian/patches/series
--- eglibc-2.13/debian/patches/series
+++ eglibc-2.13/debian/patches/series
@@ -171,6 +171,9 @@
 
 powerpc/local-libgcc_eh-ld.so.diff
 
+powerpcspe/submitted-Powerpc-trampline-consider-__NO_FPRS__.patch
+powerpcspe/submitted-no-fma.patch
+
 s390/submitted-nexttowardf.diff
 s390/cvs-iconv-z9-109.diff
 
only in patch2:
unchanged:
--- eglibc-2.13.orig/debian/patches/powerpcspe/submitted-Powerpc-trampline-consider-__NO_FPRS__.patch
+++ eglibc-2.13/debian/patches/powerpcspe/submitted-Powerpc-trampline-consider-__NO_FPRS__.patch
@@ -0,0 +1,48 @@
+From 5f2110f9ce203c42aadc3968ddc487a8c9cc6c83 Mon Sep 17 00:00:00 2001
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Sat, 15 May 2010 21:51:49 +0200
+Subject: [PATCH] Powerpc/trampline: consider __NO_FPRS__
+
+don't save/restore FPRs on FPR less systems
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ sysdeps/powerpc/powerpc32/dl-trampoline.S |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+Index: eglibc-2.13/sysdeps/powerpc/powerpc32/dl-trampoline.S
+===================================================================
+--- eglibc-2.13.orig/sysdeps/powerpc/powerpc32/dl-trampoline.S	2006-08-17 03:18:26.000000000 +0200
++++ eglibc-2.13/sysdeps/powerpc/powerpc32/dl-trampoline.S	2011-07-06 16:46:14.000000000 +0200
+@@ -137,6 +137,7 @@
+ 	stw r9,40(r1)
+ 	stw r10,44(r1)
+ 	stw r0,8(r1)
++#ifndef __NO_FPRS__
+  # Save the floating point registers
+ 	stfd fp1,48(r1)
+ 	stfd fp2,56(r1)
+@@ -146,6 +147,7 @@
+ 	stfd fp6,88(r1)
+ 	stfd fp7,96(r1)
+ 	stfd fp8,104(r1)
++#endif
+  # XXX TODO: store vmx registers
+  # Load the extra parameters.
+ 	addi r6,r1,16
+@@ -169,6 +171,7 @@
+ 	lwz r4,20(r1)
+ 	lwz r3,16(r1)
+         lwz r0,12(r1)
++#ifndef __NO_FPRS__
+  # Load the floating point registers.
+ 	lfd fp1,48(r1)
+ 	lfd fp2,56(r1)
+@@ -178,6 +181,7 @@
+ 	lfd fp6,88(r1)
+ 	lfd fp7,96(r1)
+ 	lfd fp8,104(r1)
++#endif
+  # ...unwind the stack frame, and jump to the PLT entry we updated.
+ 	addi r1,r1,320
+ 	bctr
only in patch2:
unchanged:
--- eglibc-2.13.orig/debian/patches/powerpcspe/submitted-no-fma.patch
+++ eglibc-2.13/debian/patches/powerpcspe/submitted-no-fma.patch
@@ -0,0 +1,16 @@
+Override s_fma[f] assembly routines with C-code when compiling for powerpcspe.
+
+Signed-off-by: David Kuehling <dvdkhlng AT gmx DOT de>
+
+Index: eglibc-2.13/ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fma.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ eglibc-2.13/ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fma.c	2011-07-06 16:47:39.000000000 +0200
+@@ -0,0 +1 @@
++#include <math/s_fma.c>
+Index: eglibc-2.13/ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fmaf.c
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ eglibc-2.13/ports/sysdeps/powerpc/powerpc32/e500/fpu/s_fmaf.c	2011-07-06 16:47:39.000000000 +0200
+@@ -0,0 +1 @@
++#include <math/s_fmaf.c>

Attachment: pgpqOWsyUVQYf.pgp
Description: PGP signature


Reply to: