Bug#695654: gcc-4.6: Please include build fix for powerpcspe
Package: gcc-4.6
Version: 4.6.3-14
Severity: wishlist
Tags: patch sid
User: debian-powerpcspe@breakpoint.cc
Usertags: powerpcspe
Hi,
gcc-4.6 currently fails to build as follows on powerpcspe[1]:
[...]
/«PKGBUILDDIR»/build/./gcc/xgcc -B/«PKGBUILDDIR»/build/./gcc/ -B/usr/powerpc-linux-gnuspe/bin/ -B/usr/powerpc-linux-gnuspe/lib/ -isystem /usr/powerpc-linux-gnuspe/include -isystem /usr/powerpc-linux-gnuspe/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -mlong-double-128 -I. -I. -I../.././gcc -I../../../src/libgcc -I../../../src/libgcc/. -I../../../src/libgcc/../gcc -I../../../src/libgcc/../include -I../../../src/libgcc/../libdecnumber/dpd -I../../../src/libgcc/../libdecnumber -DHAVE_CC_TLS -o _lshrdi3.o -MT _lshrdi3.o -MD -MP -MF _lshrdi3.dep -DL_lshrdi3 -c ../../../src/libgcc/../gcc/libgcc2.c \
-fvisibility=hidden -DHIDE_EXPORTS
In file included from /usr/include/stdio.h:28:0,
from ../../../src/libgcc/../gcc/tsystem.h:87,
from ../../../src/libgcc/../gcc/libgcc2.c:29:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
[...]
I traced it back to "xgcc -v" printing the include search paths which include
/usr/include/powerpc-linux-gnu which should be
/usr/include/powerpc-linux-gnuspe for powerpcspe.
The attached patch fixes this.
Thanks in advance,
Roland
[1] http://wiki.debian.org/PowerPCSPEPort
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gcc-4.6 depends on:
ii binutils 2.22-7.1
ii cpp-4.6 4.6.3-14
ii gcc-4.6-base 4.6.3-14
ii libc6 2.13-37
ii libgcc1 1:4.7.2-4
ii libgmp10 2:5.0.5+dfsg-2
ii libgomp1 4.7.2-4
ii libmpc2 0.9-4
ii libmpfr4 3.1.0-5
ii libquadmath0 4.7.2-4
ii zlib1g 1:1.2.7.dfsg-13
Versions of packages gcc-4.6 recommends:
ii libc6-dev 2.13-37
Versions of packages gcc-4.6 suggests:
pn binutils-gold <none>
pn gcc-4.6-doc <none>
pn gcc-4.6-locales <none>
pn gcc-4.6-multilib <none>
pn libgcc1-dbg <none>
pn libgomp1-dbg <none>
pn libmudflap0-4.6-dev <none>
pn libmudflap0-dbg <none>
pn libquadmath0-dbg <none>
-- no debconf information
--- gcc-4.6-4.6.3/debian/patches/gcc-multiarch-upstream.diff.orig 2012-12-08 07:10:24.955829090 +0000
+++ gcc-4.6-4.6.3/debian/patches/gcc-multiarch-upstream.diff 2012-12-08 07:13:40.415877664 +0000
@@ -229,12 +229,16 @@
+endif
--- a/src/gcc/config/rs6000/t-linux (Revision 0)
+++ b/src/gcc/config/rs6000/t-linux (Arbeitskopie)
-@@ -0,0 +1,5 @@
+@@ -0,0 +1,9 @@
+# do not define the multiarch name if configured for a soft-float cpu
+# or soft-float.
+ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
++ifneq (,$(findstring spe, $(target)))
++MULTIARCH_DIRNAME = powerpc-linux-gnuspe
++else
+MULTIARCH_DIRNAME = powerpc-linux-gnu
+endif
++endif
--- a/src/gcc/config/rs6000/t-linux64 (Revision 193700)
+++ b/src/gcc/config/rs6000/t-linux64 (Arbeitskopie)
@@ -36,7 +36,9 @@
Reply to: