diff -Nru clang-3.0/debian/changelog clang-3.0/debian/changelog --- clang-3.0/debian/changelog 2013-02-10 14:47:29.000000000 +0000 +++ clang-3.0/debian/changelog 2013-03-28 00:52:30.000000000 +0000 @@ -1,3 +1,10 @@ +clang (1:3.0-6.1+rpi1) wheezy-staging; urgency=low + + * Fix default CPU for raspbian. Previous incorrect default did not work + correctly with -mfloat-abi=hard leading to broken code. + + -- Peter Michael Green Wed, 27 Mar 2013 19:53:46 +0000 + clang (1:3.0-6.1) unstable; urgency=low * Non-maintainer upload. diff -Nru clang-3.0/debian/patches/29-set-default-cpu-for-armhf.diff clang-3.0/debian/patches/29-set-default-cpu-for-armhf.diff --- clang-3.0/debian/patches/29-set-default-cpu-for-armhf.diff 1970-01-01 01:00:00.000000000 +0100 +++ clang-3.0/debian/patches/29-set-default-cpu-for-armhf.diff 2013-03-28 00:50:26.000000000 +0000 @@ -0,0 +1,33 @@ +Description: Fix CPU type default for raspbian 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. +Author: Peter Michael Green + +--- +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: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +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 -Nru clang-3.0/debian/patches/series clang-3.0/debian/patches/series --- clang-3.0/debian/patches/series 2013-02-06 12:53:12.000000000 +0000 +++ clang-3.0/debian/patches/series 2013-03-27 19:50:18.000000000 +0000 @@ -9,3 +9,4 @@ 26-set-correct-float-abi.diff 27-dynamic-linker.diff 28-gcc-4.7.diff +29-set-default-cpu-for-armhf.diff