mirror of
https://github.com/openwrt/openwrt.git
synced 2026-11-27 14:41:12 +04:00
include: autotools: remove .la files from host staging
Host builds install libtool archives into staging_dir/host/lib, and libssl.la, libtls.la, libgmpxx.la, libmpfr.la, libmpc.la and libisl.la name their dependencies by absolute path in dependency_libs. A prebuilt staging_dir/host used from another directory, as with scripts/ext-tools.sh or the tools container in the CI of a fork, then fails to link any tool that is rebuilt against them: libtool: error: '/__w/openwrt/openwrt/openwrt/staging_dir/host/lib/libcrypto.la' is not a valid libtool archive The .la files are now deleted after each host install, as they already are for target staging. Consumers link through -L/-l and pkg-config. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Julius Bairaktaris <julius@bairaktaris.de> Signed-off-by: Nick Hainke <vincent@systemli.org> Link: https://github.com/openwrt/openwrt/pull/25361 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
1 parent
5762a3a28c
commit
62e84586e4
1 file changed
+8
@@ -82,6 +82,14 @@ PKG_REMOVE_FILES?=aclocal.m4
|
||||
|
||||
Hooks/InstallDev/Post += libtool_remove_files
|
||||
|
||||
# host .la files name other .la files by absolute path, which breaks
|
||||
# prebuilt tools used from another directory
|
||||
define libtool_remove_files_host
|
||||
$(call libtool_remove_files,$(STAGING_DIR_HOST)/lib)
|
||||
endef
|
||||
|
||||
Hooks/HostInstall/Post += libtool_remove_files_host
|
||||
|
||||
define autoreconf_target
|
||||
$(strip $(call autoreconf, \
|
||||
$(PKG_BUILD_DIR), $(PKG_REMOVE_FILES), \
|
||||
|
||||
Reference in new issue
Block a user