summaryrefslogtreecommitdiff
path: root/data/ld64/searchpaths.diff
blob: c3d9c541b8cd049a91ac5dba59f2cef3a5416a02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff -ur ld64-274.2/src/ld/Options.cpp ld64-274.2+iPhone/src/ld/Options.cpp
--- ld64-274.2/src/ld/Options.cpp	2017-01-20 12:24:09.000000000 -1000
+++ ld64-274.2+iPhone/src/ld/Options.cpp	2018-09-17 13:33:42.000000000 -1000
@@ -3992,9 +3992,16 @@
 		libraryPaths.push_back("/usr/lib");
 		libraryPaths.push_back("/usr/local/lib");
 
+		// <rdar://problem/5433882> remove /Network/Library/Frameworks from default search path
+		if ( fSDKPaths.size() == 0 ) {
+			libraryPaths.push_back("/usr/share/SDKs/iPhoneOS.sdk/usr/lib");
+			libraryPaths.push_back("/usr/share/SDKs/iPhoneOS.sdk/usr/local/lib");
+			frameworkPaths.push_back("/usr/share/SDKs/iPhoneOS.sdk/Library/Frameworks/");
+			frameworkPaths.push_back("/usr/share/SDKs/iPhoneOS.sdk/System/Library/Frameworks/");
+		}
+
 		frameworkPaths.push_back("/Library/Frameworks/");
 		frameworkPaths.push_back("/System/Library/Frameworks/");
-		// <rdar://problem/5433882> remove /Network/Library/Frameworks from default search path
 	}
 
 	// <rdar://problem/5829579> Support for configure based hacks 
@@ -4051,7 +4058,7 @@
 					else
 						fLibrarySearchPaths.push_back(libDir);
 				}
-				else if ( !addStandardLibraryDirectories || (strcmp(libDir, "/usr/local/lib") != 0) ) {
+				else if ( !addStandardLibraryDirectories || ( (strcmp(libDir, "/usr/local/lib") != 0) && (strncmp(libDir, "/usr/share/SDKs/iPhoneOS.sdk/", 29) != 0) ) ) {
 					warning("directory not found for option '-L%s'", libDir);
 				}
 			}
@@ -4105,7 +4112,7 @@
 					else
 						fFrameworkSearchPaths.push_back(frameworkDir);
 				}
-				else if ( !addStandardLibraryDirectories || (strcmp(frameworkDir, "/Library/Frameworks/") != 0) ) {
+				else if ( !addStandardLibraryDirectories || ( (strcmp(frameworkDir, "/Library/Frameworks/") != 0) && (strncmp(frameworkDir, "/usr/share/SDKs/iPhoneOS.sdk/", 29) != 0) ) ) {
 					warning("directory not found for option '-F%s'", frameworkDir);
 				}
 			}