Package: coreutils
Version: 8.13-3.3
Severity: wishlist
Tags: upstream patch sid
User: debian-powerpc...@breakpoint.cc
Usertags: powerpcspe

Hi,

coreutils currently fails to build from source on powerpcspe[1] like this:

[...]
  CC     src/factor.o
/tmp/ccWZ35me.s: Assembler messages:
/tmp/ccWZ35me.s:615: Error: Unrecognized opcode: `mulhdu'
/tmp/ccWZ35me.s:624: Error: Unrecognized opcode: `mulhdu'
/tmp/ccWZ35me.s:700: Error: Unrecognized opcode: `mulhdu'
/tmp/ccWZ35me.s:709: Error: Unrecognized opcode: `mulhdu'
/tmp/ccWZ35me.s:776: Error: Unrecognized opcode: `mulhdu'
/tmp/ccWZ35me.s:795: Error: Unrecognized opcode: `mulhdu'
[...]

This is due to src/factor.c defining USE_LONGLONG_H (ifndef, but this seems to
be the case always), and therefore "# define W_TYPE_SIZE 64" which leads to
src/longlong.h branching to 64-bit PowerPC code, including the above
64-bit-only asm. Please note that this issue also applies to "normal" powerpc
(32-bit), but there, the build only fails in the tests because the assembler
accepts mulhdu (without powerpc being able to execute it properly).

Attaching a patch that fixes this. Please also consider widen this to "normal"
powerpc where __NO_FPRS__ isn't defined (on powerpcspe only).

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

Versions of packages coreutils depends on:
ii  dpkg          1.16.9
ii  install-info  4.13a.dfsg.1-10
ii  libacl1       2.2.51-8
ii  libattr1      1:2.4.46-8
ii  libc6         2.13-36
ii  libselinux1   2.1.9-5

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information
--- coreutils-8.20/src/factor.c.backup	2012-12-04 22:40:16.887968125 +0100
+++ coreutils-8.20/src/factor.c	2012-12-04 22:43:29.968016083 +0100
@@ -121,6 +121,10 @@
 # define USE_LONGLONG_H 1
 #endif
 
+#if defined(_ARCH_PPC) && defined(__NO_FPRS__)
+#undef USE_LONGLONG_H
+#endif
+
 #if USE_LONGLONG_H
 
 /* Make definitions for longlong.h to make it do what it can do for us */

Reply via email to