-
-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fplll and fpylll both assume support for 128-bit floating point numbers (long double), which aarch64-darwin does not have.
- Loading branch information
Showing
5 changed files
with
445 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
pkgs/development/libraries/fplll/0001-disable-long-double-on-aarch64-darwin.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From f83e93b63c8959dc4d944d521fe16ba502dc3ed6 Mon Sep 17 00:00:00 2001 | ||
From: George Huebner <huebnerg3@gmail.com> | ||
Date: Sun, 29 Oct 2023 19:00:03 -0500 | ||
Subject: [PATCH] disable long doubles on aarch64-darwin | ||
|
||
--- | ||
fplll/defs.h | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/fplll/defs.h b/fplll/defs.h | ||
index bfc4158d..0e85dc0f 100644 | ||
--- a/fplll/defs.h | ||
+++ b/fplll/defs.h | ||
@@ -19,7 +19,7 @@ | ||
#ifndef FPLLL_DEFS_H | ||
#define FPLLL_DEFS_H | ||
|
||
-#ifndef __CYGWIN__ | ||
+#if !defined(__CYGWIN__) && !(defined(__APPLE__) && defined(__aarch64__)) | ||
#define FPLLL_WITH_LONG_DOUBLE | ||
#endif | ||
|
||
-- | ||
2.42.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
pkgs/development/python-modules/fpylll/0001-disable-long-double-on-aarch64-darwin.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From 93f491930a219c95ddb6203bc2e7ab1a095217ab Mon Sep 17 00:00:00 2001 | ||
From: George Huebner <huebnerg3@gmail.com> | ||
Date: Fri, 27 Oct 2023 13:50:57 -0500 | ||
Subject: [PATCH] disable long double on aarch64-darwin | ||
|
||
Apple Silicon does not have support for long doubles, so they need to | ||
be disabled. | ||
--- | ||
setup.py | 3 ++- | ||
1 file changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/setup.py b/setup.py | ||
index 274836f..27941c4 100755 | ||
--- a/setup.py | ||
+++ b/setup.py | ||
@@ -2,6 +2,7 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
+import platform | ||
import subprocess | ||
import sys | ||
import io | ||
@@ -195,7 +196,7 @@ class build_ext(_build_ext, object): | ||
# Ideally this would check the fplll headers explicitly for the | ||
# the FPLLL_WITH_LONG_DOUBLE define, but for now it suffices to | ||
# say that long double support is disabled on Cygwin | ||
- return not sys.platform.startswith("cygwin") | ||
+ return not ((sys.platform.startswith("cygwin") or ("macOS" in (_ := platform.platform()) and "arm" in _))) | ||
|
||
|
||
# EXTENSIONS | ||
-- | ||
2.42.0 | ||
|
Oops, something went wrong.