crossgcc: Update makefile builds
- Only build IASL once for the 'all' targets instead of once for each. - Change the control of what gets built from different targets to variables on the build line. - Clean up and correct the list of phony targets - Don't keep the temporary files around while building all. This takes up a lot of space. If it's desired behavior, add BUILDGCC_OPTIONS=-t on the make command line. - Add comments about CPU= and BUILDGCC_OPTIONS= variables - Add KEEP_SOURCES option Change-Id: I7752974e249f25717b42be25a841c69af84d5c69 Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: http://review.coreboot.org/12300 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
a791fbb0fa
commit
8fe681872b
21
Makefile.inc
21
Makefile.inc
|
@ -442,28 +442,33 @@ gitconfig:
|
||||||
git config remote.origin.push HEAD:refs/for/master
|
git config remote.origin.push HEAD:refs/for/master
|
||||||
(git config --global user.name >/dev/null && git config --global user.email >/dev/null) || (printf 'Please configure your name and email in git:\n\n git config --global user.name "Your Name Comes Here"\n git config --global user.email your.email@example.com\n'; exit 1)
|
(git config --global user.name >/dev/null && git config --global user.email >/dev/null) || (printf 'Please configure your name and email in git:\n\n git config --global user.name "Your Name Comes Here"\n git config --global user.email your.email@example.com\n'; exit 1)
|
||||||
|
|
||||||
crossgcc: crossgcc-i386 crossgcc-x64 crossgcc-arm crossgcc-aarch64 crossgcc-mips crossgcc-riscv
|
# For the toolchain builds, use CPUS=x to use multiple processors to build
|
||||||
|
# use BUILDGCC_OPTIONS= to set any crossgcc command line options
|
||||||
|
# Example: BUILDGCC_OPTIONS='-t' will keep temporary files after build
|
||||||
|
crossgcc:
|
||||||
|
$(MAKE) -C util/crossgcc all_without_gdb SKIP_CLANG=1
|
||||||
|
|
||||||
.PHONY: crossgcc-i386 crossgcc-x64 crossgcc-arm crossgcc-aarch64 crossgcc-mips crossgcc-riscv
|
.PHONY: crossgcc-i386 crossgcc-x64 crossgcc-arm crossgcc-aarch64 crossgcc-mips crossgcc-riscv
|
||||||
crossgcc-i386: clean-for-update
|
crossgcc-i386: clean-for-update
|
||||||
$(MAKE) -C util/crossgcc build-i386-without-gdb
|
$(MAKE) -C util/crossgcc build-i386 SKIP_GDB=1
|
||||||
|
|
||||||
crossgcc-x64: clean-for-update
|
crossgcc-x64: clean-for-update
|
||||||
$(MAKE) -C util/crossgcc build-x64-without-gdb
|
$(MAKE) -C util/crossgcc build-x64 SKIP_GDB=1
|
||||||
|
|
||||||
crossgcc-arm: clean-for-update
|
crossgcc-arm: clean-for-update
|
||||||
$(MAKE) -C util/crossgcc build-armv7a-without-gdb
|
$(MAKE) -C util/crossgcc build-armv7a SKIP_GDB=1
|
||||||
|
|
||||||
crossgcc-aarch64: clean-for-update
|
crossgcc-aarch64: clean-for-update
|
||||||
$(MAKE) -C util/crossgcc build-aarch64-without-gdb
|
$(MAKE) -C util/crossgcc build-aarch64 SKIP_GDB=1
|
||||||
|
|
||||||
crossgcc-mips: clean-for-update
|
crossgcc-mips: clean-for-update
|
||||||
$(MAKE) -C util/crossgcc build-mips-without-gdb
|
$(MAKE) -C util/crossgcc build-mips SKIP_GDB=1
|
||||||
|
|
||||||
crossgcc-riscv: clean-for-update
|
crossgcc-riscv: clean-for-update
|
||||||
$(MAKE) -C util/crossgcc build-riscv-without-gdb
|
$(MAKE) -C util/crossgcc build-riscv SKIP_GDB=1
|
||||||
|
|
||||||
crosstools: crosstools-i386 crosstools-x64 crosstools-arm crosstools-aarch64 crosstools-mips crosstools-riscv
|
crosstools:
|
||||||
|
$(MAKE) -C util/crossgcc all_with_gdb SKIP_CLANG=1
|
||||||
|
|
||||||
.PHONY: crosstools-i386 crosstools-x64 crosstools-arm crosstools-aarch64 crosstools-mips crosstools-riscv
|
.PHONY: crosstools-i386 crosstools-x64 crosstools-arm crosstools-aarch64 crosstools-mips crosstools-riscv
|
||||||
crosstools-i386: clean-for-update
|
crosstools-i386: clean-for-update
|
||||||
|
|
|
@ -1,38 +1,48 @@
|
||||||
# if no architecture is specified, set a default
|
# if no architecture is specified, set a default
|
||||||
BUILD_PLATFORM ?= i386-elf
|
BUILD_PLATFORM ?= i386-elf
|
||||||
|
|
||||||
all:
|
# For the toolchain builds, use CPUS=x to use multiple processors to build
|
||||||
$(MAKE) BUILDGCC_OPTIONS=-t build-i386 build-x64 build-armv7a build-mips build-riscv build-aarch64 \
|
# use KEEP_SOURCES=1 to keep temporary files after the build
|
||||||
|
# use BUILDGCC_OPTIONS= to set any other crossgcc command line options
|
||||||
|
# Example: BUILDGCC_OPTIONS=-c to remove temporary files before build
|
||||||
|
|
||||||
|
all all_with_gdb:
|
||||||
|
$(MAKE) build-i386
|
||||||
|
$(MAKE) SKIP_IASL=1 \
|
||||||
|
build-x64 build-armv7a build-mips build-riscv build-aarch64 \
|
||||||
build_clang
|
build_clang
|
||||||
$(MAKE) clean_tempfiles
|
|
||||||
|
|
||||||
all_without_gdb:
|
all_without_gdb:
|
||||||
$(MAKE) BUILDGCC_OPTIONS=-t build-i386-without-gdb build-x64-without-gdb build-armv7a-without-gdb \
|
$(MAKE) SKIP_GDB=1 build-i386
|
||||||
build-mips-without-gdb build-riscv-without-gdb build-aarch64-without-gdb build_clang
|
$(MAKE) SKIP_IASL=1 SKIP_GDB=1 \
|
||||||
$(MAKE) clean_tempfiles
|
build-x64 build-armv7a build-mips build-riscv build-aarch64 \
|
||||||
|
build_clang
|
||||||
|
|
||||||
build_tools: build_gcc build_iasl build_gdb
|
build_tools: build_gcc build_iasl build_gdb
|
||||||
|
|
||||||
build_tools_without_gdb: build_gcc build_iasl
|
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
### targets to do buildgcc builds
|
### targets to do buildgcc builds
|
||||||
|
|
||||||
build_gcc:
|
build_gcc:
|
||||||
bash ./buildgcc -p $(BUILD_PLATFORM) $(if $(CPUS),-j $(CPUS)) $(BUILDGCC_OPTIONS) \
|
bash ./buildgcc -p $(BUILD_PLATFORM) $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS) \
|
||||||
$(if $(BUILD_LANGUAGES),-l $(BUILD_LANGUAGES))
|
$(if $(BUILD_LANGUAGES),-l $(BUILD_LANGUAGES))
|
||||||
|
|
||||||
build_gdb:
|
build_gdb:
|
||||||
bash ./buildgcc -p $(BUILD_PLATFORM) -P gdb $(if $(CPUS),-j $(CPUS)) $(BUILDGCC_OPTIONS)
|
ifeq ($(SKIP_GDB),)
|
||||||
|
bash ./buildgcc -p $(BUILD_PLATFORM) -P gdb $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS)
|
||||||
|
endif
|
||||||
|
|
||||||
build_iasl:
|
build_iasl:
|
||||||
bash ./buildgcc -P iasl $(if $(CPUS),-j $(CPUS)) $(BUILDGCC_OPTIONS)
|
ifeq ($(SKIP_IASL),)
|
||||||
|
bash ./buildgcc -P iasl $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS)
|
||||||
|
endif
|
||||||
|
|
||||||
build_clang:
|
build_clang:
|
||||||
bash ./buildgcc -P clang $(if $(CPUS),-j $(CPUS)) $(BUILDGCC_OPTIONS)
|
ifeq ($(SKIP_CLANG),)
|
||||||
|
bash ./buildgcc -P clang $(if $(CPUS),-j $(CPUS)) $(if $(KEEP_SOURCES),-t) $(BUILDGCC_OPTIONS)
|
||||||
|
endif
|
||||||
|
|
||||||
###########################################################
|
###########################################################
|
||||||
### Build with GDB ###
|
|
||||||
build-i386:
|
build-i386:
|
||||||
@$(MAKE) build_tools BUILD_PLATFORM=i386-elf
|
@$(MAKE) build_tools BUILD_PLATFORM=i386-elf
|
||||||
|
|
||||||
|
@ -51,26 +61,6 @@ build-mips:
|
||||||
build-riscv:
|
build-riscv:
|
||||||
@$(MAKE) build_tools BUILD_PLATFORM=riscv-elf
|
@$(MAKE) build_tools BUILD_PLATFORM=riscv-elf
|
||||||
|
|
||||||
###########################################################
|
|
||||||
### Build without GDB
|
|
||||||
build-i386-without-gdb:
|
|
||||||
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=i386-elf
|
|
||||||
|
|
||||||
build-x64-without-gdb:
|
|
||||||
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=x86_64-elf
|
|
||||||
|
|
||||||
build-armv7a-without-gdb:
|
|
||||||
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=armv7a-eabi
|
|
||||||
|
|
||||||
build-aarch64-without-gdb:
|
|
||||||
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=aarch64-elf
|
|
||||||
|
|
||||||
build-mips-without-gdb:
|
|
||||||
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=mipsel-elf
|
|
||||||
|
|
||||||
build-riscv-without-gdb:
|
|
||||||
@$(MAKE) build_tools_without_gdb BUILD_PLATFORM=riscv-elf
|
|
||||||
|
|
||||||
clean_tempfiles:
|
clean_tempfiles:
|
||||||
rm -rf build-*
|
rm -rf build-*
|
||||||
rm -rf binutils-* gcc-* gmp-* libelf-* mpc-* mpfr-*
|
rm -rf binutils-* gcc-* gmp-* libelf-* mpc-* mpfr-*
|
||||||
|
@ -85,7 +75,7 @@ clean: clean_tempfiles
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -rf tarballs
|
rm -rf tarballs
|
||||||
|
|
||||||
.PHONY: build_gcc build_iasl build_gdb build_tools build_tools_without_gdb \
|
.PHONY: build_gcc build_iasl build_gdb build_clang \
|
||||||
build-i386-without-gdb build-x64-without-gdb build-armv7a-without-gdb \
|
all all_with_gdb all_without_gdb build_tools \
|
||||||
build-aarch64-without-gdb build-mips-without-gdb build-riscv-without-gdb \
|
build-i386 build-x64 build-armv7a build-aarch64 build-mips build-riscv \
|
||||||
all build clean distclean clean_tempfiles all_without_gdb
|
clean distclean clean_tempfiles
|
||||||
|
|
Loading…
Reference in New Issue