]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
readline: add $(FPIC) to LDFLAGS
authorAnari Jalakas <anari.jalakas@gmail.com>
Thu, 8 Jan 2026 10:11:47 +0000 (12:11 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 12 Jan 2026 23:23:38 +0000 (00:23 +0100)
Ensure -fPIC is passed during the linking stage to fix LTO build
failures (relocation errors) on MIPS and other architectures.

Fixes: #20436
Signed-off-by: Anari Jalakas <anari.jalakas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21455
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 4ff0f496a4204b01991bcc804217da9fc2e8bb49)

package/libs/readline/Makefile

index 70e96699ee38b674d5920cf83366ab8730c64f22..c332bf6554bfbf0028551c3d5d9d4d0ce7593c69 100644 (file)
@@ -57,7 +57,10 @@ CONFIGURE_VARS += \
        bash_cv_termcap_lib=libncursesw
 
 TARGET_CFLAGS += $(FPIC)
-HOST_CFLAGS += $(FPIC)
+TARGET_LDFLAGS += $(FPIC)
+
+HOST_CFLAGS += $(HOST_FPIC)
+HOST_LDFLAGS += $(HOST_FPIC)
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/include