]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/nolibc: error out on linker warnings
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 22 Nov 2025 11:01:58 +0000 (12:01 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Sat, 22 Nov 2025 11:35:12 +0000 (12:35 +0100)
If the linker emits warnings these should abort the build.
Otherwise they will be swallowed by run-tests.sh and not shown.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
tools/testing/selftests/nolibc/run-tests.sh

index e8af1fb505cf3573b4a6b37228dee764fe2e5277..bbe8afbabd3a38f0790234441a44c3650f96e3f0 100755 (executable)
@@ -169,7 +169,7 @@ test_arch() {
        cross_compile=$(realpath "${download_location}gcc-${crosstool_version}-nolibc/${ct_arch}-${ct_abi}/bin/${ct_arch}-${ct_abi}-")
        build_dir="${build_location}/${arch}"
        if [ "$werror" -ne 0 ]; then
-               CFLAGS_EXTRA="$CFLAGS_EXTRA -Werror"
+               CFLAGS_EXTRA="$CFLAGS_EXTRA -Werror -Wl,--fatal-warnings"
        fi
        MAKE=(make -f Makefile.nolibc -j"${nproc}" XARCH="${arch}" CROSS_COMPILE="${cross_compile}" LLVM="${llvm}" O="${build_dir}")