For some reason, current coreutils version installed on x86 macOS via homebrew
have a bug, where at least the cc1 binary from gcc gets corrupted during install
to the staging dir.
Using the install utility from tools/coreutils fixes this
Signed-off-by: Felix Fietkau <nbd@nbd.name>
HOST_BUILD_PARALLEL := 1
-BUILD_PROGRAMS = date readlink touch ln chown
+BUILD_PROGRAMS = date readlink touch ln chown ginstall
include $(INCLUDE_DIR)/host-build.mk
define Host/Install
$(INSTALL_DIR) $(1)/bin
- $(CP) $(patsubst %,$(HOST_BUILD_DIR)/%,$(BUILD_BINS)) $(1)/bin/
+ $(INSTALL_BIN) $(patsubst %,$(HOST_BUILD_DIR)/%,$(BUILD_BINS)) $(1)/bin/
+ ln -sf ginstall $(1)/bin/install
endef
$(eval $(call HostBuild))