From e1462bf737f923f93dfc0dd20d92fe7c07214e8e Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Mon, 27 Apr 2015 12:12:41 +0300 Subject: ghc: Joey Hess: armel,armhf: Force use of llvm-3.4, rather than unversioned lvm, which can have abi changes that break ghc. Closes: #763078 --- p/ghc/debian/changelog | 2 ++ p/ghc/debian/rules | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) (limited to 'p/ghc') diff --git a/p/ghc/debian/changelog b/p/ghc/debian/changelog index e1fa38e8f..097902d01 100644 --- a/p/ghc/debian/changelog +++ b/p/ghc/debian/changelog @@ -6,6 +6,8 @@ ghc (7.8.4-1) UNRELEASED; urgency=medium * Let ghc-haddock break on ghc-doc (<< 7.6.3-20~). Closes #781649. * Improve watch file * Mark all triggers -noawait. Closes: #769554 + * Joey Hess: armel,armhf: Force use of llvm-3.4, rather than unversioned + lvm, which can have abi changes that break ghc. Closes: #763078 -- Joachim Breitner Wed, 18 Feb 2015 00:51:28 +0100 diff --git a/p/ghc/debian/rules b/p/ghc/debian/rules index c3bb45f2e..911b358d8 100755 --- a/p/ghc/debian/rules +++ b/p/ghc/debian/rules @@ -30,6 +30,13 @@ export DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) # confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) #endif +ifneq (,$(findstring $(DEB_HOST_ARCH), armel armhf)) +# Force use of a specific llvm package, the same version that ghc +# depends (and build-depends) on. +LLVM_PATH=/usr/lib/llvm-3.4/bin +export PATH:=$(LLVM_PATH):$(PATH) +endif + ProjectVersion=$(shell cat VERSION) GHC=$(firstword $(shell bash -c "type -p ghc")) @@ -201,6 +208,16 @@ ifeq (YES,$(BUILD_HADDOCK_DOCS)) install -Dm 644 debian/index.html debian/tmp/usr/share/doc/ghc-doc/index.html endif +ifneq (,$(findstring $(DEB_HOST_ARCH), armel armhf)) + # Ensure that the same llvm used to build ghc is used at runtime. + sed -i "s,exec ,PATH=\"$(LLVM_PATH):\$$PATH\"\nexport PATH\nexec ," \ + debian/tmp/usr/lib/ghc/bin/ghc-$(ProjectVersion) \ + debian/tmp/usr/lib/ghc/bin/ghc-pkg-$(ProjectVersion) \ + debian/tmp/usr/lib/ghc/bin/hsc2hs \ + debian/tmp/usr/lib/ghc/bin/haddock-ghc-$(ProjectVersion) +endif + + # manpages rm -f debian/*.1 echo ".so man1/ghc.1" > debian/ghc-$(ProjectVersion).1 -- cgit v1.2.3