mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 04:57:55 +00:00
44 lines
967 B
Plaintext
44 lines
967 B
Plaintext
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 := git
|
|
musl-cross_dir := musl-cross-$(musl-cross_version)
|
|
musl-cross_repo := https://github.com/GregorR/musl-cross
|
|
|
|
CROSS_TOP := crossgcc/x86_64-linux-musl/bin/x86_64-musl-linux-
|
|
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
|