From: Alexandru Ardelean Date: Fri, 10 Jul 2026 06:24:21 +0000 (+0300) Subject: stress-ng: link libatomic instead of disabling atomics X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=199435708a6908d1bd4c464b309b5cbb3a3148e3;p=openwrt-packages.git stress-ng: link libatomic instead of disabling atomics Drop 002-disable-atomics-mips-and-ppc.patch. It papered over link errors for 64-bit atomics on MIPS and PPC, which happen because stress-ng strips -latomic whenever $(CC) matches "musl-gcc" -- as our cross toolchains do. Pass LIB_ATOMIC=-latomic instead; libatomic is already in DEPENDS. Its stress-fractal hunk was in any case dead since upstream 24c30b7fa narrowed the row counter back to int32_t, which MIPS32 and PPC32 increment atomically inline. Signed-off-by: Alexandru Ardelean --- diff --git a/utils/stress-ng/Makefile b/utils/stress-ng/Makefile index 86c4b87b4..b55bdd6ad 100644 --- a/utils/stress-ng/Makefile +++ b/utils/stress-ng/Makefile @@ -40,7 +40,8 @@ the various operating system kernel interfaces. endef MAKE_FLAGS += \ - KERNEL=Linux + KERNEL=Linux \ + LIB_ATOMIC=-latomic define Package/stress-ng/install $(INSTALL_DIR) $(1)/usr/bin diff --git a/utils/stress-ng/patches/002-disable-atomics-mips-and-ppc.patch b/utils/stress-ng/patches/002-disable-atomics-mips-and-ppc.patch deleted file mode 100644 index 75b02a70f..000000000 --- a/utils/stress-ng/patches/002-disable-atomics-mips-and-ppc.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/stress-fractal.c -+++ b/stress-fractal.c -@@ -90,6 +90,10 @@ static void stress_fractal_deinit(void) - } - } - -+#if (defined(STRESS_ARCH_MIPS) || defined(STRESS_ARCH_PPC64) || defined(STRESS_ARCH_PPC)) -+#undef HAVE_ATOMIC_FETCH_ADD -+#endif -+ - /* - * stress_fractal_get_row() - * get next row to be computed, will wrap around. Wrap arounds ---- a/stress-misaligned.c -+++ b/stress-misaligned.c -@@ -53,6 +53,10 @@ - #undef HAVE_ATOMIC - #endif - -+#if (defined(STRESS_ARCH_MIPS) || defined(STRESS_ARCH_PPC64) || defined(STRESS_ARCH_PPC)) -+#undef HAVE_ATOMIC -+#endif -+ - #if defined(HAVE_LIB_RT) && \ - defined(HAVE_TIMER_CREATE) && \ - defined(HAVE_TIMER_DELETE) && \