diff options
author | Ludovic Courtès <[email protected]> | 2024-11-18 09:58:23 +0100 |
---|---|---|
committer | Ludovic Courtès <[email protected]> | 2024-11-18 10:58:41 +0100 |
commit | e526b8b11debb184929abd013b7d589c9db245fa (patch) | |
tree | 5d8d58d02d7536502994ae13f9e696fd32821677 /gnu/packages/patches | |
parent | b0416b8503e38746717a2d1167f9d1410634981e (diff) |
gnu: u-boot-tools: Fix segfault while running tests.
Fixes <https://issues.guix.gnu.org/74270>.
* gnu/packages/patches/u-boot-calloc-visibility.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/bootloaders.scm (u-boot): Use it.
Reported-by: Jean-Francois GUILLAUME <[email protected]>
Reported-by: Christopher Howard <[email protected]>
Change-Id: Id0023e17367a80a0d1abd4a80b7d8e3a0c3cc5bc
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/u-boot-calloc-visibility.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/packages/patches/u-boot-calloc-visibility.patch b/gnu/packages/patches/u-boot-calloc-visibility.patch new file mode 100644 index 0000000000..93c52ff709 --- /dev/null +++ b/gnu/packages/patches/u-boot-calloc-visibility.patch @@ -0,0 +1,18 @@ +Arrange so that LLVM's shared object doesn't end up using 'calloc' from +U-Boot's 'malloc_simple.c' when it's initialized. + + https://issues.guix.gnu.org/74270 + +diff --git a/common/malloc_simple.c b/common/malloc_simple.c +index 5a8ec538f8..4f5e350a3c 100644 +--- a/common/malloc_simple.c ++++ b/common/malloc_simple.c +@@ -64,6 +64,8 @@ void *memalign_simple(size_t align, size_t bytes) + } + + #if CONFIG_IS_ENABLED(SYS_MALLOC_SIMPLE) ++void *calloc(size_t nmemb, size_t elem_size) ++ __attribute__ ((visibility ("hidden"))); + void *calloc(size_t nmemb, size_t elem_size) + { + size_t size = nmemb * elem_size; |