Skip to content

Commit c1180f1

Browse files
authored
Merge pull request #767 from ruscur/powerpc-fixes
2 parents e8978f1 + 78a7c7c commit c1180f1

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

Foundation/CGFloat.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010
@_fixed_layout
1111
public struct CGFloat {
12-
#if arch(i386) || arch(arm)
12+
#if arch(i386) || arch(arm) || arch(powerpc)
1313
/// The native type used to store the CGFloat, which is Float on
1414
/// 32-bit architectures and Double on 64-bit architectures.
1515
public typealias NativeType = Float
16-
#elseif arch(x86_64) || arch(arm64) || arch(s390x)
16+
#elseif arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le)
1717
/// The native type used to store the CGFloat, which is Float on
1818
/// 32-bit architectures and Double on 64-bit architectures.
1919
public typealias NativeType = Double
@@ -170,9 +170,9 @@ extension CGFloat : BinaryFloatingPoint {
170170

171171
@_transparent
172172
public init(bitPattern: UInt) {
173-
#if arch(i386) || arch(arm)
173+
#if arch(i386) || arch(arm) || arch(powerpc)
174174
native = NativeType(bitPattern: UInt32(bitPattern))
175-
#elseif arch(x86_64) || arch(arm64) || arch(s390x)
175+
#elseif arch(x86_64) || arch(arm64) || arch(s390x) || arch(powerpc64) || arch(powerpc64le)
176176
native = NativeType(bitPattern: UInt64(bitPattern))
177177
#endif
178178
}

build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
]
8282

8383
triple = Configuration.current.target.triple
84-
if triple == "x86_64-linux-gnu" or triple == "armv7-none-linux-androideabi" or triple == "s390x-linux-gnu":
84+
if triple.endswith("-linux-gnu") or triple == "armv7-none-linux-androideabi":
8585
foundation.LDFLAGS += '-lcurl '
8686

8787
if triple == "armv7-none-linux-androideabi":

lib/target.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ def to_string(value):
8585
if value == ArchType.msp430:
8686
return "msp430"
8787
if value == ArchType.ppc:
88-
return "ppc"
88+
return "powerpc"
8989
if value == ArchType.ppc64:
90-
return "ppc64"
90+
return "powerpc64"
9191
if value == ArchType.ppc64le:
92-
return "ppc64le"
92+
return "powerpc64le"
9393
if value == ArchType.r600:
9494
return "r600"
9595
if value == ArchType.amdgcn:
@@ -176,11 +176,11 @@ def from_string(string):
176176
return ArchType.mips64el
177177
if string == "msp430":
178178
return ArchType.msp430
179-
if string == "ppc":
179+
if string == "ppc" or string == "powerpc":
180180
return ArchType.ppc
181-
if string == "ppc64":
181+
if string == "ppc64" or string == "powerpc64":
182182
return ArchType.ppc64
183-
if string == "ppc64le":
183+
if string == "ppc64le" or string == "powerpc64le":
184184
return ArchType.ppc64le
185185
if string == "r600":
186186
return ArchType.r600

0 commit comments

Comments
 (0)