diff --git a/debian/changelog b/debian/changelog index f255e97b..4be02cff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,16 @@ -llvm-toolchain-3.4 (1:3.4.2-5) UNRELEASED; urgency=medium +llvm-toolchain-3.4 (1:3.4.2-6) UNRELEASED; urgency=medium + * If the version of gcc is too old, force the usage of gcc 4.8 + + -- Sylvestre Ledru Mon, 21 Jul 2014 11:21:01 +0200 + +llvm-toolchain-3.4 (1:3.4.2-5) unstable; urgency=medium + + * For i386, gcc 4.9 updated its paths to i586-linux-gnu (i486-linux-gnu + previously). Adding this triple to the list of search (Closes: #754963) * Clang will now show the full version. Example: 3.5.0-svn213052-1~exp1 - -- + -- Sylvestre Ledru Fri, 18 Jul 2014 17:50:51 +0200 llvm-toolchain-3.4 (1:3.4.2-4) unstable; urgency=medium diff --git a/debian/patches/gcc-4.9-i586-linux-gnu.diff b/debian/patches/gcc-4.9-i586-linux-gnu.diff new file mode 100644 index 00000000..1e4405fa --- /dev/null +++ b/debian/patches/gcc-4.9-i586-linux-gnu.diff @@ -0,0 +1,13 @@ +Index: llvm-toolchain-3.4-3.4.2/clang/lib/Driver/ToolChains.cpp +=================================================================== +--- llvm-toolchain-3.4-3.4.2.orig/clang/lib/Driver/ToolChains.cpp ++++ llvm-toolchain-3.4-3.4.2/clang/lib/Driver/ToolChains.cpp +@@ -1131,7 +1131,7 @@ void Generic_GCC::GCCInstallationDetecto + "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu", "i386-linux-gnu", + "i386-redhat-linux6E", "i686-redhat-linux", "i586-redhat-linux", + "i386-redhat-linux", "i586-suse-linux", "i486-slackware-linux", +- "i686-montavista-linux" ++ "i686-montavista-linux", "i586-linux-gnu" + }; + + static const char *const MIPSLibDirs[] = { "/lib" }; diff --git a/debian/patches/series b/debian/patches/series index 951df61f..0e24072b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -29,7 +29,6 @@ silent-swig-warning.diff silent-MCJIIT-tests.diff include-target.diff debian-mips64-n32-multiarch.diff - force-gcc-header-obj.diff do-not-fail-on-unexpected-pass.diff fix-an-issue-in-chroot-witout-proc.diff @@ -42,4 +41,4 @@ lldb-soname.diff CVE-2014-2893.diff follow-parallel-var.diff scan-build-search-path.diff - +gcc-4.9-i586-linux-gnu.diff diff --git a/debian/rules b/debian/rules index c1eb2c9a..cf86a3ff 100755 --- a/debian/rules +++ b/debian/rules @@ -22,8 +22,6 @@ DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) OCAML_STDLIB_DIR ?= $(shell ocamlc -where) -export CC=gcc-$(GCC_VERSION) -export CXX=g++-$(GCC_VERSION) LDFLAGS_EXTRA= CXXFLAGS_EXTRA= @@ -33,6 +31,14 @@ ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe)) LDFLAGS_EXTRA += -latomic endif +ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 4.7.2-10~ ; echo $$?),0) +# Too old version of gcc. Force 4.8 + GCC_VERSION := 4.8 +endif + +export CC=gcc-$(GCC_VERSION) +export CXX=g++-$(GCC_VERSION) + confargs := \ --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)