dd10bb3181
This basically is binutils for Mac OS X, but ported to work on (GNU/)Linux and FreeBSD. And it's up-to-date as well! I'm mentioning this, because it was quite hard to find a recent port of it and I just accidentally stumbled on it while trying to do the port by myself. So thanks to @tpoechtrager for doing this. Also, I've added two more patches, which essentially are: * ld-rpath-nonfinal: This allows -rpath to be used for linking non-final builds, which was allowed for earlier versions of cctools and got a check for that in more recent versions. * ld-ignore-rpath-link: Ignores the -rpath-link option, because the cross-wrapper uses it in different places. Unfortunately, the cctools linker doesn't support it, so we might need to implement this later if it's possible (I'm not a Mach-O man^H^H^Hexpert). Signed-off-by: aszlig <aszlig@redmoonstudios.org>
31 lines
1.1 KiB
Diff
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:
|