ifeq "$(MUSL_CROSS_ONCE)" "" MUSL_CROSS_ONCE := 1 # Allow the path to the musl-cross directory to be passed on # the environment so that the full path doens't need to be spelled out ifneq "$(MUSL_DIR)" "" CROSS := $(MUSL_DIR)/crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl- endif ifneq "$(CROSS)" "" # check that $(CROSS)gcc exists or else things just won't work ifneq "y" "$(shell [ -x '$(CROSS)gcc' ] && echo y)" $(error $(CROSS)gcc does not exist - can not build) endif # The cross compiler has already been built, so the musl-cross target # is a NOP. musl-cross.intermediate: else # Force a full build of the cross compiler modules-y += musl-cross musl-cross_version := git musl-cross_dir := musl-cross-$(musl-cross_version) musl-cross_repo := https://github.com/GregorR/musl-cross CROSS := $(build)/../crossgcc/x86_64-linux-musl/bin/x86_64-musl-linux- musl-cross_output := $(CROSS)gcc musl-cross_configure := \ /bin/echo -e > Makefile \ '$(musl-cross_output):\n\tCC_BASE_PREFIX="$(pwd)/crossgcc" ./build.sh' endif musl-cross_target := endif