diff options
| author | Weijie Gao | 2025-04-22 18:15:09 +0000 |
|---|---|---|
| committer | Robert Marko | 2025-04-23 10:22:58 +0000 |
| commit | 3a481ae21bdc504f7f0325151ee0cb4f25dfd2cd (patch) | |
| tree | e90acfb318b25b1550682d00a957dc9f0b99ef5c | |
| parent | 49901245e5a958d5f955129006b2481273e71064 (diff) | |
| download | openwrt-3a481ae21bdc504f7f0325151ee0cb4f25dfd2cd.tar.gz | |
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@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18567
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit b9cb07eced1de81b647608ee89a95d925c7c12a8)
| -rw-r--r-- | toolchain/mold/Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
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 |