Skip to content

Commit 81fcdbc

Browse files
committed
Patch libblst to overcome duplicate symbol definition problem
1 parent a704b93 commit 81fcdbc

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

overlays/crypto/libblst.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ stdenv.mkDerivation rec {
66

77
inherit src;
88

9+
patches = [ ./libblst.patch ];
10+
911
# note on -D__BLST_PORTABLE__, this should allow us to have MULX, and similar
1012
# stuff run-time detected, and as such blst built on newer hardware should still
1113
# work on older. Notably Intel before Broadwell, and AMD before Ryzen, do not

overlays/crypto/libblst.patch

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/src/cpuid.c b/src/cpuid.c
2+
index a1a01d4..bbba87e 100644
3+
--- a/src/cpuid.c
4+
+++ b/src/cpuid.c
5+
@@ -5,9 +5,9 @@
6+
*/
7+
8+
#if (defined(__GNUC__) || defined(__clang__) || defined(__SUNPRO_C)) && !defined(_WIN32)
9+
-__attribute__((visibility("hidden")))
10+
+__attribute__((visibility("hidden"), common))
11+
#endif
12+
-int __blst_platform_cap = 0;
13+
+int __blst_platform_cap;
14+
15+
#if defined(__x86_64__) || defined(__x86_64) || (defined(_M_X64) && !defined(_M_ARM64EC))
16+

0 commit comments

Comments
 (0)