From: Anari Jalakas Date: Fri, 3 Jul 2026 09:10:02 +0000 (+0300) Subject: elfutils: add $(FPIC) to LDFLAGS X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F24051%2Fhead;p=thirdparty%2Fopenwrt.git 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 --- 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/