From owner-svn-src-all@freebsd.org Thu Jul 27 12:29:32 2017 Return-Path: Delivered-To: svn-src-all@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 7BED2DC9F40; Thu, 27 Jul 2017 12:29:32 +0000 (UTC) (envelope-from emaste@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 473B67446A; Thu, 27 Jul 2017 12:29:32 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v6RCTV6E064816; Thu, 27 Jul 2017 12:29:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v6RCTVwh064815; Thu, 27 Jul 2017 12:29:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707271229.v6RCTVwh064815@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 27 Jul 2017 12:29:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321616 - head X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head X-SVN-Commit-Revision: 321616 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jul 2017 12:29:32 -0000 Author: emaste Date: Thu Jul 27 12:29:31 2017 New Revision: 321616 URL: https://svnweb.freebsd.org/changeset/base/321616 Log: genericize target exclusion for missing external toolchain Previously we excluded riscv from make universe / tinderbox if the required xtoolchain package was not installed. Make that logic generic so that we can loop over multiple architectures, in preparation to test patches to have other architectures rely on external toolchain. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11652 Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Thu Jul 27 10:52:36 2017 (r321615) +++ head/Makefile Thu Jul 27 12:29:31 2017 (r321616) @@ -441,14 +441,22 @@ TARGET_ARCHES_${target}?= ${target} 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" +# XXX Remove architectures only supported by external toolchain from universe +# if required toolchain packages are missing. +TOOLCHAINS_riscv= riscv64 +.for target in riscv +.if ${_UNIVERSE_TARGETS:M${target}} +.for toolchain in ${TOOLCHAINS_${target}} +.if !exists(/usr/local/share/toolchains/${toolchain}-gcc.mk) +_UNIVERSE_TARGETS:= ${_UNIVERSE_TARGETS:N${target}} +universe: universe_${toolchain}_skip .PHONY +universe_epilogue: universe_${toolchain}_skip .PHONY +universe_${toolchain}_skip: universe_prologue .PHONY + @echo ">> ${target} skipped - install ${toolchain}-xtoolchain-gcc port or package to build" .endif +.endfor +.endif +.endfor .if defined(UNIVERSE_TARGET) MAKE_JUST_WORLDS= YES