[PATCH 4/4] Automatically determine if -fuse-ld=gold is supported based on binutils package version.
Jon Severinsson
jon at severinsson.net
Sat Aug 31 07:30:56 UTC 2013
---
debian/changelog | 1 +
debian/control | 4 ++--
debian/rules | 9 +--------
3 filer ändrade, 4 tillägg(+), 10 borttagningar(-)
diff --git a/debian/changelog b/debian/changelog
index 517299c1..713f17af 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ llvm-toolchain-3.3 (1:3.3-9) UNRELEASED; urgency=low
* Merge from llvm-toolchain-3.2 branch up to 3.2repack-11.
* Drop auto-generated file debian/libllvm3.3.install.
* Automatically determine GCC_VERSION and dep:devlibs based on g++ package version.
+ * Automatically determine if -fuse-ld=gold is supported based on binutils package version.
-- Sylvestre Ledru <sylvestre at debian.org> Mon, 26 Aug 2013 14:48:42 +0200
diff --git a/debian/control b/debian/control
index f52bb7a3..4e9a4f4e 100644
--- a/debian/control
+++ b/debian/control
@@ -8,8 +8,8 @@ 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 (>= 2.23.52.20130522),
- lcov, procps, help2man, libjsoncpp-dev
+ libisl-dev (>= 0.11.1), libjsoncpp-dev,
+ lcov, procps, help2man
Build-Conflicts: oprofile, ocaml
Standards-Version: 3.9.4
Homepage: http://www.llvm.org/
diff --git a/debian/rules b/debian/rules
index 8eb1a153..705752fe 100755
--- a/debian/rules
+++ b/debian/rules
@@ -18,12 +18,6 @@ DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
OCAML_STDLIB_DIR ?= $(shell ocamlc -where)
-distribution := $(shell lsb_release --id --short)
-distrel := $(shell lsb_release --codename --short)
-ifeq ($(distrel),n/a)
- distrel := sid
-endif
-
export CC=gcc-$(GCC_VERSION)
export CXX=g++-$(GCC_VERSION)
@@ -56,9 +50,8 @@ else
endif
BINUTILS_GOLD_ARCHS := amd64 armhf i386 powerpc powerpcspe ppc64 sparc sparc64 x32
-BINUTILS_GOLD_UNSUPPORTED_DISTRO = wheezy quantal
+ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.23.1-1~exp3 ; echo $$?),0)
ifneq (,$(findstring $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS)))
-ifeq (,$(findstring $(distrel),$(BINUTILS_GOLD_UNSUPPORTED_DISTRO)))
# -fused-ld=gold enables the gold linker (but is not supported by all archs / distro)
LDFLAGS_EXTRA += -fuse-ld=gold
endif
--
1.7.10.4
More information about the Pkg-llvm-team
mailing list