diff --git a/debian/changelog b/debian/changelog index d263eb4b..5c058cdc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-snapshot (1:3.5~svn211669-3) unstable; urgency=medium + + * If the version of gcc is too old, force the usage of gcc 4.8 + * Clang will now show the full version. Example: 3.5.0-svn213052-1~exp1 + + -- Sylvestre Ledru Tue, 15 Jul 2014 14:51:04 +0200 + llvm-toolchain-snapshot (1:3.5~svn211669-2) unstable; urgency=medium * Remove useless dependency on g++ diff --git a/debian/rules b/debian/rules index 75475bcd..a92c6453 100755 --- a/debian/rules +++ b/debian/rules @@ -7,7 +7,8 @@ GCC_VERSION := $(shell dpkg-query -W -f '$${Version}' g++ | sed -rne 's,^([0 LLVM_VERSION := 3.5 LLVM_VERSION_FULL := $(LLVM_VERSION).0 SONAME_EXT := 1 -DEBIAN_REVISION := $(shell dpkg-parsechangelog | sed -rne 's,^Version: .*-(.*),\1,p') +# Manage the case when the version is 1:3.5~svn213052-1~exp1 or 1:3.4.2-1 +DEBIAN_REVISION := $(shell dpkg-parsechangelog | sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\3,p") ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS)))) endif @@ -46,6 +47,11 @@ ifneq (,$(findstring $(DEB_HOST_ARCH),armel)) opt_flags += -marm 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 + ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) ge 4.8-20121128-1~ ; echo $$?),0) control_vars = '-Vdep:devlibs=libstdc++-$(GCC_VERSION)-dev, libgcc-$(GCC_VERSION)-dev, libobjc-$(GCC_VERSION)-dev' else ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) ge 4.7.2-10~ ; echo $$?),0)