Package: x264
Version: 2:0.123.2189+git35cf912-1
Severity: wishlist
Tags: patch sid
User: [email protected]
Usertags: powerpcspe
Hi,
x264 FTBFS on powerpcspe[1] like this:
[...]
# Build static lib
LDFLAGS="-Wl,-z,relro" ./configure --prefix=/usr
--libdir=/usr/lib/powerpc-linux-gnuspe --enable-static --disable-cli \
|| ( tail -v -n +0 config.log config.log ; exit 1 )
No working C compiler found.
==> config.log <==
x264 configure script
Command line options: "--prefix=/usr" "--libdir=/usr/lib/powerpc-linux-gnuspe"
"--enable-static" "--disable-cli"
checking whether gcc works... no
Failed commandline was:
--------------------------------------------------
gcc conftest.c -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -Wall -I. -I$(SRCPATH) -maltivec -mabi=altivec
-Wl,-z,relro -lm -o conftest
conftest.c:1:0: error: AltiVec and E500 instructions cannot coexist
[...]
The attached patch fixes this by not using AltiVec on powerpcspe
since AltiVec is not present in the hardware.
Thanks,
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
--- x264-0.123.2189+git35cf912.orig/common/cpu.c
+++ x264-0.123.2189+git35cf912/common/cpu.c
@@ -318,6 +318,9 @@ uint32_t x264_cpu_detect( void )
uint32_t x264_cpu_detect( void )
{
+#ifdef __NO_FPRS__
+ return 0;
+#else
static void (*oldsig)( int );
oldsig = signal( SIGILL, sigill_handler );
@@ -337,6 +340,7 @@ uint32_t x264_cpu_detect( void )
signal( SIGILL, oldsig );
return X264_CPU_ALTIVEC;
+#endif
}
#endif
--- x264-0.123.2189+git35cf912/debian/confflags.orig 2013-02-25 14:17:53.260523046 +0100
+++ x264-0.123.2189+git35cf912/debian/confflags 2013-02-25 14:18:12.736527886 +0100
@@ -90,6 +90,8 @@
do_opt := yes
opt_libdir := /usr/lib/$(DEB_HOST_MULTIARCH)/altivec
shared_confflags += --disable-asm
+static_confflags += --disable-asm
+opt_confflags += --disable-asm
endif
endif