| 1 |
|
| 2 |
|
| 3 |
TOOLCHAIN_ARCHES := i386 x64 arm aarch64 riscv ppc64 nds32le |
| 4 |
|
| 5 |
help_toolchain help:: |
| 6 |
@echo |
| 7 |
@echo '*** Toolchain targets ***' |
| 8 |
@echo ' crossgcc - Build coreboot cross-compilers for all platforms' |
| 9 |
@echo ' crossgcc-clean - Remove all built coreboot cross-compilers' |
| 10 |
@echo ' iasl - Build coreboot IASL compiler (built by all cross targets)' |
| 11 |
@echo ' clang - Build coreboot clang compiler' |
| 12 |
@echo ' nasm - Build coreboot nasm' |
| 13 |
@echo ' test-toolchain - Reports if toolchain components are out of date' |
| 14 |
@echo ' crossgcc-ARCH - Build cross-compiler for specific architecture' |
| 15 |
@echo ' ARCH can be "$(subst $(spc),"$(comma) ",$(TOOLCHAIN_ARCHES))"' |
| 16 |
@echo ' Use "make [target] CPUS=#" to build toolchain using multiple cores' |
| 17 |
@echo ' Use "make [target] DEST=some/path" to install toolchain there' |
| 18 |
@echo ' Use "make [target] BUILDGCC_OPTIONS="-m" to get packages from coreboot mirror"' |
| 19 |
@echo |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
crossgcc: clean-for-update |
| 25 |
$(MAKE) -C util/crossgcc all SKIP_CLANG=1 |
| 26 |
|
| 27 |
.PHONY: crossgcc crossgcc-i386 crossgcc-x64 crossgcc-arm crossgcc-aarch64 \ |
| 28 |
crossgcc-riscv crossgcc-power8 crossgcc-clean iasl \ |
| 29 |
clang jenkins-build-toolchain nasm |
| 30 |
|
| 31 |
$(foreach arch,$(TOOLCHAIN_ARCHES),crossgcc-$(arch)): clean-for-update |
| 32 |
$(MAKE) -C util/crossgcc $(patsubst crossgcc-%,build-%,$@) build_iasl |
| 33 |
|
| 34 |
iasl: clean-for-update |
| 35 |
$(MAKE) -C util/crossgcc build_iasl |
| 36 |
|
| 37 |
clang: clean-for-update |
| 38 |
$(MAKE) -C util/crossgcc build_clang |
| 39 |
|
| 40 |
nasm: clean-for-update |
| 41 |
$(MAKE) -C util/crossgcc build_nasm |
| 42 |
|
| 43 |
crossgcc-clean: clean-for-update |
| 44 |
$(MAKE) -C util/crossgcc clean |
| 45 |
|
| 46 |
test-toolchain: |
| 47 |
ifeq ($(COMPILER_OUT_OF_DATE),1) |
| 48 |
echo "The coreboot toolchain is not the current version." |
| 49 |
$(error ) |
| 50 |
else |
| 51 |
echo "The coreboot toolchain is the current version." |
| 52 |
endif |
| 53 |
|
| 54 |
|
| 55 |
jenkins-build-toolchain: BUILDGCC_OPTIONS ?= -y --nocolor |
| 56 |
jenkins-build-toolchain: |
| 57 |
$(MAKE) crossgcc clang KEEP_SOURCES=1 BUILDGCC_OPTIONS='$(BUILDGCC_OPTIONS)' |
| 58 |
PATH=$(if $(DEST),$(DEST)/bin,$(top)/util/crossgcc/xgcc/bin):$$PATH; $(MAKE) what-jenkins-does |
| 59 |
PATH=$(if $(DEST),$(DEST)/bin,$(top)/util/crossgcc/xgcc/bin):$$PATH; $(MAKE) test-toolchain |