--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: gcc-snapshot: FTBFS on powerpcspe: SPE detection broken (bits/predefs.h: No such file or directory)
- From: Roland Stigge <stigge@antcom.de>
- Date: Wed, 27 Feb 2013 10:41:46 +0100
- Message-id: <20130227094146.11527.76918.reportbug@spe2.antcom.de>
Package: gcc-snapshot
Version: 20130222-1
Severity: wishlist
Tags: patch sid upstream
User: debian-powerpcspe@breakpoint.cc
Usertags: powerpcspe
Hi,
gcc-snapshot FTBFS on powerpcspe like this:
[...]
/«PKGBUILDDIR»/build/./gcc/xgcc -B/«PKGBUILDDIR»/build/./gcc/ -B/usr/lib/gcc-snapshot/powerpc-linux-gnuspe/bin/ -B/usr/lib/gcc-snapshot/powerpc-linux-gnuspe/lib/ -isystem /usr/lib/gcc-snapshot/powerpc-linux-gnuspe/include -isystem /usr/lib/gcc-snapshot/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 -mlong-double-128 -mno-minimal-toc -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -fPIC -mlong-double-128 -mno-minimal-toc -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 _gcov_merge_single.o -MT _gcov_merge_single.o -MD -MP -MF _gcov_merge_single.dep -DL_gcov_merge_single -c ../../../src/libgcc/libgcov.c
In file included from /usr/include/stdio.h:28:0,
from ../../../src/libgcc/../gcc/tsystem.h:87,
from ../../../src/libgcc/libgcov.c:27:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such file or directory
#include <bits/predefs.h>
^
compilation terminated.
[...]
This looks similar to build errors we fixed previously, but which are fixed
already. Turns out that the detection of the SPE case is done via
rs6000/e500-double.h in $(tm_file_list), but e500-double.h was removed
upstream recently, and hence not added anymore to $(tm_file_list). However, in
the SPE (i.e. e500v2 or powerpcspe) case, with_cpu is set exactly to 8548 in
config.gcc.
The attached patch adjusts t-linux accordingly.
Thanks in advance,
Roland
-- 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
--- gcc-snapshot-20130222/debian/patches/gcc-multiarch.diff.orig 2013-02-26 15:25:30.032765011 +0000
+++ gcc-snapshot-20130222/debian/patches/gcc-multiarch.diff 2013-02-26 15:28:10.924774989 +0000
@@ -32,6 +32,19 @@
MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
+
+MULTIARCH_DIRNAME = $(call if_multiarch,s390$(if $(findstring s390x,$(target)),x)-linux-gnu)
+Index: b/src/gcc/config/rs6000/t-linux
+===================================================================
+--- a/src/gcc/config/rs6000/t-linux 2013-02-26 16:17:56.196765767 +0100
++++ b/src/gcc/config/rs6000/t-linux 2013-02-26 16:20:18.608762524 +0100
+@@ -2,7 +2,7 @@
+ # or soft-float.
+ ifeq (,$(filter $(with_cpu),$(SOFT_FLOAT_CPUS))$(findstring soft,$(with_float)))
+ ifneq (,$(findstring spe,$(target)))
+-MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring rs6000/e500-double.h, $(tm_file_list)),,v1)
++MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring 8548,$(with_cpu)),,v1)
+ else
+ MULTIARCH_DIRNAME = powerpc-linux-gnu
+ endif
Index: b/src/gcc/config/rs6000/t-linux64
===================================================================
--- a/src/gcc/config/rs6000/t-linux64
--- End Message ---