package/lmbench: bump version
PATCH 1/1 package/lmbench: bump version
Removed patches 0005-0012 which are included in this bump.
Added patches 0005-0007 to fix build errors with older toolchains as detected by the Gitlab pipelines.
Fixes:
https://autobuild.buildroot.net/results/f9b/f9b22be910361f0a9f020831c6e960cbf21289da/
Added build fix for sparc and disable the package for or1k to fix build errors introduced by this version bump with upstream commit
https://github.com/intel/lmbench/commit/b42a669a4c5a41606440b67c5c434b981801daed
sparc:
/builds/bkuhls/buildroot/br-test-pkg/bootlin-sparc-uclibc/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/14.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld:
/tmp/ccuY4OLe.o: in function `pingpong_cas':
lat_mem_pingpong.c:(.text+0xb4):
undefined reference to `__atomic_compare_exchange_4'
or1k:lat_mem_pingpong.c: Assembler messages:
lat_mem_pingpong.c:130: Error: unrecognized instruction `nop'
bw_mem64d.c: Assembler messages:
bw_mem64d.c:154: Error: unrecognized instruction `nop'
---
Gitlab pipelines passed:
https://gitlab.com/bkuhls/buildroot/-/commits/9225eeaadd868d25e15d0a2eb88a0081d9e3337e
...build-make-it-possible-to-set-LDLIBS.patch | 31 --- ...src-lat_sig.c-fix-build-with-gcc-9.x.patch | 48 +++++ ...-Add-signum-param-to-signal-handlers.patch | 131 ------------- ...-lat_usleep.c-fix-build-with-gcc-9.x.patch | 35 ++++ ...7-scripts-build-int-return-type-main.patch | 177 ------------------ ...src-memsize.c-fix-build-with-gcc-9.x.patch | 35 ++++ .../0008-Fixup-function-declarations.patch | 117 ------------ .../0009-src-lat_sig.c-fix-build.patch | 49 ----- .../0010-src-memsize.c-fix-build.patch | 34 ---- .../0011-src-lat_unix.c-fix-build.patch | 34 ---- .../0012-src-lat_usleep.c-fix-build.patch | 34 ---- package/lmbench/Config.in | 2 + package/lmbench/lmbench.hash | 2 +- package/lmbench/lmbench.mk | 7 +- 14 files changed, 127 insertions(+), 609 deletions(-) delete mode 100644 package/lmbench/0005-scripts-build-make-it-possible-to-set-LDLIBS.patch create mode 100644 package/lmbench/0005-src-lat_sig.c-fix-build-with-gcc-9.x.patch delete mode 100644 package/lmbench/0006-Add-signum-param-to-signal-handlers.patch create mode 100644 package/lmbench/0006-src-lat_usleep.c-fix-build-with-gcc-9.x.patch delete mode 100644 package/lmbench/0007-scripts-build-int-return-type-main.patch create mode 100644 package/lmbench/0007-src-memsize.c-fix-build-with-gcc-9.x.patch delete mode 100644 package/lmbench/0008-Fixup-function-declarations.patch delete mode 100644 package/lmbench/0009-src-lat_sig.c-fix-build.patch delete mode 100644 package/lmbench/0010-src-memsize.c-fix-build.patch delete mode 100644 package/lmbench/0011-src-lat_unix.c-fix-build.patch delete mode 100644 package/lmbench/0012-src-lat_usleep.c-fix-build.patch
package/lmbench/0005-scripts-build-make-it-possible-to-set-LDLIBS.patch deleted +0 -31
@@ -1,31 +0,0 @@ -From 2c7ff6989bc6161d8a2cc823d3aa7c9cb1deca80 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <[email protected]> -Date: Wed, 4 Dec 2024 22:59:31 +0100 -Subject: [PATCH] scripts/build: make it possible to set LDLIBS - -LDLIBS is currently unconditionnally set to '-lm', but doesn't allow -the user to provide additional libraries to link with. - -Upstream: https://github.com/intel/lmbench/pull/44 - -Signed-off-by: Thomas Petazzoni <[email protected]> ---- - scripts/build | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/scripts/build b/scripts/build -index 60b755c..4820d80 100755 ---- a/scripts/build -+++ b/scripts/build -@@ -18,7 +18,7 @@ done - - trap 'rm -f ${BASE}$$.s ${BASE}$$.c ${BASE}$$.o ${BASE}$$; exit 1' 1 2 15 - --LDLIBS="-lm" -+LDLIBS="${LDLIBS} -lm" - - # check for HP-UX's ANSI compiler - echo "main(int ac, char *av[]) { int i; }" > ${BASE}$$.c --- -2.47.0 -
package/lmbench/0005-src-lat_sig.c-fix-build-with-gcc-9.x.patch new file +48 -0
48 lines not on this page · raw message
package/lmbench/0006-Add-signum-param-to-signal-handlers.patch deleted +0 -131
131 lines not on this page · raw message
package/lmbench/0006-src-lat_usleep.c-fix-build-with-gcc-9.x.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 5e120b740857d6b58036af1a5530d2d817ee32b9 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +Date: Sat, 20 Jun 2026 14:36:01 +0200 +Subject: [PATCH] src/lat_usleep.c: fix build with gcc 9.x +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +lat_usleep.c: In function ‘interval’: +lat_usleep.c:102:1: error: parameter name omitted + interval(int) + +Upstream: https://github.com/intel/lmbench/pull/60 + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + src/lat_usleep.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/lat_usleep.c b/src/lat_usleep.c +index 842ad06..0e17a46 100755 +--- a/src/lat_usleep.c ++++ b/src/lat_usleep.c +@@ -99,7 +99,7 @@ bench_pselect(iter_t iterations, void *cookie) + #endif /* _POSIX_SELECT */ + + void +-interval(int) ++interval(__attribute__((unused)) int unused) + { + if (++caught == n) { + caught = 0; +-- +2.47.3 +
package/lmbench/0007-scripts-build-int-return-type-main.patch deleted +0 -177
177 lines not on this page · raw message
package/lmbench/0007-src-memsize.c-fix-build-with-gcc-9.x.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 555185f6321aba2b82fab5a40c20dda45da58fe1 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +Date: Sat, 20 Jun 2026 14:36:36 +0200 +Subject: [PATCH] src/memsize.c: fix build with gcc 9.x +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +memsize.c: In function ‘gotalarm’: +memsize.c:154:1: error: parameter name omitted + gotalarm(int) + +Upstream: https://github.com/intel/lmbench/pull/60 + +Signed-off-by: Bernd Kuhls <[email protected]> +--- + src/memsize.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/memsize.c b/src/memsize.c +index 902132a..3be8a7a 100644 +--- a/src/memsize.c ++++ b/src/memsize.c +@@ -151,7 +151,7 @@ test_malloc(size_t size) + } + + void +-gotalarm(int) ++gotalarm(__attribute__((unused)) int unused) + { + alarm_triggered = 1; + } +-- +2.47.3 +
package/lmbench/0008-Fixup-function-declarations.patch deleted +0 -117
117 lines not on this page · raw message
package/lmbench/0009-src-lat_sig.c-fix-build.patch deleted +0 -49
49 lines not on this page · raw message
package/lmbench/0010-src-memsize.c-fix-build.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 7dad44effa3e3456bede6c5c2325bfdf4dec94d3 Mon Sep 17 00:00:00 2001 -From: Bernd Kuhls <[email protected]> -Date: Fri, 5 Dec 2025 18:01:15 +0100 -Subject: [PATCH] src/memsize.c: fix build - -memsize.c:167:23: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types] - 167 | sa.sa_handler = gotalarm; - | ^ -memsize.c:154:1: note: 'gotalarm' declared here - 154 | gotalarm() - -Upstream: https://github.com/intel/lmbench/pull/43 - -Signed-off-by: Bernd Kuhls <[email protected]> ---- - src/memsize.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/memsize.c b/src/memsize.c -index e1d05be..902132a 100644 ---- a/src/memsize.c -+++ b/src/memsize.c -@@ -151,7 +151,7 @@ test_malloc(size_t size) - } - - void --gotalarm() -+gotalarm(int) - { - alarm_triggered = 1; - } --- -2.47.3 -
package/lmbench/0011-src-lat_unix.c-fix-build.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 88bb985d400ccaddf1a61fba1aa0602c3506a047 Mon Sep 17 00:00:00 2001 -From: Bernd Kuhls <[email protected]> -Date: Fri, 5 Dec 2025 18:02:10 +0100 -Subject: [PATCH] src/lat_unix.c: fix build - -lat_unix.c:85:17: error: too many arguments to function 'exit'; expected 0, have 1 - 85 | exit(1); - | ^~~~ ~ -lat_unix.c:74:17: note: declared here - 74 | void exit(); - -Upstream: https://github.com/intel/lmbench/pull/43 - -Signed-off-by: Bernd Kuhls <[email protected]> ---- - src/lat_unix.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/lat_unix.c b/src/lat_unix.c -index 1e321f8..9a062c1 100644 ---- a/src/lat_unix.c -+++ b/src/lat_unix.c -@@ -71,7 +71,7 @@ void - initialize(iter_t iterations, void* cookie) - { - struct _state* pState = (struct _state*)cookie; -- void exit(); -+ void exit(int); - - if (iterations) return; - --- -2.47.3 -
package/lmbench/0012-src-lat_usleep.c-fix-build.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From 3a57a2d54631df15d876147cf738d4ea033645a8 Mon Sep 17 00:00:00 2001 -From: Bernd Kuhls <[email protected]> -Date: Fri, 5 Dec 2025 18:04:07 +0100 -Subject: [PATCH] src/lat_usleep.c: fix build - -lat_usleep.c:125:19: error: assignment to '__sighandler_t' {aka 'void (*)(int)'} from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types] - 125 | sa.sa_handler = interval; - | ^ -lat_usleep.c:102:1: note: 'interval' declared here - 102 | interval() - -Upstream: https://github.com/intel/lmbench/pull/43 - -Signed-off-by: Bernd Kuhls <[email protected]> ---- - src/lat_usleep.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/lat_usleep.c b/src/lat_usleep.c -index d18d0c8..842ad06 100755 ---- a/src/lat_usleep.c -+++ b/src/lat_usleep.c -@@ -99,7 +99,7 @@ bench_pselect(iter_t iterations, void *cookie) - #endif /* _POSIX_SELECT */ - - void --interval() -+interval(int) - { - if (++caught == n) { - caught = 0; --- -2.47.3 -
package/lmbench/Config.in +2 -0
@@ -2,6 +2,7 @@ config BR2_PACKAGE_LMBENCH bool "lmbench" depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS # libtirpc depends on BR2_USE_MMU # fork() + depends on !BR2_or1k # nop select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC help LMbench is a suite of simple, portable,
@@ -11,4 +12,5 @@ config BR2_PACKAGE_LMBENCH comment "lmbench needs a toolchain w/ threads" depends on BR2_USE_MMU + depends on !BR2_or1k depends on !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC)
package/lmbench/lmbench.hash +1 -1
@@ -1,4 +1,4 @@ # Locally computed: -sha256 920ab1fee83d7a33d41e040c067dfec2ed2362a5c32e09e509c7a6501c33b7b4 lmbench-8b3ddfa52ee4a886abe5af4550f404142966eb88.tar.gz +sha256 7769d4758dcbdfb54b443b2e44d65bd0b6c47d49efa87380d83fd12d5ad36f76 lmbench-a33716428dc2e717ce3e7dfce767302583eb8fdc.tar.gz sha256 91df39d1816bfb17a4dda2d3d2c83b1f6f2d38d53e53e41e8f97ad5ac46a0cad COPYING sha256 3be7a155efa448db90071a95fbf81796f8f90edf9204f0463cfd23402dc90a72 COPYING-2
package/lmbench/lmbench.mk +6 -1
@@ -4,7 +4,7 @@ # ################################################################################ -LMBENCH_VERSION = 8b3ddfa52ee4a886abe5af4550f404142966eb88 +LMBENCH_VERSION = a33716428dc2e717ce3e7dfce767302583eb8fdc LMBENCH_SITE = $(call github,intel,lmbench,$(LMBENCH_VERSION)) LMBENCH_LICENSE = lmbench license (based on GPL-2.0) LMBENCH_LICENSE_FILES = COPYING COPYING-2
@@ -21,6 +21,11 @@ ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_101915),y) LMBENCH_CFLAGS += -O0 endif +# Uses __atomic_compare_exchange_4 +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +LMBENCH_LDLIBS += -latomic +endif + LMBENCH_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK define LMBENCH_CONFIGURE_CMDS
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello,
Quoted 7 lines · Bernd Kuhls
Removed patches 0005-0012 which are included in this bump.
Added patches 0005-0007 to fix build errors with older toolchains as detected by the Gitlab pipelines.
Fixes:
https://autobuild.buildroot.net/results/f9b/f9b22be910361f0a9f020831c6e960cbf21289da/
Since when does the build issue exists? Do we need to backport this version bump to some LTS branches?
If the problem is solved thanks to your "unused" parameters patches, why aren't those patches added separately from the version bump?
Quoted 6 lines
or1k:
lat_mem_pingpong.c: Assembler messages:
lat_mem_pingpong.c:130: Error: unrecognized instruction `nop'
bw_mem64d.c: Assembler messages:
bw_mem64d.c:154: Error: unrecognized instruction `nop'
To solve this, I think (but I am not 100% sure), we could use:
__asm__ __volatile__("": : :"memory")
which is how barrier() is defined in the kernel, to avoid compiler-level optimizations.
Quoted 13 lines
package/lmbench/0005-src-lat_sig.c-fix-build-with-gcc-9.x.patch new file +7
-0@@ -0,0 +1,48 @@ +From d4ba47cef388acb3a91eb39de4d9329a3810f140 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +Date: Sat, 20 Jun 2026 14:35:32 +0200 +Subject: [PATCH] src/lat_sig.c: fix build with gcc 9.x +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit
package/lmbench/0005-src-lat_sig.c-fix-build-with-gcc-9.x.patch line 17
Quoted 10 lines
package/lmbench/0005-src-lat_sig.c-fix-build-with-gcc-9.x.patch new file +10
-0+ +lat_sig.c: In function ‘handler’: +lat_sig.c:23:1: error: parameter name omitted + void handler(int) { } + +lat_sig.c: In function ‘prot’: +lat_sig.c:72:1: error: parameter name omitted + prot(int) { + +Upstream: https://github.com/intel/lmbench/pull/60
I think you got some useful feedback on this PR, can you follow-up?
Thanks a lot!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot