From 1d206717c57f0b3af9e0f9ef7888422836164830 Mon Sep 17 00:00:00 2001 From: Anari Jalakas Date: Fri, 3 Jul 2026 12:10:02 +0300 Subject: [PATCH] elfutils: add $(FPIC) to LDFLAGS Ensure -fPIC is passed during the linking stage to fix LTO build failures (relocation errors) on MIPS and other architectures. Signed-off-by: Anari Jalakas Link: https://github.com/openwrt/openwrt/pull/24051 Signed-off-by: Jonas Jelonek --- package/libs/elfutils/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile index 030392b54e8..0da37c763da 100644 --- a/package/libs/elfutils/Makefile +++ b/package/libs/elfutils/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=elfutils PKG_VERSION:=0.195 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION) \ @@ -88,6 +88,8 @@ TARGET_CFLAGS += \ -Wno-format-nonliteral \ -Wno-error=use-after-free +TARGET_LDFLAGS += $(FPIC) + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/ -- 2.47.3