Skip to content

Commit

Permalink
Add patch for Hashtree library, which fixes linking warning
Browse files Browse the repository at this point in the history
  • Loading branch information
aleasims committed May 27, 2024
1 parent e39ddf5 commit 748620c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions nix/hashtree/hashtree-execstack-fix.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/src/sha256_shani.S b/src/sha256_shani.S
index 6599e02..cabc11f 100644
--- a/src/sha256_shani.S
+++ b/src/sha256_shani.S
@@ -973,5 +973,9 @@ hashtree_sha256_shani_x2:
movdqa xmm15, [rsp + 9*16]
#endif
add rsp, frame_size
- ret
+ ret
+#ifdef __linux__
+.size hashtree_sha256_shani_x2,.-hashtree_sha256_shani_x2
+.section .note.GNU-stack,"",@progbits
+#endif
#endif
4 changes: 4 additions & 0 deletions nix/hashtree/hashtree.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ stdenv.mkDerivation rec {
hash = "sha256-DHoFX8mbn4QKGj5Ch6R87swsoqXUXDweGL2KYjRVZEg=";
};

patches = [
./hashtree-execstack-fix.diff
];

outputs = [ "out" ];

env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-no-integrated-as -std=c2x";
Expand Down

0 comments on commit 748620c

Please sign in to comment.