summaryrefslogtreecommitdiff
path: root/toolchain/toolchain-wrapper.mk
diff options
context:
space:
mode:
authorJérôme Pouiller <jezz@sysmic.org>2016-09-28 10:00:56 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-10-24 23:02:33 +0200
commit8087b02bdf42f0caa434ef1faa1fa124b1cbb1a1 (patch)
treecf8ff91ae8882e998fb325fab0f57b40d71f086e /toolchain/toolchain-wrapper.mk
parentb976195d995ecd2d82c5cf76af2e4f0ef8521133 (diff)
toolchain/wrapper: fix 'reinstall'
toolchain-wrapper was not reinstalled. So rules toolchain-external-reinstall, gcc-initial-reinstall, gcc-final-reinstall didn't work as expected. In add, normalize variable name: s/TOOLCHAIN_BUILD_WRAPPER/TOOLCHAIN_WRAPPER_BUILD/ Signed-off-by: Jérôme Pouiller <jezz@sysmic.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'toolchain/toolchain-wrapper.mk')
-rw-r--r--toolchain/toolchain-wrapper.mk11
1 files changed, 7 insertions, 4 deletions
diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk
index af39071cf..e7aa5fb82 100644
--- a/toolchain/toolchain-wrapper.mk
+++ b/toolchain/toolchain-wrapper.mk
@@ -30,11 +30,14 @@ ifeq ($(BR2_CCACHE_USE_BASEDIR),y)
TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_BASEDIR='"$(BASE_DIR)"'
endif
-# For simplicity, build directly into the install location
-define TOOLCHAIN_BUILD_WRAPPER
- $(Q)mkdir -p $(HOST_DIR)/usr/bin
+define TOOLCHAIN_WRAPPER_BUILD
$(HOSTCC) $(HOST_CFLAGS) $(TOOLCHAIN_WRAPPER_ARGS) \
-s -Wl,--hash-style=$(TOOLCHAIN_WRAPPER_HASH_STYLE) \
toolchain/toolchain-wrapper.c \
- -o $(HOST_DIR)/usr/bin/toolchain-wrapper
+ -o $(@D)/toolchain-wrapper
+endef
+
+define TOOLCHAIN_WRAPPER_INSTALL
+ $(INSTALL) -D -m 0755 $(@D)/toolchain-wrapper \
+ $(HOST_DIR)/usr/bin/toolchain-wrapper
endef