This is an automated email from the git hooks/post-receive script. guix_mirror_bot pushed a commit to branch core-packages-team in repository guix.
The following commit(s) were added to refs/heads/core-packages-team by this push: new 92c0c406a0 gnu: dtc: Fix tests. 92c0c406a0 is described below commit 92c0c406a024fd10df582bff07a7b59054af39cf Author: Zheng Junjie <z572@z572.online> AuthorDate: Tue Jun 24 00:22:42 2025 +0800 gnu: dtc: Fix tests. * gnu/packages/patches/dtc-fix-test.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/bootloaders.scm (dtc)[source]: Use it. Change-Id: I70d593ff55c677df9aae46ba289a0888bab73f12 --- gnu/local.mk | 1 + gnu/packages/bootloaders.scm | 3 ++- gnu/packages/patches/dtc-fix-test.patch | 38 +++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/gnu/local.mk b/gnu/local.mk index 952b5c6413..3da506487d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1215,6 +1215,7 @@ dist_patch_DATA = \ %D%/packages/patches/dovecot-trees-support-dovecot-2.3.patch \ %D%/packages/patches/dstat-fix-crash-when-specifying-delay.patch \ %D%/packages/patches/dstat-skip-devices-without-io.patch \ + %D%/packages/patches/dtc-fix-test.patch \ %D%/packages/patches/duc-fix-test-sh.patch \ %D%/packages/patches/dune-common-skip-failing-tests.patch \ %D%/packages/patches/durden-shadow-arcan.patch \ diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index ba9d9343c7..7c12fd414c 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -691,7 +691,8 @@ The SUBDIR argument defaults to \"efi/Guix\", as it is also the case for "dtc-" version ".tar.gz")) (sha256 (base32 - "1x609axqpkw5d47pz3ag34ycy3w7y1d0i8q4715hvlmgszmya07j")))) + "1x609axqpkw5d47pz3ag34ycy3w7y1d0i8q4715hvlmgszmya07j")) + (patches (search-patches "dtc-fix-test.patch")))) (build-system meson-build-system) (arguments (list diff --git a/gnu/packages/patches/dtc-fix-test.patch b/gnu/packages/patches/dtc-fix-test.patch new file mode 100644 index 0000000000..c905309e24 --- /dev/null +++ b/gnu/packages/patches/dtc-fix-test.patch @@ -0,0 +1,38 @@ +from https://git.kernel.org/pub/scm/utils/dtc/dtc.git/patch/?id=ce1d8588880aecd7af264e422a16a8b33617cef7 + +From ce1d8588880aecd7af264e422a16a8b33617cef7 Mon Sep 17 00:00:00 2001 +From: David Gibson <da...@gibson.dropbear.id.au> +Date: Wed, 5 Feb 2025 13:39:43 +1100 +Subject: [PATCH] tests: When building .so from -O asm output mark as + non-executable stack + +For certain tests, we take the output from dtc -O asm and build it into +a .so shared library which we then dlopen() for further tests. Because we +don't mark it otherwise, it's treated as requiring an executable stack, +which dlopen() refuses to open as of glibc-2.41. + +Of course, the library is pure data, no code, so it certainly doesn't need +an executable stack. Add the -znoexecstack linker option to avoid the +error. + +Fixes: https://github.com/dgibson/dtc/issues/163 + +Reported-by: Xi Ruoyao <xry...@xry111.site> +Signed-off-by: David Gibson <da...@gibson.dropbear.id.a> +--- + tests/run_tests.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/run_tests.sh b/tests/run_tests.sh +index 937b1288..f0b51c04 100755 +--- a/tests/run_tests.sh ++++ b/tests/run_tests.sh +@@ -201,7 +201,7 @@ run_dtc_test () { + } + + asm_to_so () { +- $CC -shared -o $1.test.so "$SRCDIR/data.S" $1.test.s ++ $CC -shared -Wl,-znoexecstack -o $1.test.so "$SRCDIR/data.S" $1.test.s + } + + asm_to_so_test () {