Changeset View
Changeset View
Standalone View
Standalone View
Makefile
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# The user-driven targets are: | # The user-driven targets are: | ||||
# | # | ||||
# universe - *Really* build *everything* (buildworld and | # universe - *Really* build *everything* (buildworld and | ||||
# all kernels on all architectures). Define | # all kernels on all architectures). Define | ||||
# MAKE_JUST_KERNELS to only build kernels, | # MAKE_JUST_KERNELS to only build kernels, | ||||
# MAKE_JUST_WORLDS to only build userland, and/or | # MAKE_JUST_WORLDS to only build userland. | ||||
# MAKE_OBSOLETE_GCC to also build architectures | |||||
# unsupported by clang using in-tree gcc. | |||||
# tinderbox - Same as universe, but presents a list of failed build | # tinderbox - Same as universe, but presents a list of failed build | ||||
# targets and exits with an error if there were any. | # targets and exits with an error if there were any. | ||||
# buildworld - Rebuild *everything*, including glue to help do | # buildworld - Rebuild *everything*, including glue to help do | ||||
# upgrades. | # upgrades. | ||||
# installworld - Install everything built by "buildworld". | # installworld - Install everything built by "buildworld". | ||||
# world - buildworld + installworld, no kernel. | # world - buildworld + installworld, no kernel. | ||||
# buildkernel - Rebuild the kernel and the kernel-modules. | # buildkernel - Rebuild the kernel and the kernel-modules. | ||||
# installkernel - Install the kernel and the kernel-modules. | # installkernel - Install the kernel and the kernel-modules. | ||||
▲ Show 20 Lines • Show All 465 Lines • ▼ Show 20 Lines | |||||
.if make(universe) || make(universe_kernels) || make(tinderbox) || \ | .if make(universe) || make(universe_kernels) || make(tinderbox) || \ | ||||
make(targets) || make(universe-toolchain) | make(targets) || make(universe-toolchain) | ||||
# | # | ||||
# Always build architectures supported by clang. Only build architectures | # Always build architectures supported by clang. Only build architectures | ||||
# only supported by GCC if a suitable toolchain is present or enabled. | # only supported by GCC if a suitable toolchain is present or enabled. | ||||
# In all cases, if the user specifies TARGETS on the command line, | # In all cases, if the user specifies TARGETS on the command line, | ||||
# honor that most of all. | # honor that most of all. | ||||
# | # | ||||
_OBSOLETE_GCC_TARGETS=mips sparc64 | TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 | ||||
TARGETS?=amd64 arm arm64 i386 powerpc riscv ${_OBSOLETE_GCC_TARGETS} | |||||
_UNIVERSE_TARGETS= ${TARGETS} | _UNIVERSE_TARGETS= ${TARGETS} | ||||
TARGET_ARCHES_arm?= armv6 armv7 | TARGET_ARCHES_arm?= armv6 armv7 | ||||
TARGET_ARCHES_arm64?= aarch64 | TARGET_ARCHES_arm64?= aarch64 | ||||
TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf | TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf | ||||
# powerpcspe excluded until clang fixed | # powerpcspe excluded until clang fixed | ||||
TARGET_ARCHES_powerpc?= powerpc powerpc64 | TARGET_ARCHES_powerpc?= powerpc powerpc64 | ||||
# riscv64sf excluded due to PR 232085 | # riscv64sf excluded due to PR 232085 | ||||
TARGET_ARCHES_riscv?= riscv64 | TARGET_ARCHES_riscv?= riscv64 | ||||
.for target in ${TARGETS} | .for target in ${TARGETS} | ||||
TARGET_ARCHES_${target}?= ${target} | TARGET_ARCHES_${target}?= ${target} | ||||
.endfor | .endfor | ||||
MAKE_PARAMS_riscv?= CROSS_TOOLCHAIN=riscv64-gcc | MAKE_PARAMS_riscv?= CROSS_TOOLCHAIN=riscv64-gcc | ||||
.if !defined(MAKE_OBSOLETE_GCC) | |||||
OBSOLETE_GCC_TARGETS=${_OBSOLETE_GCC_TARGETS} | |||||
MAKE_PARAMS_mips?= CROSS_TOOLCHAIN=mips-gcc6 | MAKE_PARAMS_mips?= CROSS_TOOLCHAIN=mips-gcc6 | ||||
MAKE_PARAMS_sparc64?= CROSS_TOOLCHAIN=sparc64-gcc6 | MAKE_PARAMS_sparc64?= CROSS_TOOLCHAIN=sparc64-gcc6 | ||||
.endif | |||||
TOOLCHAINS_mips= mips-gcc6 | TOOLCHAINS_mips= mips-gcc6 | ||||
TOOLCHAINS_riscv= riscv64-gcc | TOOLCHAINS_riscv= riscv64-gcc | ||||
TOOLCHAINS_sparc64= sparc64-gcc6 | TOOLCHAINS_sparc64= sparc64-gcc6 | ||||
# Remove architectures only supported by external toolchain from | # Remove architectures only supported by external toolchain from | ||||
# universe if required toolchain packages are missing. riscv requires | # universe if required toolchain packages are missing. | ||||
# an out-of-tree toolchain. When MAKE_OBSOLETE_GCC is not defined, | .for target in mips riscv sparc64 | ||||
# the same logic appleis to the obsolete gcc targets. | |||||
.for target in riscv ${OBSOLETE_GCC_TARGETS} | |||||
.if ${_UNIVERSE_TARGETS:M${target}} | .if ${_UNIVERSE_TARGETS:M${target}} | ||||
.for toolchain in ${TOOLCHAINS_${target}} | .for toolchain in ${TOOLCHAINS_${target}} | ||||
.if !exists(/usr/local/share/toolchains/${toolchain}.mk) | .if !exists(/usr/local/share/toolchains/${toolchain}.mk) | ||||
_UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:N${target}} | _UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:N${target}} | ||||
universe: universe_${toolchain}_skip .PHONY | universe: universe_${toolchain}_skip .PHONY | ||||
universe_epilogue: universe_${toolchain}_skip .PHONY | universe_epilogue: universe_${toolchain}_skip .PHONY | ||||
universe_${toolchain}_skip: universe_prologue .PHONY | universe_${toolchain}_skip: universe_prologue .PHONY | ||||
@echo ">> ${target} skipped - install ${toolchain} port or package to build" | @echo ">> ${target} skipped - install ${toolchain} port or package to build" | ||||
▲ Show 20 Lines • Show All 251 Lines • Show Last 20 Lines |