]> git.99rst.org Git - openwrt-packages.git/commitdiff
stress-ng: link libatomic instead of disabling atomics
authorAlexandru Ardelean <redacted>
Fri, 10 Jul 2026 06:24:21 +0000 (09:24 +0300)
committerAlexandru Ardelean <redacted>
Mon, 13 Jul 2026 11:24:42 +0000 (14:24 +0300)
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 <redacted>
utils/stress-ng/Makefile
utils/stress-ng/patches/002-disable-atomics-mips-and-ppc.patch [deleted file]

index 86c4b87b4a022be5a8d43ea6a4ac8cd8eaaa4f0b..b55bdd6ad4d28c61bef04a513c1364da3b16e59f 100644 (file)
@@ -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 (file)
index 75b02a7..0000000
+++ /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) &&     \
git clone https://git.99rst.org/PROJECT