Package: apertium
Version: 3.1.0-2
Severity: wishlist
Tags: patch sid upstream
User: [email protected]
Usertags: powerpcspe

Hi,

apertium FTBFS on powerpcspe[1] like this:

[...]
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking Compilation architecture: PPC, i686, x86_64, Other... PowerPC
checking for powerpc-linux-gnuspe-g++... powerpc-linux-gnuspe-g++
checking whether the C++ compiler works... no
configure: error: in `/«PKGBUILDDIR»':
configure: error: C++ compiler cannot create executables
See `config.log' for more details
make: *** [config.status] Error 77
dpkg-buildpackage: error: debian/rules build gave error exit status 2
[...]

Attaching a patch that fixes this by adding -maltivec only on powerpc, but not
on powerpcspe.

Thanks,

Roland


[1] http://wiki.debian.org/PowerPCSPEPort

-- System Information:
Debian Release: 7.0
  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
Index: apertium-3.1.0/configure.ac
===================================================================
--- apertium-3.1.0.orig/configure.ac	2008-11-05 15:42:48.000000000 +0100
+++ apertium-3.1.0/configure.ac	2012-12-16 19:04:54.421203953 +0100
@@ -61,8 +61,21 @@
 if test x$ARCH = xppc
 then
   AC_MSG_RESULT([PowerPC])
-  CFLAGS="$CFLAGS -Wall -ansi -mpowerpc -maltivec -fno-pic -fomit-frame-pointer"
-  CXXFLAGS="$CXXFLAGS -Wall -ansi -mpowerpc -maltivec -fno-pic -fomit-frame-pointer"
+  CFLAGS="$CFLAGS -Wall -ansi -mpowerpc -fno-pic -fomit-frame-pointer"
+  CXXFLAGS="$CXXFLAGS -Wall -ansi -mpowerpc -fno-pic -fomit-frame-pointer"
+  AC_COMPILE_IFELSE([
+#if defined(__GNUC__) && (__GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4))
+#error "Need GCC >= 3.4 for sane altivec support"    
+#endif
+#include <altivec.h>
+int main () {
+    vector unsigned int v = vec_splat_u32 (1);
+    v = vec_sub (v, v);
+    return 0;
+}], [
+  CFLAGS="$CFLAGS -maltivec"
+  CXXFLAGS="$CXXFLAGS -maltivec"
+],)
 else
   if test x$ARCH = xi686
   then

Reply via email to