diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-11-26 16:33:39 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2019-11-27 10:01:57 -0500 |
commit | 848d4a08a0b5aa0af8723ae1c98b32c807310245 (patch) | |
tree | aa66672c1fe57fa4b1bf7edff5d6ea9ba95be82b /pkgs | |
parent | 3ebebaf9ad0b7bcb00efbc7192ef47ab11ea622b (diff) | |
download | nixpkgs-848d4a08a0b5aa0af8723ae1c98b32c807310245.tar nixpkgs-848d4a08a0b5aa0af8723ae1c98b32c807310245.tar.gz nixpkgs-848d4a08a0b5aa0af8723ae1c98b32c807310245.tar.bz2 nixpkgs-848d4a08a0b5aa0af8723ae1c98b32c807310245.tar.lz nixpkgs-848d4a08a0b5aa0af8723ae1c98b32c807310245.tar.xz nixpkgs-848d4a08a0b5aa0af8723ae1c98b32c807310245.tar.zst nixpkgs-848d4a08a0b5aa0af8723ae1c98b32c807310245.zip |
cctools: readd ld-rpath-nonfinal patch
This patch is needed to build ghc, which adds -rpath flags for some reason. Updated patch for newest cctools and reapplied.
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/os-specific/darwin/cctools/ld-rpath-nonfinal.patch | 29 | ||||
-rw-r--r-- | pkgs/os-specific/darwin/cctools/port.nix | 2 |
2 files changed, 30 insertions, 1 deletions
diff --git a/pkgs/os-specific/darwin/cctools/ld-rpath-nonfinal.patch b/pkgs/os-specific/darwin/cctools/ld-rpath-nonfinal.patch new file mode 100644 index 00000000000..17ad9053f3b --- /dev/null +++ b/pkgs/os-specific/darwin/cctools/ld-rpath-nonfinal.patch @@ -0,0 +1,29 @@ +diff --git a/cctools/ld64/src/ld/Options.cpp b/cctools/ld64/src/ld/Options.cpp +index e4b37ec..4189ebc 100644 +--- a/cctools/ld64/src/ld/Options.cpp ++++ b/cctools/ld64/src/ld/Options.cpp +@@ -5800,24 +5800,6 @@ void Options::checkIllegalOptionCombinations() + if ( fDeadStrip && (fOutputKind == Options::kObjectFile) ) + throw "-r and -dead_strip cannot be used together"; + +- // can't use -rpath unless targeting 10.5 or later +- if ( fRPaths.size() > 0 ) { +- if ( !platforms().minOS(ld::version2008) ) +- throw "-rpath can only be used when targeting Mac OS X 10.5 or later"; +- switch ( fOutputKind ) { +- case Options::kDynamicExecutable: +- case Options::kDynamicLibrary: +- case Options::kDynamicBundle: +- break; +- case Options::kStaticExecutable: +- case Options::kObjectFile: +- case Options::kDyld: +- case Options::kPreload: +- case Options::kKextBundle: +- throw "-rpath can only be used when creating a dynamic final linked image"; +- } +- } +- + if ( fPositionIndependentExecutable ) { + switch ( fOutputKind ) { + case Options::kDynamicExecutable: diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix index 6b8f26c8e66..4f350f4d683 100644 --- a/pkgs/os-specific/darwin/cctools/port.nix +++ b/pkgs/os-specific/darwin/cctools/port.nix @@ -40,7 +40,7 @@ let ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ] ++ stdenv.lib.optional enableTapiSupport libtapi; - patches = [ ./ld-ignore-rpath-link.patch ]; + patches = [ ./ld-ignore-rpath-link.patch ./ld-rpath-nonfinal.patch ]; __propagatedImpureHostDeps = [ # As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them |