]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
elfutils: add $(FPIC) to LDFLAGS 24051/head
authorAnari Jalakas <anari.jalakas@gmail.com>
Fri, 3 Jul 2026 09:10:02 +0000 (12:10 +0300)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 6 Jul 2026 13:26:29 +0000 (15:26 +0200)
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 <anari.jalakas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24051
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
package/libs/elfutils/Makefile

index 030392b54e858701a8a723512f73a93f03f30c57..0da37c763dae9cef705d7b9befc3975f970e7c78 100644 (file)
@@ -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/