solo5: 0.7.3 -> 0.7.4

authored by Lana Black and committed by ehmry a5cfc0e5 4d44cd61

+2 -55
+2 -4
pkgs/os-specific/solo5/default.nix
··· 2 , pkg-config, qemu, syslinux, util-linux }: 3 4 let 5 - version = "0.7.3"; 6 # list of all theoretically available targets 7 targets = [ 8 "genode" ··· 21 22 src = fetchurl { 23 url = "https://github.com/Solo5/solo5/releases/download/v${version}/solo5-v${version}.tar.gz"; 24 - sha256 = "sha256-8LftT22XzmmWxgYez+BAHDX4HOyl5DrwrpuO2+bqqcY="; 25 }; 26 - 27 - patches = [ ./fix_paths.patch ./test_sleep.patch ]; 28 29 hardeningEnable = [ "pie" ]; 30
··· 2 , pkg-config, qemu, syslinux, util-linux }: 3 4 let 5 + version = "0.7.4"; 6 # list of all theoretically available targets 7 targets = [ 8 "genode" ··· 21 22 src = fetchurl { 23 url = "https://github.com/Solo5/solo5/releases/download/v${version}/solo5-v${version}.tar.gz"; 24 + sha256 = "sha256-ovDdaS2cDufe5gTgi+t2C8waWiRC40/2flLLJlz+NvU="; 25 }; 26 27 hardeningEnable = [ "pie" ]; 28
-29
pkgs/os-specific/solo5/fix_paths.patch
··· 1 - diff --git a/toolchain/cc.in b/toolchain/cc.in 2 - index 337562a..0ec9315 100644 3 - --- a/toolchain/cc.in 4 - +++ b/toolchain/cc.in 5 - @@ -30,9 +30,9 @@ 6 - # symbols. 7 - 8 - prog="$(basename $0)" 9 - -I="$(dirname $0)/../include" 10 - +I="$(realpath $0 | xargs dirname)/../include" 11 - [ ! -d "${I}" ] && echo "$prog: Could not determine include path" 1>&2 && exit 1 12 - -L="$(dirname $0)/../lib/@@CONFIG_TARGET_TRIPLE@@" 13 - +L="$(realpath $0 | xargs dirname)/../lib/@@CONFIG_TARGET_TRIPLE@@" 14 - [ ! -d "${L}" ] && echo "$prog: Could not determine library path" 1>&2 && exit 1 15 - # we can't really tell if 'cc' is called with no input, but work around the 16 - # most obvious cases and stop them from "succeeding" and producing an "a.out" 17 - diff --git a/toolchain/ld.in b/toolchain/ld.in 18 - index 01dffa8..13dca2c 100644 19 - --- a/toolchain/ld.in 20 - +++ b/toolchain/ld.in 21 - @@ -28,7 +28,7 @@ 22 - # linking a unikernel. No default for ABI is provided, as it is expected that a 23 - # caller directly using 'ld' knows what they are doing. 24 - 25 - -L="$(dirname $0)/../lib/@@CONFIG_TARGET_TRIPLE@@" 26 - +L="$(realpath $0 | xargs dirname)/../lib/@@CONFIG_TARGET_TRIPLE@@" 27 - [ ! -d "${L}" ] && echo "$0: Could not determine library path" 1>&2 && exit 1 28 - # ld accepts -z solo5-abi=ABI, but does not provide a default ABI 29 - # this is intentional
···
-22
pkgs/os-specific/solo5/test_sleep.patch
··· 1 - diff --git a/tests/test_time/test_time.c b/tests/test_time/test_time.c 2 - index 931500b..cde64ad 100644 3 - --- a/tests/test_time/test_time.c 4 - +++ b/tests/test_time/test_time.c 5 - @@ -110,7 +110,8 @@ int solo5_app_main(const struct solo5_start_info *si __attribute__((unused))) 6 - /* 7 - * Verify that we did not sleep less than requested (see above). 8 - */ 9 - - if (delta < NSEC_PER_SEC) { 10 - + const solo5_time_t slack = 100000000ULL; 11 - + if (delta < NSEC_PER_SEC - slack) { 12 - printf("[%d] ERROR: slept too little (expected at least %llu ns)\n", 13 - iters, (unsigned long long)NSEC_PER_SEC); 14 - failed = true; 15 - @@ -120,7 +121,6 @@ int solo5_app_main(const struct solo5_start_info *si __attribute__((unused))) 16 - * Verify that we did not sleep more than requested, within reason 17 - * (scheduling delays, general inaccuracy of the current timing code). 18 - */ 19 - - const solo5_time_t slack = 100000000ULL; 20 - if (delta > (NSEC_PER_SEC + slack)) { 21 - printf("[%d] ERROR: slept too much (expected at most %llu ns)\n", 22 - iters, (unsigned long long)slack);
···