Bug#695661: #695661: gcc-4.7: Please fix build on powerpcspe
Hi,
regarding your request to use t-spe, I'm attaching two patches, for the
unstable and experimental versions of gcc-4.7, respectively.
As written before, in Debian, t-spe wasn't included properly (only on
some bsd variant). So doing it instead of t-linux in the powerpcspe
case, when spe is present.
Further, the Debian specific patch (gcc-multiarch...) contained:
+MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring
rs6000/e500-double.h, $(tm_file)),,v1)
But unfortunately, tm_file isn't passed from the config script to the
Makefile, resulting in MULTIARCH_DIRNAME = powerpc-linux-gnuspev1
always. (I tested that tm_file is set correctly w/ e500-double.h, but
not passed to the Makefile.)
Since we are only supporting powerpcspe (not powerpcspev1), I removed
the respective $(if ...) also. It was the only reference to tm_file in
the Makefiles (and broken anyway). In the unlikely event that someone
needs a powerpcspev1 port, we can add it again (and need to pass tm_file
to the Makefile also which wasn't done before).
Thanks in advance,
Roland
--- debian/patches/gcc-multiarch.diff.orig 2012-12-11 21:49:03.494351993 +0100
+++ debian/patches/gcc-multiarch.diff 2012-12-11 21:49:49.890363523 +0100
@@ -419,11 +419,18 @@
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
;;
ia64*-*-hpux*)
-@@ -2012,6 +2012,7 @@
+@@ -2012,6 +2012,14 @@
;;
*)
tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
-+ tmake_file="$tmake_file rs6000/t-linux"
++ case ${target} in
++ *spe*)
++ tmake_file="$tmake_file rs6000/t-spe"
++ ;;
++ *)
++ tmake_file="$tmake_file rs6000/t-linux"
++ ;;
++ esac
;;
esac
case ${target} in
@@ -555,7 +562,7 @@
maltivec/mlittle \
maltivec/mabi=altivec/mlittle
+
-+MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring rs6000/e500-double.h, $(tm_file)),,v1)
++MULTIARCH_DIRNAME = powerpc-linux-gnuspe
+
--- a/src/gcc/config/rs6000/t-linux64 (revision 182390)
+++ b/src/gcc/config/rs6000/t-linux64 (working copy)
--- debian/patches/gcc-multiarch-upstream.diff.orig 2012-12-12 12:00:35.000000000 +0100
+++ debian/patches/gcc-multiarch-upstream.diff 2012-12-12 13:06:40.000000000 +0100
@@ -361,7 +361,7 @@
maltivec/mabi=altivec/mlittle
+
+ifneq (,$(findstring linux, $(target)))
-+MULTIARCH_DIRNAME = powerpc-linux-gnuspe$(if $(findstring rs6000/e500-double.h, $(tm_file)),,v1)
++MULTIARCH_DIRNAME = powerpc-linux-gnuspe
+endif
--- a/src/gcc/config/rs6000/t-fprules (Revision 193696)
+++ b/src/gcc/config/rs6000/t-fprules (Arbeitskopie)
@@ -533,11 +533,18 @@
target_cpu_default="MASK_GNU_AS|MASK_GNU_LD"
;;
ia64*-*-hpux*)
-@@ -2075,6 +2078,7 @@
+@@ -2075,6 +2078,14 @@
;;
*)
tm_file="${tm_file} rs6000/linux.h glibc-stdint.h"
-+ tmake_file="$tmake_file rs6000/t-linux"
++ case ${target} in
++ *spe*)
++ tmake_file="$tmake_file rs6000/t-spe"
++ ;;
++ *)
++ tmake_file="$tmake_file rs6000/t-linux"
++ ;;
++ esac
;;
esac
case ${target} in
Reply to: