|
|
|
@ -25,10 +25,6 @@ in |
|
|
|
|
# so we need to make sure that intent matches result ourselves. |
|
|
|
|
assert enableGold -> execFormatIsELF stdenv.targetPlatform; |
|
|
|
|
|
|
|
|
|
# Note: this package is used for bootstrapping fetchurl, and thus |
|
|
|
|
# cannot use fetchpatch! All mutable patches (generated by GitHub or |
|
|
|
|
# cgit) that are needed here should be included directly in Nixpkgs as |
|
|
|
|
# files. |
|
|
|
|
|
|
|
|
|
let |
|
|
|
|
reuseLibs = enableShared && withAllTargets; |
|
|
|
@ -60,6 +56,9 @@ stdenv.mkDerivation { |
|
|
|
|
|
|
|
|
|
src = srcs.${stdenv.targetPlatform.system} or srcs.normal; |
|
|
|
|
|
|
|
|
|
# WARN: this package is used for bootstrapping fetchurl, and thus cannot use |
|
|
|
|
# fetchpatch! All mutable patches (generated by GitHub or cgit) that are |
|
|
|
|
# needed here should be included directly in Nixpkgs as files. |
|
|
|
|
patches = [ |
|
|
|
|
# Make binutils output deterministic by default. |
|
|
|
|
./deterministic.patch |
|
|
|
@ -76,14 +75,14 @@ stdenv.mkDerivation { |
|
|
|
|
# https://sourceware.org/bugzilla/show_bug.cgi?id=28138 |
|
|
|
|
./fix-ld-descriptors.patch |
|
|
|
|
] ++ lib.optional stdenv.targetPlatform.isiOS ./support-ios.patch |
|
|
|
|
++ # This patch was suggested by Nick Clifton to fix |
|
|
|
|
# https://sourceware.org/bugzilla/show_bug.cgi?id=16177 |
|
|
|
|
# It can be removed when that 7-year-old bug is closed. |
|
|
|
|
# This binutils bug causes GHC to emit broken binaries on armv7, and |
|
|
|
|
# indeed GHC will refuse to compile with a binutils suffering from it. See |
|
|
|
|
# this comment for more information: |
|
|
|
|
# https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333 |
|
|
|
|
lib.optional (stdenv.targetPlatform.isAarch32 && stdenv.hostPlatform.system != stdenv.targetPlatform.system) ./R_ARM_COPY.patch |
|
|
|
|
# This patch was suggested by Nick Clifton to fix |
|
|
|
|
# https://sourceware.org/bugzilla/show_bug.cgi?id=16177 |
|
|
|
|
# It can be removed when that 7-year-old bug is closed. |
|
|
|
|
# This binutils bug causes GHC to emit broken binaries on armv7, and indeed |
|
|
|
|
# GHC will refuse to compile with a binutils suffering from it. See this |
|
|
|
|
# comment for more information: |
|
|
|
|
# https://gitlab.haskell.org/ghc/ghc/issues/4210#note_78333 |
|
|
|
|
++ lib.optional (stdenv.targetPlatform.isAarch32 && stdenv.hostPlatform.system != stdenv.targetPlatform.system) ./R_ARM_COPY.patch |
|
|
|
|
++ lib.optional stdenv.targetPlatform.isWindows ./windres-locate-gcc.patch; |
|
|
|
|
|
|
|
|
|
outputs = [ "out" "info" "man" ]; |
|
|
|
|