[openwrt/openwrt] toolchain: mold: add PKG_NAME to Makefile
LEDE Commits
lede-commits at lists.infradead.org
Wed Apr 23 03:19:35 PDT 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b9cb07eced1de81b647608ee89a95d925c7c12a8
commit b9cb07eced1de81b647608ee89a95d925c7c12a8
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Wed Apr 23 02:15:09 2025 +0800
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 <hackpascal at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18567
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
toolchain/mold/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/toolchain/mold/Makefile b/toolchain/mold/Makefile
index a2acba89d3..60361841aa 100644
--- a/toolchain/mold/Makefile
+++ b/toolchain/mold/Makefile
@@ -3,6 +3,9 @@
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ld.mold
+
include $(INCLUDE_DIR)/toolchain-build.mk
define Host/Configure
More information about the lede-commits
mailing list