Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Apple Silicon build issues #1

Open
lhoward opened this issue Jun 28, 2023 · 0 comments
Open

Apple Silicon build issues #1

lhoward opened this issue Jun 28, 2023 · 0 comments

Comments

@lhoward
Copy link

lhoward commented Jun 28, 2023

No Float80 on ARM.

diff --git a/Sources/GfxMath/FloatingPointGenericMath.swift b/Sources/GfxMath/FloatingPointGenericMath.swift
index 4987ef2..4c32a81 100644
--- a/Sources/GfxMath/FloatingPointGenericMath.swift
+++ b/Sources/GfxMath/FloatingPointGenericMath.swift
@@ -10,7 +10,7 @@ public protocol FloatingPointGenericMath : FloatingPoint {
   // ...
 }
 
-#if os(Linux) || os(macOS)
+#if arch(x86_64) && (os(Linux) || os(macOS))
 extension Float80 : FloatingPointGenericMath {
   public static func _log(_ x: Float80) -> Float80 { return log(x) }
   public static func _sin(_ x: Float80) -> Float80 { return sin(x) }
@@ -58,4 +58,4 @@ public func tan<T: FloatingPointGenericMath>(_ x: T) -> T {
 }
 public func pow<T: FloatingPointGenericMath>(_ x: T, _ y: T) -> T {
   return T._pow(x, y)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant