From ece61f3bbeda5be61ae457c8a8a8c94a6906e1c7 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 1 Aug 2013 14:19:54 +0000 Subject: [PATCH] * llvm-config-3.3 --libdir reports wrong directory (Closes: #717346) * Backport of upstream patch to fix the FTBFS under kfreebsd i386 * binutils-gold no longer exists. Use -fuse-ld=gold instead. --- debian/changelog | 8 ++++++++ debian/control | 3 +-- debian/llvm-3.3-dev.links.in | 1 + debian/patches/patch-bug-16511.diff | 20 ++++++++++++++++++++ debian/patches/series | 1 + debian/rules | 12 ++++++++++-- 6 files changed, 41 insertions(+), 4 deletions(-) create mode 100644 debian/patches/patch-bug-16511.diff diff --git a/debian/changelog b/debian/changelog index c5c663ec..ba455693 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +llvm-toolchain-3.3 (1:3.3-4) unstable; urgency=low + + * llvm-config-3.3 --libdir reports wrong directory (Closes: #717346) + * Backport of upstream patch to fix the FTBFS under kfreebsd i386 + * binutils-gold no longer exists. Use -fuse-ld=gold instead. + + -- Sylvestre Ledru Thu, 01 Aug 2013 14:06:38 +0200 + llvm-toolchain-3.3 (1:3.3-3) unstable; urgency=low [ Luca Falavigna ] diff --git a/debian/control b/debian/control index 4dbe2e48..db101599 100644 --- a/debian/control +++ b/debian/control @@ -8,8 +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 (>= 2.23.52.20130522) - [amd64 armhf i386 powerpc powerpcspe ppc64 sparc sparc64 x32], + libisl-dev (>= 0.11.1), binutils (>= 2.23.52.20130522), lcov, procps, help2man Build-Conflicts: oprofile, ocaml Standards-Version: 3.9.4 diff --git a/debian/llvm-3.3-dev.links.in b/debian/llvm-3.3-dev.links.in index 7cd72f65..69931cc5 100644 --- a/debian/llvm-3.3-dev.links.in +++ b/debian/llvm-3.3-dev.links.in @@ -1,3 +1,4 @@ usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-3.3.so.1 usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-3.3.so +usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-3.3.so.1 usr/lib/llvm-3.3/lib/libLLVM-3.3.so usr/include/llvm-c-3.3/llvm-c usr/lib/llvm-3.3/include/llvm-c usr/include/llvm-3.3/llvm usr/lib/llvm-3.3/include/llvm diff --git a/debian/patches/patch-bug-16511.diff b/debian/patches/patch-bug-16511.diff new file mode 100644 index 00000000..1e9b560b --- /dev/null +++ b/debian/patches/patch-bug-16511.diff @@ -0,0 +1,20 @@ +Index: llvm-toolchain-3.3-3.3/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp +=================================================================== +--- llvm-toolchain-3.3-3.3.orig/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp (révision 186870) ++++ llvm-toolchain-3.3-3.3/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp (révision 186871) +@@ -101,6 +101,7 @@ + log->Printf("ptrace() failed; errno=%d (%s)", errno, str); + } + ++#ifdef __amd64__ + if (log) { + if (req == PT_GETREGS) { + struct reg *r = (struct reg *) addr; +@@ -111,6 +112,7 @@ + log->Printf("PT_GETREGS: ax=0x%lx", r->r_rax); + } + } ++#endif + + return result; + } diff --git a/debian/patches/series b/debian/patches/series index 3e67a73e..8910dd50 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -29,3 +29,4 @@ disabletestlldb.diff mipsel-ftbfs.diff kfreebsd_ptrace_kludge.diff kfreebsd_v2.diff +patch-bug-16511.diff diff --git a/debian/rules b/debian/rules index 6bf22f7c..41c52e3c 100755 --- a/debian/rules +++ b/debian/rules @@ -24,6 +24,9 @@ ifeq ($(distrel),n/a) distrel := sid endif +LDFLAGS_EXTRA= +CXXFLAGS_EXTRA= + confargs := \ --with-c-include-dirs=/usr/include/$(DEB_HOST_MULTIARCH):/usr/include/$(DEB_HOST_GNU_TYPE):/usr/include \ --with-cxx-include-root=/usr/include/c++/$(GCC_VERSION) \ @@ -61,12 +64,17 @@ else endif endif +BINUTILS_GOLD_ARCHS := amd64 armhf i386 powerpc powerpcspe ppc64 sparc sparc64 x32 +ifneq (,$(findstring $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) + LDFLAGS_EXTRA += -fuse-ld=gold +endif + ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS))) # enable the code coverage CODECOVERAGE=yes - CXXFLAGS_EXTRA=-fprofile-arcs -ftest-coverage - LDFLAGS_EXTRA=-coverage -lgcov + CXXFLAGS_EXTRA += -fprofile-arcs -ftest-coverage + LDFLAGS_EXTRA += -coverage -lgcov endif ifneq (,$(filter scan-build,$(DEB_BUILD_OPTIONS)))