Skip to content

Commit 3a481ae

Browse files
hackpascalrobimarko
authored andcommitted
toolchain: mold: add PKG_NAME to Makefile
In include/host-build.mk, HOST_BUILD_DIR is set by default value: HOST_BUILD_DIR ?= $(BUILD_DIR_HOST)/$(PKG_NAME) However the mold package has no PKG_NAME set at all. This means the HOST_BUILD_DIR is identical to $(BUILD_DIR_HOST). In the Host/Prepare stage, by default, the $(HOST_BUILD_DIR) will be deleted at first unconditionally. Since HOST_BUILD_DIR is identical to $(BUILD_DIR_HOST), the entire build_dir/toolchain-* directory will be removed and this will cause build failure. Adding PKG_NAME:=ld.mold can solve this issue. Signed-off-by: Weijie Gao <[email protected]> Link: openwrt/openwrt#18567 Signed-off-by: Robert Marko <[email protected]> (cherry picked from commit b9cb07e)
1 parent 4990124 commit 3a481ae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

toolchain/mold/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# See /LICENSE for more information.
44
#
55
include $(TOPDIR)/rules.mk
6+
7+
PKG_NAME:=ld.mold
8+
69
include $(INCLUDE_DIR)/toolchain-build.mk
710

811
define Host/Configure

0 commit comments

Comments
 (0)