Package: openarena
Version: 0.8.8-5+deb7u2
Severity: wishlist
Tags: patch sid
User: debian-powerpc...@breakpoint.cc
Usertags: powerpcspe

Hi,

openarena FTBFS on powerpcspe[1] like this:

[...]
make[4]: Entering directory `/«PKGBUILDDIR»'
cc -DCGAME -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat 
-Werror=format-security -D_FORTIFY_SOURCE=2 -fsigned-char -MMD   -Wall 
-fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe -DUSE_ICON  
-DUSE_OPENAL -DUSE_CURL -DUSE_CODEC_VORBIS -maltivec -DUSE_MUMBLE -DUSE_VOIP 
-DSTANDALONE -DPRODUCT_VERSION=\"0.8.8-5+deb7u2/Debian\" -DNDEBUG -O3 
-ffast-math -funroll-loops -fomit-frame-pointer -fPIC -o 
build/release-linux-ppc/baseq3/cgame/cg_main.o -c code/cgame/cg_main.c
code/cgame/cg_main.c:1:0: error: AltiVec and E500 instructions cannot coexist
make[4]: *** [build/release-linux-ppc/baseq3/cgame/cg_main.o] Error 1
[...]

The attached patch fixes this by preventing -maltivec on powerpcspe.

This is related to #701561.

Thanks in advance,

Roland


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


-- System Information:
Debian Release: 7.0
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: powerpcspe (ppc)

Kernel: Linux 3.8.0 (SMP w/2 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 openarena-0.8.8.orig/Makefile openarena-0.8.8/Makefile
--- openarena-0.8.8.orig/Makefile	2013-02-25 12:50:35.000000000 +0000
+++ openarena-0.8.8/Makefile	2013-02-25 13:07:35.712425329 +0000
@@ -269,7 +269,9 @@
     HAVE_VM_COMPILED=true
   else
   ifeq ($(ARCH),ppc)
-    BASE_CFLAGS += -maltivec
+    ifneq ($(NO_ALTIVEC),1)
+      BASE_CFLAGS += -maltivec
+    endif
     HAVE_VM_COMPILED=true
   endif
   ifeq ($(ARCH),ppc64)
diff -ruN openarena-0.8.8.orig/code/qcommon/q_platform.h openarena-0.8.8/code/qcommon/q_platform.h
--- openarena-0.8.8.orig/code/qcommon/q_platform.h	2013-02-25 12:50:35.000000000 +0000
+++ openarena-0.8.8/code/qcommon/q_platform.h	2013-02-25 13:08:13.416434699 +0000
@@ -24,7 +24,7 @@
 #define __Q_PLATFORM_H
 
 // this is for determining if we have an asm version of a C function
-#ifdef Q3_VM
+#if defined(Q3_VM) || defined (__NO_FPRS__)
 
 #define id386 0
 #define idppc 0
diff -ruN openarena-0.8.8.orig/debian/rules openarena-0.8.8/debian/rules
--- openarena-0.8.8.orig/debian/rules	2012-12-07 09:40:25.000000000 +0000
+++ openarena-0.8.8/debian/rules	2013-02-25 13:06:51.704414393 +0000
@@ -8,6 +8,11 @@
 Q3COMPILE_ARCH     := $(shell /usr/share/ioquake3/q3arch arch     BUILD)
 Q3COMPILE_PLATFORM := $(shell /usr/share/ioquake3/q3arch platform BUILD)
 distro             := $(shell lsb_release -is)
+ifeq ($(DEB_HOST_ARCH),powerpcspe)
+NO_ALTIVEC := 1
+else
+NO_ALTIVEC := 0
+endif
 
 # the Q3 engine's build system doesn't respect CPPFLAGS, so put them in CFLAGS
 CFLAGS += $(CPPFLAGS) -fsigned-char
@@ -34,6 +39,7 @@
 	BUILD_GAME_SO=1 \
 	CROSS_COMPILING=1 \
 	VERSION=$(DEB_VERSION)/$(distro) \
+	NO_ALTIVEC=$(NO_ALTIVEC) \
 	$(NULL)
 
 TARGET = release

Reply via email to