]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
readline: add $(FPIC) to LDFLAGS 21455/head
authorAnari Jalakas <anari.jalakas@gmail.com>
Thu, 8 Jan 2026 10:11:47 +0000 (12:11 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 11 Jan 2026 17:49:55 +0000 (18:49 +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>
package/libs/readline/Makefile

index 7962cf6340bba5234468caa97811ac9275f2b1e5..a067a516c601da84c39624aab1a037e706ca44be 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