Package: dietlibc Version: 0.33~cvs20120325-4 Severity: wishlist Tags: patch sid User: debian-powerpc...@breakpoint.cc Usertags: powerpcspe
Hi, dietlibc currently FTBFS on powerpcspe[1] like this: gcc -D__dietlibc__ -I. -isystem include -pipe -nostdinc -mpowerpc-gpopt -mpowerpc-gfxopt -Os -W -Wall -Wextra -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wno-switch -Wno-unused -Wredundant-decls -fno-stack-protector -c ppc/__longjmp.S -o bin-ppc/__longjmp.o ppc/__longjmp.S: Assembler messages: ppc/__longjmp.S:18: Error: Unrecognized opcode: `lfd' [...] Attaching a patch that fixes this. Thanks, Roland [1] http://wiki.debian.org/PowerPCSPEPort -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.5.0 (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8) Shell: /bin/sh linked to /bin/dash
diff -ruN dietlibc-0.33~cvs20120325.backup/debian/control dietlibc-0.33~cvs20120325/debian/control --- dietlibc-0.33~cvs20120325.backup/debian/control 2012-09-30 16:18:30.000000000 +0200 +++ dietlibc-0.33~cvs20120325/debian/control 2012-11-24 16:24:11.168306493 +0100 @@ -10,7 +10,7 @@ Package: dietlibc-dev Section: libdevel -Architecture: alpha amd64 arm armeb armel armhf hppa i386 ia64 mips mipsel powerpc ppc64 s390 s390x sparc sparc64 +Architecture: alpha amd64 arm armeb armel armhf hppa i386 ia64 mips mipsel powerpc powerpcspe ppc64 s390 s390x sparc sparc64 Suggests: dietlibc-doc Description: diet libc - a libc optimized for small size The diet libc is a C library that is optimized for small size. It diff -ruN dietlibc-0.33~cvs20120325.backup/debian/patches/0037-support-powerpcspe.diff dietlibc-0.33~cvs20120325/debian/patches/0037-support-powerpcspe.diff --- dietlibc-0.33~cvs20120325.backup/debian/patches/0037-support-powerpcspe.diff 1970-01-01 01:00:00.000000000 +0100 +++ dietlibc-0.33~cvs20120325/debian/patches/0037-support-powerpcspe.diff 2012-11-25 21:23:35.278181192 +0100 @@ -0,0 +1,50 @@ +Description: <short summary of the patch> +Author: Roland Stigge <sti...@antcom.de> + +Index: dietlibc-0.33~cvs20120325/ppc/__longjmp.S +=================================================================== +--- dietlibc-0.33~cvs20120325.orig/ppc/__longjmp.S 2012-11-24 16:41:22.772562338 +0100 ++++ dietlibc-0.33~cvs20120325/ppc/__longjmp.S 2012-11-24 16:41:47.404568458 +0100 +@@ -14,6 +14,7 @@ + lwz 1,(JB_GPR1*4)(3) + lwz 2,(JB_GPR2*4)(3) + lwz 0,(JB_LR*4)(3) ++#ifndef __NO_FPRS__ + lwz 14,((JB_GPRS+0)*4)(3) + lfd 14,((JB_FPRS+0*2)*4)(3) + lwz 15,((JB_GPRS+1)*4)(3) +@@ -53,6 +54,11 @@ + lfd 30,((JB_FPRS+16*2)*4)(3) + lwz 31,((JB_GPRS+17)*4)(3) + lfd 31,((JB_FPRS+17*2)*4)(3) ++#else ++ mtlr 0 ++ lwz 0,(JB_CR*4)(3) ++ mtcrf 0xFF,0 ++#endif + mr 3,4 + blr + .size __longjmp,.-__longjmp +Index: dietlibc-0.33~cvs20120325/ppc/setjmp.S +=================================================================== +--- dietlibc-0.33~cvs20120325.orig/ppc/setjmp.S 2012-03-25 17:07:46.000000000 +0200 ++++ dietlibc-0.33~cvs20120325/ppc/setjmp.S 2012-11-24 16:47:32.068654110 +0100 +@@ -13,6 +13,7 @@ + stw 1,(JB_GPR1*4)(3) + mflr 0 + stw 2,(JB_GPR2*4)(3) ++#ifndef __NO_FPRS__ + stw 14,((JB_GPRS+0)*4)(3) + stfd 14,((JB_FPRS+0*2)*4)(3) + stw 0,(JB_LR*4)(3) +@@ -52,5 +53,10 @@ + stfd 30,((JB_FPRS+16*2)*4)(3) + stw 31,((JB_GPRS+17)*4)(3) + stfd 31,((JB_FPRS+17*2)*4)(3) ++#else ++ stw 0,(JB_LR*4)(3) ++ mfcr 0 ++ stw 0,(JB_CR*4)(3) ++#endif + b JUMPTARGET (__sigjmp_save) + .size __sigsetjmp,.-__sigsetjmp diff -ruN dietlibc-0.33~cvs20120325.backup/debian/patches/series dietlibc-0.33~cvs20120325/debian/patches/series --- dietlibc-0.33~cvs20120325.backup/debian/patches/series 2012-09-30 16:18:30.000000000 +0200 +++ dietlibc-0.33~cvs20120325/debian/patches/series 2012-11-24 16:30:27.232399948 +0100 @@ -27,3 +27,4 @@ 0034-make-select-testcase-useful.diff 0035-Use-syscall-_newselect-instead-of-select-on-ppc64.diff 0036-fix-jmp_buf-size-on-armhf.diff +0037-support-powerpcspe.diff diff -ruN dietlibc-0.33~cvs20120325.backup/debian/rules dietlibc-0.33~cvs20120325/debian/rules --- dietlibc-0.33~cvs20120325.backup/debian/rules 2012-09-30 16:18:30.000000000 +0200 +++ dietlibc-0.33~cvs20120325/debian/rules 2012-11-25 21:25:38.118211719 +0100 @@ -26,6 +26,9 @@ ifeq ($(ARCH),powerpc) ARCH =ppc else +ifeq ($(ARCH),powerpcspe) + ARCH =ppc +else ifeq ($(ARCH),hppa) ARCH =parisc else @@ -35,6 +38,7 @@ endif endif endif +endif endif DYN =0