[Pkg-haskell-commits] darcs: 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

Joachim Breitner mail at joachim-breitner.de
Mon Apr 27 11:03:30 UTC 2015


Mon Apr 27 09:12:41 UTC 2015  Joachim Breitner <mail at joachim-breitner.de>
  * Joey Hess: armel,armhf: Force use of llvm-3.4, rather than unversioned lvm, which can have abi changes that break ghc. Closes: #763078

    M ./changelog +2
    M ./rules +17

Mon Apr 27 09:12:41 UTC 2015  Joachim Breitner <mail at joachim-breitner.de>
  * Joey Hess: armel,armhf: Force use of llvm-3.4, rather than unversioned lvm, which can have abi changes that break ghc. Closes: #763078
diff -rN -u old-ghc/changelog new-ghc/changelog
--- old-ghc/changelog	2015-04-27 11:03:30.267786069 +0000
+++ new-ghc/changelog	2015-04-27 11:03:30.355786215 +0000
@@ -6,6 +6,8 @@
   * 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 at debian.org>  Wed, 18 Feb 2015 00:51:28 +0100
 
diff -rN -u old-ghc/rules new-ghc/rules
--- old-ghc/rules	2015-04-27 11:03:30.267786069 +0000
+++ new-ghc/rules	2015-04-27 11:03:30.311786142 +0000
@@ -30,6 +30,13 @@
 #  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 @@
 	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




More information about the Pkg-haskell-commits mailing list