From owner-svn-src-head@freebsd.org Wed Apr 12 10:45:20 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9A6AD3B643; Wed, 12 Apr 2017 10:45:20 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83A78BD; Wed, 12 Apr 2017 10:45:20 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3CAjJqE082718; Wed, 12 Apr 2017 10:45:19 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3CAjJZh082717; Wed, 12 Apr 2017 10:45:19 GMT (envelope-from br@FreeBSD.org) Message-Id: <201704121045.v3CAjJZh082717@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 12 Apr 2017 10:45:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316730 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 10:45:20 -0000 Author: br Date: Wed Apr 12 10:45:19 2017 New Revision: 316730 URL: https://svnweb.freebsd.org/changeset/base/316730 Log: Include RISC-V target to universe build. Check if RISC-V external toolchain package is installed, otherwise skip build. Reviewed by: emaste Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D10344 Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Wed Apr 12 10:40:30 2017 (r316729) +++ head/Makefile Wed Apr 12 10:45:19 2017 (r316730) @@ -417,16 +417,28 @@ worlds: .PHONY # existing system is. # .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) -TARGETS?=amd64 arm arm64 i386 mips powerpc sparc64 +TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 _UNIVERSE_TARGETS= ${TARGETS} TARGET_ARCHES_arm?= arm armeb armv6 TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe +TARGET_ARCHES_riscv?= riscv64 riscv64sf .for target in ${TARGETS} TARGET_ARCHES_${target}?= ${target} .endfor +MAKE_PARAMS_riscv?= CROSS_TOOLCHAIN=riscv64-gcc + +# XXX Remove riscv from universe if the required toolchain package is missing. +.if !exists(/usr/local/share/toolchains/riscv64-gcc.mk) && ${TARGETS:Mriscv} +_UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:Nriscv} +universe: universe_riscv_skip .PHONY +universe_epilogue: universe_riscv_skip .PHONY +universe_riscv_skip: universe_prologue .PHONY + @echo ">> riscv skipped - install riscv64-xtoolchain-gcc port or package to build" +.endif + .if defined(UNIVERSE_TARGET) MAKE_JUST_WORLDS= YES .else @@ -476,6 +488,7 @@ universe_${target}_${target_arch}: unive ${SUB_MAKE} ${JFLAG} ${UNIVERSE_TARGET} \ TARGET=${target} \ TARGET_ARCH=${target_arch} \ + ${MAKE_PARAMS_${target}} \ > _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \ (echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \ "check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \ @@ -531,6 +544,7 @@ universe_kernconf_${TARGET}_${kernel}: . ${SUB_MAKE} ${JFLAG} buildkernel \ TARGET=${TARGET} \ TARGET_ARCH=${TARGET_ARCH_${kernel}} \ + ${MAKE_PARAMS_${TARGET}} \ KERNCONF=${kernel} \ > _.${TARGET}.${kernel} 2>&1 || \ (echo "${TARGET} ${kernel} kernel failed," \