File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Sources/SwiftSDKGenerator/Generator Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,18 @@ extension SwiftSDKGenerator {
91
91
}
92
92
try await generator. createSymlink ( at: sdkDirPath. appending ( " lib " ) , pointingTo: " usr/lib " )
93
93
94
+ // Look for 32-bit libraries to remove from RHEL-based distros
95
+ // These are not needed, and the amazonlinux2 x86_64 symlinks are messed up
96
+ if case . rhel = targetDistribution {
97
+ for gccVersion in 7 ... 13 {
98
+ let removePath = " gcc/x86_64-redhat-linux/ \( gccVersion) /32 "
99
+ if await doesFileExist ( at: sdkUsrLibPath. appending ( removePath) ) {
100
+ logger. warning ( " Removing 32-bit libraries from RHEL imported sysroot " , metadata: [ " removePath " : . stringConvertible( removePath) ] )
101
+ try await removeRecursively ( at: sdkUsrLibPath. appending ( removePath) )
102
+ }
103
+ }
104
+ }
105
+
94
106
// Copy the ELF interpreter
95
107
try await generator. copyFromDockerContainer (
96
108
id: containerID,
You can’t perform that action at this time.
0 commit comments