heads/modules/musl-cross

46 lines
1.1 KiB
Plaintext
Raw Normal View History

ifeq "$(MUSL_CROSS_ONCE)" ""
MUSL_CROSS_ONCE := 1
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:
musl-cross_dir := musl-cross-ext
$(build)/$(musl-cross_dir)/.build:
mkdir -p $(dir $@)
touch $@
else
# Force a full build of the cross compiler
modules-y += musl-cross
musl-cross_version := 1952975
musl-cross_dir := musl-cross
musl-cross_url := https://github.com/GregorR/musl-cross/archive/$(musl-cross_version).tar.gz
musl-cross_tar := musl-cross-$(musl-cross_version).tar.gz
musl-cross_hash := dea10cfe4bfe5f5b131d8f98e65127cf5093477af56054d15563e858dc3b25cb
CROSS_TOP := crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-
CROSS := $(build)/../$(CROSS_TOP)
musl-cross_output := ../../$(CROSS_TOP)gcc
musl-cross_configure := \
/bin/echo -e > Makefile \
'$(musl-cross_output):\n\tCC_BASE_PREFIX="$(pwd)/crossgcc" ./build.sh'
endif
musl-cross_target :=
endif