diff --git a/debian/changelog b/debian/changelog index 1bff38c2..7c1df1f8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,13 @@ llvm-toolchain-3.2 (1:3.2repack-1~exp4) UNRELEASED; urgency=low * debian/patches/r600-snapshot.diff: Update to mesa-9.1 git tag. (Closes: #703671, #697356) + [ Peter Michael Green ] + * Use binutils-gold only on architectures where it is actually available + * 33-armhf-defaults.diff Fix defaults to use correct CPU and FPU for + debian armhf (Closes: #704111) + * 34-powerpc-no-altivec.diff disable altivec by default on powerpc because + debian powerpc does not require altivec (patch cherry picked from ubuntu) + -- Sylvestre Ledru Thu, 14 Mar 2013 17:47:12 +0100 llvm-toolchain-3.2 (1:3.2repack-1~exp3) experimental; urgency=low diff --git a/debian/control b/debian/control index 63ba740d..7280e459 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl8.5, expect, sharutils, autotools-dev (>= 20060702.1), libffi-dev (>= 3.0.9), lsb-release, patchutils, diffstat, xz-utils, chrpath, python-dev, libedit-dev, swig, python-sphinx, ocaml-nox, binutils-dev, libcloog-isl-dev, - libisl-dev (>= 0.11.1), binutils-gold + libisl-dev (>= 0.11.1), binutils-gold [amd64 armel armhf i386 powerpc powerpcspe ppc64 sparc sparc64 x32] Build-Conflicts: oprofile, ocaml Standards-Version: 3.9.3 Homepage: http://www.llvm.org/ diff --git a/debian/patches/33-armhf-defaults.diff b/debian/patches/33-armhf-defaults.diff new file mode 100644 index 00000000..9e13f974 --- /dev/null +++ b/debian/patches/33-armhf-defaults.diff @@ -0,0 +1,55 @@ +Description: Fix defaults to use correct CPU and FPU on armhf + Clang was defaulting to a rediculously low CPU on armhf, furthermore when + The correct CPU is selected it defaults to incorrect FPU options for + debian. This patch sets the defaults to appropriate values. +Author: Peter Michael Green +Bug-Debian: http://bugs.debian.org/704111 + +--- +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: llvm-toolchain_3.3~svn178632/clang/lib/Driver/Tools.cpp +=================================================================== +--- llvm-toolchain_3.3~svn178632.orig/clang/lib/Driver/Tools.cpp 2013-04-03 13:09:56.000000000 +0200 ++++ llvm-toolchain_3.3~svn178632/clang/lib/Driver/Tools.cpp 2013-04-03 13:11:39.000000000 +0200 +@@ -489,6 +489,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(); ++ } else if (Triple.getEnvironment() == llvm::Triple::GNUEABIHF) { ++ // Use armv6 for armhf (raspbian version of patch) ++ MArch = "armv7-a"; + } else { + // Otherwise, use the Arch from the triple. + MArch = Triple.getArchName(); +@@ -779,8 +782,19 @@ + } + + // Honor -mfpu=. +- if (const Arg *A = Args.getLastArg(options::OPT_mfpu_EQ)) ++ if (const Arg *A = Args.getLastArg(options::OPT_mfpu_EQ)) { + addFPUArgs(D, A, Args, CmdArgs); ++ } else { ++ if (StringRef(CPUName).startswith("cortex-a")) { ++ //Debian armhf uses vfpv3-d16 ++ CmdArgs.push_back("-target-feature"); ++ CmdArgs.push_back("+vfp3"); ++ CmdArgs.push_back("-target-feature"); ++ CmdArgs.push_back("+d16"); ++ CmdArgs.push_back("-target-feature"); ++ CmdArgs.push_back("-neon"); ++ } ++ } + + // Honor -mfpmath=. + if (const Arg *A = Args.getLastArg(options::OPT_mfpmath_EQ)) diff --git a/debian/patches/34-powerpc-no-altivec.diff b/debian/patches/34-powerpc-no-altivec.diff new file mode 100644 index 00000000..de1dada3 --- /dev/null +++ b/debian/patches/34-powerpc-no-altivec.diff @@ -0,0 +1,24 @@ +Description: Make sure PowerPC doesn't default to altivec on +Author: Adam Conrad +Author: Peter Michael Green +Forwarded: no +Reviewed-By: Colin Watson + +Last-Update: 2013-04-01 + +Index: clang-3.2.new/clang/lib/Lex/Makefile +=================================================================== +--- clang-3.2.new.orig/clang/lib/Lex/Makefile 2013-04-01 02:32:35.000000000 +0000 ++++ clang-3.2.new/clang/lib/Lex/Makefile 2013-04-01 02:32:03.000000000 +0000 +@@ -16,11 +16,5 @@ + + LIBRARYNAME := clangLex + +-ifeq ($(ARCH),PowerPC) +-ifneq ($(shell dpkg-architecture -qDEB_HOST_ARCH),powerpcspe) +-CXX.Flags += -maltivec +-endif +-endif +- + include $(CLANG_LEVEL)/Makefile + diff --git a/debian/patches/series b/debian/patches/series index 154b4c97..3708df99 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -33,4 +33,6 @@ declare_clear_cache.diff 0101-LegalizeDAG-Allow-type-promotion-for-scalar-stores.patch 0102-LegalizeDAG-Allow-type-promotion-of-scalar-loads.patch 0103-DAGCombiner-Avoid-generating-illegal-vector-INT_TO_F.patch +33-armhf-defaults.diff +34-powerpc-no-altivec.diff