2018-03-16 12:59:24 -04:00
|
|
|
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)"
|
2018-03-16 13:37:24 -04:00
|
|
|
$(error $(CROSS)gcc does not exist - can not build)
|
2018-03-16 12:59:24 -04:00
|
|
|
endif
|
|
|
|
|
|
|
|
# The cross compiler has already been built, so the musl-cross target
|
|
|
|
# is a NOP.
|
2018-05-02 11:38:39 -04:00
|
|
|
#musl-cross.intermediate:
|
2017-01-31 12:45:42 -05:00
|
|
|
|
2018-05-02 14:30:58 -04:00
|
|
|
musl-cross_dir := musl-cross-ext
|
|
|
|
$(build)/$(musl-cross_dir)/.build:
|
|
|
|
mkdir -p $(dir $@)
|
|
|
|
touch $@
|
|
|
|
|
2018-03-16 12:59:24 -04:00
|
|
|
else
|
|
|
|
|
|
|
|
# Force a full build of the cross compiler
|
|
|
|
|
|
|
|
modules-y += musl-cross
|
2019-10-29 13:15:56 +01:00
|
|
|
musl-cross_version := 81d563e
|
|
|
|
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 := 6362751b2442dc273c0889e5ef3ce6306a38b9c415cbe8cb4cfe3b8c6d776e96
|
2017-01-31 12:45:42 -05:00
|
|
|
|
2019-10-29 13:26:23 +01:00
|
|
|
CROSS_TOP := crossgcc/x86_64-linux-musl/bin/x86_64-linux-musl-
|
2018-05-02 11:38:39 -04:00
|
|
|
CROSS := $(build)/../$(CROSS_TOP)
|
|
|
|
musl-cross_output := ../../$(CROSS_TOP)gcc
|
2018-03-16 15:18:13 -04:00
|
|
|
|
2017-01-31 12:45:42 -05:00
|
|
|
musl-cross_configure := \
|
2017-02-28 15:54:49 -05:00
|
|
|
/bin/echo -e > Makefile \
|
2017-01-31 12:45:42 -05:00
|
|
|
'$(musl-cross_output):\n\tCC_BASE_PREFIX="$(pwd)/crossgcc" ./build.sh'
|
|
|
|
|
2018-03-16 12:59:24 -04:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2017-01-31 12:45:42 -05:00
|
|
|
musl-cross_target :=
|
|
|
|
|
2018-03-16 12:59:24 -04:00
|
|
|
endif
|