Sylvestre Ledru wrote:
No need to do a NMU here.
Ok I've attached a diff. Note: i'm currently running a test build of
this version i'll follow up later with results from that test to confirm
things are ok (I don't see why they wouldn't be)
diff -urN clang-3.0/debian/changelog clang-3.0.new/debian/changelog
--- clang-3.0/debian/changelog 2013-02-10 14:47:29.000000000 +0000
+++ clang-3.0.new/debian/changelog 2013-03-28 09:06:53.000000000 +0000
@@ -1,3 +1,15 @@
+clang (1:3.0-6.2) unstable; urgency=low
+
+ * 29-set-default-cpu-for-armhf.diff increase default cpu for armhf builds.
+ Previous absurdly low default did not work correctly with
+ -mfloat-abi=hard leading to broken code.
+ + Use armv6 as new default because in clang 3.0 armv7 implies features that
+ we don't require in debian armhf (extra fpu registers and neon)
+ * 30-powerpc-no-altivec.patch disable altivec by default on powerpc because
+ debian powerpc does not require altivec (patch cherry picked from ubuntu)
+
+ -- Peter Michael Green <plugw...@debian.org> Thu, 28 Mar 2013 09:02:01 +0000
+
clang (1:3.0-6.1) unstable; urgency=low
* Non-maintainer upload.
diff -urN clang-3.0/debian/patches/29-set-default-cpu-for-armhf.diff clang-3.0.new/debian/patches/29-set-default-cpu-for-armhf.diff
--- clang-3.0/debian/patches/29-set-default-cpu-for-armhf.diff 1970-01-01 00:00:00.000000000 +0000
+++ clang-3.0.new/debian/patches/29-set-default-cpu-for-armhf.diff 2013-03-28 08:47:26.000000000 +0000
@@ -0,0 +1,39 @@
+Description: Fix CPU type default for armhf
+ Without this patch clang defaults to a CPU type of "arm7tdmi" which
+ does not work correctly with -mfloat-abi=hard leading to broken
+ code.
+
+ Use armv6 because as far as I can tell clang 3.0 does not properly
+ support an armv7 setting without neon or the extra floating point
+ registers. It may be possible to patch it to add support but I feel
+ such a Patch would likely be considered unacceptable at this stage in
+ The release process.
+Author: Peter Michael Green <plugw...@debian.org>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+Index: clang-3.0/tools/clang/lib/Driver/Tools.cpp
+===================================================================
+--- clang-3.0.orig/tools/clang/lib/Driver/Tools.cpp 2013-03-27 19:50:18.000000000 +0000
++++ clang-3.0/tools/clang/lib/Driver/Tools.cpp 2013-03-27 19:53:28.000000000 +0000
+@@ -442,6 +442,9 @@
+ if (Arg *A = Args.getLastArg(options::OPT_march_EQ)) {
+ // Otherwise, if we have -march= choose the base CPU for that arch.
+ MArch = A->getValue(Args);
++ } else if (Triple.getEnvironment() == llvm::Triple::GNUEABIHF) {
++ // Use armv6 for armhf (raspbian version of patch)
++ MArch = "armv6";
+ } else {
+ // Otherwise, use the Arch from the triple.
+ MArch = Triple.getArchName();
diff -urN clang-3.0/debian/patches/30-powerpc-no-altivec.patch clang-3.0.new/debian/patches/30-powerpc-no-altivec.patch
--- clang-3.0/debian/patches/30-powerpc-no-altivec.patch 1970-01-01 00:00:00.000000000 +0000
+++ clang-3.0.new/debian/patches/30-powerpc-no-altivec.patch 2013-03-28 09:00:48.000000000 +0000
@@ -0,0 +1,20 @@
+Description: Make sure PowerPC doesn't default to altivec on
+Author: Adam Conrad <adcon...@ubuntu.com>
+Forwarded: no
+Reviewed-By: Colin Watson <cjwat...@ubuntu.com>
+Last-Update: 2012-04-24
+
+Index: b/tools/clang/lib/Lex/Makefile
+===================================================================
+--- a/tools/clang/lib/Lex/Makefile
++++ b/tools/clang/lib/Lex/Makefile
+@@ -16,9 +16,5 @@
+
+ LIBRARYNAME := clangLex
+
+-ifeq ($(ARCH),PowerPC)
+-CXX.Flags += -maltivec
+-endif
+-
+ include $(CLANG_LEVEL)/Makefile
+
diff -urN clang-3.0/debian/patches/series clang-3.0.new/debian/patches/series
--- clang-3.0/debian/patches/series 2013-02-06 12:53:12.000000000 +0000
+++ clang-3.0.new/debian/patches/series 2013-03-28 09:01:26.000000000 +0000
@@ -9,3 +9,5 @@
26-set-correct-float-abi.diff
27-dynamic-linker.diff
28-gcc-4.7.diff
+29-set-default-cpu-for-armhf.diff
+30-powerpc-no-altivec.patch