Bug#830180: PowerPC without altivec causes crash
Source: libjpeg-turbo
Version: 1:1.5.2-2
Followup-For: Bug #830180
User: debian-powerpc@lists.debian.org
Usertags: powerpcspe
So, I just found this bug report because I noticed libjpeg-turbo FTBFS
on powerpcspe because the source code apparently blindly assumes that
all powerpc machines support AltiVec which is, of course, not the case:
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -ffloat-store -c -o jsimd_powerpc.lo jsimd_powerpc.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -ffloat-store -c jsimd_powerpc.c -fPIC -DPIC -o .libs/jsimd_powerpc.o
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -ffloat-store -c jsimd_powerpc.c -o jsimd_powerpc.o >/dev/null 2>&1
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -maltivec -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -ffloat-store -c -o libsimd_altivec_la-jccolor-altivec.lo `test -f 'jccolor-altivec.c' || echo './'`jccolor-altivec.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -maltivec -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -specs=/usr/share/dpkg/pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wall -pedantic -ffloat-store -c jccolor-altivec.c -fPIC -DPIC -o .libs/libsimd_altivec_la-jccolor-altivec.o
cc1: error: AltiVec and SPE instructions cannot coexist
Makefile:603: recipe for target 'libsimd_altivec_la-jccolor-altivec.lo' failed
The check from configure is bogus:
checking if we have SIMD optimisations for cpu type... yes (powerpc)
and from the configure.ac:
powerpc*)
AC_MSG_RESULT([yes (powerpc)])
simd_arch=powerpc
;;
This should be done more carefully by actually asking gcc whether the
target configuration supports Altivec. Blindly assuming it works is
really a bad idea.
A proper check would be something like I committed to Firefox upstream [1].
Thanks,
Adrian
> [1] https://github.com/mozilla/gecko-dev/commit/c6b39f0f902898988ca7793af56307640ff81362
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Reply to: