diff --git a/meta/recipes-devtools/elfutils/elfutils_0.197.bb b/meta/recipes-devtools/elfutils/elfutils_0.197.bb
index 3ae0ec85e82..bccbedb0330 100644
--- a/meta/recipes-devtools/elfutils/elfutils_0.197.bb
+++ b/meta/recipes-devtools/elfutils/elfutils_0.197.bb
@@ -17,7 +17,6 @@ SRC_URI = "https://sourceware.org/elfutils/ftp/${PV}/${BP}.tar.bz2 \
            file://0001-libelf-elf_end.c-check-data_list.data.d.d_buf-before.patch \
            file://ptest.patch \
            file://0001-tests-Makefile.am-compile-test_nlist-with-standard-C.patch \
-           file://0001-config-eu.am-do-not-force-Werror.patch \
            file://0001-tests-run-stackprof-system-.sh-run-stackprof-with-ti.patch \
            "
 SRC_URI:append:libc-musl = " \
@@ -56,7 +55,11 @@ INSANE_SKIP:${PN}-ptest = "debug-deps dev-deps"
 
 do_compile_ptest() {
 	cd ${B}/tests
-	oe_runmake buildtest-TESTS oecheck
+	# config/eu.am forces -Werror; the tests trip warnings with clang and musl,
+	# so pass the configured flags plus -Wno-error, which come after AM_CFLAGS
+	cflags="$(makefile-getvar Makefile CFLAGS) -Wno-error"
+	cxxflags="$(makefile-getvar Makefile CXXFLAGS) -Wno-error"
+	oe_runmake buildtest-TESTS oecheck "CFLAGS=$cflags" "CXXFLAGS=$cxxflags"
 }
 PTEST_PARALLEL_MAKE = ""
 
diff --git a/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch b/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
deleted file mode 100644
index d145c9e820a..00000000000
--- a/meta/recipes-devtools/elfutils/files/0001-config-eu.am-do-not-force-Werror.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 645351e3057b76d9a76495c7e021b3449cd5cae5 Mon Sep 17 00:00:00 2001
-From: Alexander Kanavin <alex@linutronix.de>
-Date: Fri, 22 Nov 2024 12:50:48 +0100
-Subject: [PATCH] config/eu.am: do not force -Werror
-
-This is undesirable when compiler versions may not be the same
-as what upstream is using for their own testing.
-
-Upstream-Status: Inappropriate [oe-core specific]
-Signed-off-by: Alexander Kanavin <alex@linutronix.de>
----
- config/eu.am | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/config/eu.am b/config/eu.am
-index 4ea7251..2b688b3 100644
---- a/config/eu.am
-+++ b/config/eu.am
-@@ -135,7 +135,6 @@ AM_CFLAGS = -Wall -Wshadow -Wformat=2 \
- 	    $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
- 	    $(USE_AFTER_FREE3_WARNING) $(MISSING_PARAMETER_NAME_WARNING) \
- 	    $(DEPRECATED_NON_PROTOTYPE_WARNING) $(FREE_LABELS_WARNING) \
--	    $(if $($(*F)_no_Werror),,-Werror) \
- 	    $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
- 	    $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
- 	    $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
-@@ -145,7 +144,6 @@ AM_CXXFLAGS = -std=c++11 -Wall -Wshadow \
- 	   $(TRAMPOLINES_WARNING) \
- 	   $(LOGICAL_OP_WARNING) $(DUPLICATED_COND_WARNING) \
- 	   $(NULL_DEREFERENCE_WARNING) $(IMPLICIT_FALLTHROUGH_WARNING) \
--	   $(if $($(*F)_no_Werror),,-Werror) \
- 	   $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
- 	   $(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
- 	   $(if $($(*F)_no_Wpacked_not_aligned),$(NO_PACKED_NOT_ALIGNED_WARNING),) \
