Package: ioquake3
Version: 1.36+svn2287-1
Severity: wishlist
Tags: patch sid
User: debian-powerpc...@breakpoint.cc
Usertags: powerpcspe

Hi,

ioquake3 currently FTBFS on powerpcspe[1] like this:

[...]
make[4]: Entering directory `/«BUILDDIR»/ioquake3-1.36+svn2287'
cc  -DDEDICATED -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat 
-Werror=format-security -fsigned-char -DWITH_OPENARENA -D_FORTIFY_SOURCE=2 
-Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes -pipe -DUSE_ICON 
-maltivec -DDEFAULT_BASEDIR=\"/usr/lib/ioquake3\" 
-DPRODUCT_VERSION=\"1.36+svn2287-1/Debian\" -Wformat=2 -Wno-format-zero-length 
-Wformat-security -Wno-format-nonliteral -Wstrict-aliasing=2 
-Wmissing-format-attribute -Wdisabled-optimization 
-Werror-implicit-function-declaration -MMD -DUSE_VOIP -DNDEBUG -O3 
-funroll-loops -fomit-frame-pointer -ffast-math -o build/ded/sv_bot.o -c 
code/server/sv_bot.c
code/server/sv_bot.c:1:0: error: AltiVec and E500 instructions cannot coexist
make[4]: *** [build/ded/sv_bot.o] Error 1
[...]

This is due to PowerPC/Altivec code that doesn't work on powerpcspe.

Attaching a patch that fixes this by omitting the respective instructions
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.7.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 ioquake3-1.36+svn2287.orig/debian/rules ioquake3-1.36+svn2287/debian/rules
--- ioquake3-1.36+svn2287.orig/debian/rules	2012-06-23 01:06:28.000000000 +0200
+++ ioquake3-1.36+svn2287/debian/rules	2013-02-24 13:36:07.631494544 +0100
@@ -8,6 +8,11 @@
 Q3COMPILE_ARCH     := $(shell $(CURDIR)/debian/q3arch arch     BUILD)
 Q3COMPILE_PLATFORM := $(shell $(CURDIR)/debian/q3arch platform BUILD)
 distro             := $(shell lsb_release -is)
+ifeq ($(DEB_HOST_ARCH),powerpcspe)
+NO_ALTIVEC := 1
+else
+NO_ALTIVEC := 0
+endif
 
 CFLAGS += -fsigned-char -DWITH_OPENARENA $(CPPFLAGS)
 
@@ -45,6 +50,7 @@
 		BUILD_GAME_SO=1 \
 		BUILD_GAME_QVM=0 \
 		VERSION=$(DEB_VERSION)/$(distro) \
+		NO_ALTIVEC=$(NO_ALTIVEC) \
 		CFLAGS="$(CFLAGS)" \
 		$(TARGET)
 	install build/ioq3ded.* build/ioq3ded
diff -ruN ioquake3-1.36+svn2287.orig/Makefile ioquake3-1.36+svn2287/Makefile
--- ioquake3-1.36+svn2287.orig/Makefile	2013-02-24 13:23:55.000000000 +0100
+++ ioquake3-1.36+svn2287/Makefile	2013-02-24 13:30:06.243492683 +0100
@@ -331,7 +331,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)
--- ioquake3-1.36+svn2287.orig/code/qcommon/q_platform.h
+++ ioquake3-1.36+svn2287/code/qcommon/q_platform.h
@@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth
 // this is for determining if we have an asm version of a C function
 #define idx64 0
 
-#ifdef Q3_VM
+#if defined(Q3_VM) || defined (__NO_FPRS__)
 
 #define id386 0
 #define idppc 0

Reply via email to