tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
unicorn: patch endian.h for aarch64-darwin
Alexandre Iooss
3 years ago
58ca173f
14c1762e
+33
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
unicorn
default.nix
tests_unit_endian_aarch64.patch
+13
pkgs/development/libraries/unicorn/default.nix
···
18
hash = "sha256-D8kwrHo58zksVjB13VtzoVqmz++FRfJ4zI2CT+YeBVE=";
19
};
20
0
0
0
0
0
0
21
nativeBuildInputs = [
22
cmake
23
pkg-config
···
28
buildInputs = lib.optionals stdenv.isDarwin [
29
IOKit
30
];
0
0
0
0
0
0
0
31
32
meta = with lib; {
33
description = "Lightweight multi-platform CPU emulator library";
···
18
hash = "sha256-D8kwrHo58zksVjB13VtzoVqmz++FRfJ4zI2CT+YeBVE=";
19
};
20
21
+
patches = [
22
+
# Fix compilation on aarch64-darwin
23
+
# See https://github.com/unicorn-engine/unicorn/issues/1730
24
+
./tests_unit_endian_aarch64.patch
25
+
];
26
+
27
nativeBuildInputs = [
28
cmake
29
pkg-config
···
34
buildInputs = lib.optionals stdenv.isDarwin [
35
IOKit
36
];
37
+
38
+
cmakeFlags = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
39
+
# Some x86 tests are interrupted by signal 10
40
+
"-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;test_x86"
41
+
];
42
+
43
+
doCheck = true;
44
45
meta = with lib; {
46
description = "Lightweight multi-platform CPU emulator library";
+20
pkgs/development/libraries/unicorn/tests_unit_endian_aarch64.patch
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
diff --git a/tests/unit/endian.h b/tests/unit/endian.h
2
+
index 5bc86308..b455899e 100644
3
+
--- a/tests/unit/endian.h
4
+
+++ b/tests/unit/endian.h
5
+
@@ -54,6 +54,7 @@
6
+
|| defined(_POWER) || defined(__powerpc__) \
7
+
|| defined(__ppc__) || defined(__hpux) || defined(__hppa) \
8
+
|| defined(_MIPSEB) || defined(_POWER) \
9
+
+ || defined(__ARMEB__) || defined(__AARCH64EB__) \
10
+
|| defined(__s390__)
11
+
# define BOOST_BIG_ENDIAN
12
+
# define BOOST_BYTE_ORDER 4321
13
+
@@ -63,6 +64,7 @@
14
+
|| defined(_M_ALPHA) || defined(__amd64) \
15
+
|| defined(__amd64__) || defined(_M_AMD64) \
16
+
|| defined(__x86_64) || defined(__x86_64__) \
17
+
+ || defined(__ARMEL__) || defined(__AARCH64EL__) \
18
+
|| defined(_M_X64) || defined(__bfin__)
19
+
20
+
# define BOOST_LITTLE_ENDIAN