diff --git a/gnu/local.mk b/gnu/local.mk index 6450da1de0..269af5fe12 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -575,6 +575,7 @@ dist_patch_DATA = \ %D%/packages/patches/gd-fix-truecolor-format-correction.patch \ %D%/packages/patches/gegl-CVE-2012-4433.patch \ %D%/packages/patches/geoclue-config.patch \ + %D%/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch \ %D%/packages/patches/ghostscript-CVE-2013-5653.patch \ %D%/packages/patches/ghostscript-CVE-2015-3228.patch \ %D%/packages/patches/ghostscript-CVE-2016-7976.patch \ diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 56b0090ee0..37e35c45fd 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -26,6 +26,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages haskell) + #:use-module (gnu packages) #:use-module (gnu packages bootstrap) #:use-module (gnu packages compression) #:use-module (gnu packages elf) @@ -267,14 +268,17 @@ (define-public ghc (define-public ghc-8 (package (name "ghc") - (version "8.0.1") + (version "8.0.2") (source (origin (method url-fetch) (uri (string-append "https://www.haskell.org/ghc/dist/" version "/" name "-" version "-src.tar.xz")) (sha256 - (base32 "1lniqy29djhjkddnailpaqhlqh4ld2mqvb1fxgxw1qqjhz6j1ywh")))) + (base32 "1c8qc4fhkycynk4g1f9hvk53dj6a1vvqi6bklqznns6hw59m8qhi")) + (patches + (search-patches + "ghc-dont-pass-linker-flags-via-response-files.patch")))) (build-system gnu-build-system) (supported-systems '("i686-linux" "x86_64-linux")) (outputs '("out" "doc")) @@ -290,7 +294,7 @@ (define-public ghc-8 "https://www.haskell.org/ghc/dist/" version "/" name "-" version "-testsuite.tar.xz")) (sha256 - (base32 "0lc1vjivkxn01aw3jg2gd7fmqb5pj7a5j987c7pn5r7caqv1cmxw")))))) + (base32 "1wjc3x68l305bl1h1ijd3yhqp2vqj83lkp3kqbr94qmmkqlms8sj")))))) (native-inputs `(("perl" ,perl) ("python" ,python-2) ; for tests @@ -312,13 +316,6 @@ (define-public ghc-8 ;; then complains that they don't match. #:build #f - #:modules ((guix build gnu-build-system) - (guix build utils) - (guix build rpath) - (srfi srfi-26) - (srfi srfi-1)) - #:imported-modules (,@%gnu-build-system-modules - (guix build rpath)) #:configure-flags (list (string-append "--with-gmp-libraries=" @@ -366,19 +363,7 @@ (define-public ghc-8 "testsuite/tests/programs/life_space_leak/life.test") (("/bin/sh") (which "sh")) (("/bin/rm") "rm")) - #t)) - ;; the testsuite can't find shared libraries. - (add-before 'check 'configure-testsuite - (lambda* (#:key inputs #:allow-other-keys) - (let* ((gmp (assoc-ref inputs "gmp")) - (gmp-lib (string-append gmp "/lib")) - (ffi (assoc-ref inputs "libffi")) - (ffi-lib (string-append ffi "/lib")) - (ncurses (assoc-ref inputs "ncurses")) - (ncurses-lib (string-append ncurses "/lib"))) - (setenv "LD_LIBRARY_PATH" - (string-append gmp-lib ":" ffi-lib ":" ncurses-lib)) - #t)))))) + #t))))) (native-search-paths (list (search-path-specification (variable "GHC_PACKAGE_PATH") (files (list diff --git a/gnu/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch b/gnu/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch new file mode 100644 index 0000000000..40aae7a9d7 --- /dev/null +++ b/gnu/packages/patches/ghc-dont-pass-linker-flags-via-response-files.patch @@ -0,0 +1,27 @@ +Don’t add linker flags via ‘response files’ since ld-wrapper +doesn’t handle them. +See https://github.com/NixOS/nixpkgs/commit/a421e7bd4a28c69bded8b17888325e31554f61a1 +https://gcc.gnu.org/ml/gcc/2016-10/msg00151.html + +diff --git a/compiler/main/SysTools.hs.orig b/compiler/main/SysTools.hs +index 1ab5b13..99270fc 100644 +--- a/compiler/main/SysTools.hs.orig ++++ b/compiler/main/SysTools.hs +@@ -424,7 +424,7 @@ runCc dflags args = do + args1 = map Option (getOpts dflags opt_c) + args2 = args0 ++ args1 ++ args + mb_env <- getGccEnv args2 +- runSomethingResponseFile dflags cc_filter "C Compiler" p args2 mb_env ++ runSomethingFiltered dflags cc_filter "C Compiler" p args2 mb_env + where + -- discard some harmless warnings from gcc that we can't turn off + cc_filter = unlines . doFilter . lines +@@ -945,7 +945,7 @@ runLink dflags args = do + args1 = map Option (getOpts dflags opt_l) + args2 = args0 ++ linkargs ++ args1 ++ args + mb_env <- getGccEnv args2 +- runSomethingResponseFile dflags ld_filter "Linker" p args2 mb_env ++ runSomethingFiltered dflags ld_filter "Linker" p args2 mb_env + where + ld_filter = case (platformOS (targetPlatform dflags)) of + OSSolaris2 -> sunos_ld_filter