summaryrefslogtreecommitdiff
path: root/p/ghc
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2015-04-27 12:12:41 +0300
committerJoachim Breitner <mail@joachim-breitner.de>2015-04-27 12:12:41 +0300
commite1462bf737f923f93dfc0dd20d92fe7c07214e8e (patch)
treee45e1eb5da4cb6229f0cc5ac71a24d79346d8824 /p/ghc
parent758e190db3bc4aacae8dfe5916751f27e5f9f44e (diff)
downloadDHG_packages-e1462bf737f923f93dfc0dd20d92fe7c07214e8e.tar.gz
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
Diffstat (limited to 'p/ghc')
-rw-r--r--p/ghc/debian/changelog2
-rwxr-xr-xp/ghc/debian/rules17
2 files changed, 19 insertions, 0 deletions
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 <nomeata@debian.org> 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