nixpkgs/pkgs/os-specific/darwin/cctools/ld-rpath-nonfinal.patch
2015-02-03 14:06:13 -08:00

31 lines
1.1 KiB
Diff

diff --git a/cctools/ld64/src/ld/Options.cpp b/cctools/ld64/src/ld/Options.cpp
index 9250016..91d54ec 100644
--- a/cctools/ld64/src/ld/Options.cpp
+++ b/cctools/ld64/src/ld/Options.cpp
@@ -4175,23 +4175,9 @@ void Options::checkIllegalOptionCombinations()
throw "-r and -dead_strip cannot be used together";
// can't use -rpath unless targeting 10.5 or later
- if ( fRPaths.size() > 0 ) {
- if ( !minOS(ld::mac10_5, ld::iOS_2_0) )
- 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 ( fRPaths.size() > 0 && !minOS(ld::mac10_5, ld::iOS_2_0) )
+ throw "-rpath can only be used when targeting Mac OS X 10.5 or later";
+
if ( fPositionIndependentExecutable ) {
switch ( fOutputKind ) {
case Options::kDynamicExecutable: