GCC 11 doesn't know about -Wno-error=use-after-free and aborts
compilation.

Fixes: 2748c45d "elfutils: Ignore wrong use-after-free error"
Signed-off-by: Andre Heider <a.hei...@gmail.com>
---
 package/libs/elfutils/Makefile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
index 5204e0847e..e8477ead03 100644
--- a/package/libs/elfutils/Makefile
+++ b/package/libs/elfutils/Makefile
@@ -80,7 +80,15 @@ HOST_CONFIGURE_VARS += \
 CONFIGURE_VARS += \
        ac_cv_search__obstack_free=yes
 
-TARGET_CFLAGS += -D_GNU_SOURCE -Wno-unused-result -Wno-format-nonliteral 
-Wno-error=use-after-free
+TARGET_CFLAGS += \
+       -D_GNU_SOURCE \
+       -Wno-unused-result \
+       -Wno-format-nonliteral
+
+ifneq ($(CONFIG_GCC_USE_VERSION_11),y)
+TARGET_CFLAGS += \
+       -Wno-error=use-after-free
+endif
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include
-- 
2.39.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to