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