Source: iceweasel
Version: 24.2.0esr-1
Severity: wishlist
Tags: patch

Hi,

iceweasel currently FTBFS on powerpcspe like this:

...
gcc -o transform-altivec.o -c -fvisibility=hidden -DMOZ_GLUE_IN_PROGRAM 
-DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API 
-D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  
-DNO_NSPR_10_SUPPORT  -I../../../gfx/qcms -I. -I../../dist/include  
-I/usr/include/nspr -I/usr/include/nss      -fPIC -D_FORTIFY_SOURCE=2 -Wall 
-Wpointer-arith -Wdeclaration-after-statement -Werror=return-type -Wtype-limits 
-Wempty-body -Wsign-compare -Wno-unused -Wcast-align -fstack-protector 
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -std=gnu99 
-fgnu89-inline -fno-strict-aliasing -ffunction-sections -fdata-sections 
-pthread -pipe  -DNDEBUG -DTRIMMED -g -Os -freorder-blocks  
-fomit-frame-pointer -DMOZ_QCMS -Wno-missing-field-initializers  
-D_FORTIFY_SOURCE=2 -include ../../mozilla-config.h -DMOZILLA_CLIENT -MD -MP 
-MF .deps/transform-altivec.o.pp -maltivec  
/«PKGBUILDDIR»/gfx/qcms/transform-altivec.c
/«PKGBUILDDIR»/gfx/qcms/transform-altivec.c:1:0: error: AltiVec and E500 
instructions cannot coexist
make[6]: *** [transform-altivec.o] Error 1
make[5]: *** [libs] Error 2
make[6]: Leaving directory `/«PKGBUILDDIR»/build-xulrunner/gfx/qcms'
make[5]: Leaving directory `/«PKGBUILDDIR»/build-xulrunner/gfx'
make[4]: *** [libs_tier_platform] Error 2
make[3]: *** [tier_platform] Error 2
make[2]: *** [default] Error 2
make[4]: Leaving directory `/«PKGBUILDDIR»/build-xulrunner'
make[3]: Leaving directory `/«PKGBUILDDIR»/build-xulrunner'
make[2]: Leaving directory `/«PKGBUILDDIR»/build-xulrunner'
dh_auto_build: make -j1 JS_READLINE=1 returned exit code 2
make[1]: *** [stamps/build-xulrunner] Error 2
make[1]: Leaving directory `/«PKGBUILDDIR»'
make: *** [build] Error 2
...

The attached patch fixes this by excluding the altivec code additionally in the
SPE case (aka e500v2).

Roland


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

Kernel: Linux 3.9.0-dirty (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
--- iceweasel-24.1.0esr.orig/gfx/qcms/Makefile.in
+++ iceweasel-24.1.0esr/gfx/qcms/Makefile.in
@@ -51,11 +51,13 @@ endif
 else
 ifeq (ppc,$(findstring ppc,$(CPU_ARCH)))
 ifdef GNU_CC
+ifeq ($(shell echo | gcc -x c -c -maltivec - 2>&1),)
 	CSRCS += transform-altivec.c
 	ALTIVEC_FLAGS=-maltivec
 endif
 endif
 endif
+endif
 
 FORCE_STATIC_LIB = 1
 
--- iceweasel-24.1.0esr.orig/gfx/qcms/transform.c
+++ iceweasel-24.1.0esr/gfx/qcms/transform.c
@@ -1283,7 +1283,7 @@ qcms_transform* qcms_transform_create(
 #endif
 		    } else
 #endif
-#if (defined(__POWERPC__) || defined(__powerpc__))
+#if ((defined(__POWERPC__) || defined(__powerpc__)) && !defined(__NO_FPRS__))
 		    if (have_altivec()) {
 			    if (in_type == QCMS_DATA_RGB_8)
 				    transform->transform_fn = qcms_transform_data_rgb_out_lut_altivec;

Reply via email to