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.
This commit is contained in:
parent
3ebebaf9ad
commit
848d4a08a0
29
pkgs/os-specific/darwin/cctools/ld-rpath-nonfinal.patch
Normal file
29
pkgs/os-specific/darwin/cctools/ld-rpath-nonfinal.patch
Normal file
@ -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:
|
@ -40,7 +40,7 @@ let
|
|||||||
++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]
|
++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]
|
||||||
++ stdenv.lib.optional enableTapiSupport libtapi;
|
++ stdenv.lib.optional enableTapiSupport libtapi;
|
||||||
|
|
||||||
patches = [ ./ld-ignore-rpath-link.patch ];
|
patches = [ ./ld-ignore-rpath-link.patch ./ld-rpath-nonfinal.patch ];
|
||||||
|
|
||||||
__propagatedImpureHostDeps = [
|
__propagatedImpureHostDeps = [
|
||||||
# As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them
|
# As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them
|
||||||
|
Loading…
x
Reference in New Issue
Block a user