|
30 | 30 | overrideUnikernel = finalAttrs: previousAttrs: { |
31 | 31 | buildInputs = previousAttrs.buildInputs or [ ] ++ [ |
32 | 32 | # Some targets, such as hvt, need static GMP (or MPIR) |
33 | | - ( |
34 | | - (pkgsStatic.gmp.override { |
35 | | - # This compiles GMP with a GCC compiled with some flag implying --disable-tls |
36 | | - # Disabling or rather emulating TLS (Thread-Local Storage) |
37 | | - # is still required as of solo5-hvt-0.9.3 when compiling with OCaml-4 |
38 | | - # to avoid a crash at startup in __gmpn_cpuvec_init at an instruction mov %fs:0x28,%r12 |
39 | | - # accessing %fs (the address of the current thread's user-space thread structure): |
40 | | - # |
41 | | - # solo5-hvt-debug --dumpcore=dump --mem=512 --net:service=tap-unikernel -- \ |
42 | | - # $(nix -L build --print-out-paths --no-link -f. dnsvizor.hvt)/dnsvizor.hvt |
43 | | - # |
44 | | - # Solo5: trap: type=#PF ec=0x0 rip=0x466a86 rsp=0x1ffffc10 rflags=0x10002 |
45 | | - # Solo5: trap: cr2=0x28 |
46 | | - # Solo5: ABORT: cpu_x86_64.c:181: Fatal trap |
47 | | - stdenv = overrideCC pkgsStatic.stdenv pkgsStatic.stdenv.cc.cc; |
48 | | - }).overrideAttrs |
49 | | - (prevAttrs: { |
50 | | - # This is to support cxx = true which is not necessary for DNSvizor, |
51 | | - # but it's pkgs.gmp's default on most platforms. |
52 | | - depsBuildBuild = [ |
53 | | - pkgsStatic.stdenv.cc |
54 | | - pkgsStatic.binutils |
55 | | - ]; |
56 | | - }) |
57 | | - ) |
| 33 | + (pkgsStatic.gmp.override { |
| 34 | + # This compiles GMP with a GCC compiled with some flag implying --disable-tls |
| 35 | + # Disabling or rather emulating TLS (Thread-Local Storage) |
| 36 | + # is still required as of solo5-hvt-0.9.3 when compiling with OCaml-4 |
| 37 | + # to avoid a crash at startup in __gmpn_cpuvec_init at an instruction mov %fs:0x28,%r12 |
| 38 | + # accessing %fs (the address of the current thread's user-space thread structure): |
| 39 | + # |
| 40 | + # solo5-hvt-debug --dumpcore=dump --mem=512 --net:service=tap-unikernel -- \ |
| 41 | + # $(nix -L build --print-out-paths --no-link -f. dnsvizor.hvt)/dnsvizor.hvt |
| 42 | + # |
| 43 | + # Solo5: trap: type=#PF ec=0x0 rip=0x466a86 rsp=0x1ffffc10 rflags=0x10002 |
| 44 | + # Solo5: trap: cr2=0x28 |
| 45 | + # Solo5: ABORT: cpu_x86_64.c:181: Fatal trap |
| 46 | + stdenv = overrideCC pkgsStatic.stdenv pkgsStatic.stdenv.cc.cc; |
| 47 | + # Can be supported by adding pkgsStatic.stdenv.{cc,binutils} to depsBuildBuild |
| 48 | + # but DNSvizor does not need it. |
| 49 | + cxx = false; |
| 50 | + }) |
58 | 51 | ]; |
59 | 52 | }; |
60 | 53 | query = { |
|
0 commit comments