From owner-svn-src-stable-12@freebsd.org Sat May 9 17:15:00 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3DFCF2F148A; Sat, 9 May 2020 17:15:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49KDN40ycSz479X; Sat, 9 May 2020 17:15:00 +0000 (UTC) (envelope-from jhb@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 17D951F54D; Sat, 9 May 2020 17:15:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 049HExrq000814; Sat, 9 May 2020 17:14:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 049HExs1000811; Sat, 9 May 2020 17:14:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <202005091714.049HExs1000811@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 9 May 2020 17:14:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r360850 - in stable/12: . share/man/man7 share/mk X-SVN-Group: stable-12 X-SVN-Commit-Author: jhb X-SVN-Commit-Paths: in stable/12: . share/man/man7 share/mk X-SVN-Commit-Revision: 360850 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.32 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2020 17:15:00 -0000 Author: jhb Date: Sat May 9 17:14:59 2020 New Revision: 360850 URL: https://svnweb.freebsd.org/changeset/base/360850 Log: MFC 356499: Use clang and lld as the default toolchain for RISCV. - Enable clang and lld as system toolchains. - Don't use external GCC for universe by default. - Re-enable riscv64sf since it builds fine with clang + lld. Sponsored by: DARPA Modified: stable/12/Makefile stable/12/share/man/man7/arch.7 stable/12/share/mk/src.opts.mk Directory Properties: stable/12/ (props changed) Modified: stable/12/Makefile ============================================================================== --- stable/12/Makefile Sat May 9 15:56:02 2020 (r360849) +++ stable/12/Makefile Sat May 9 17:14:59 2020 (r360850) @@ -487,29 +487,9 @@ TARGET_ARCHES_arm?= arm armv6 armv7 TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe -# riscv64sf excluded due to PR 232085 -TARGET_ARCHES_riscv?= riscv64 +TARGET_ARCHES_riscv?= riscv64 riscv64sf .for target in ${TARGETS} TARGET_ARCHES_${target}?= ${target} -.endfor - -MAKE_PARAMS_riscv?= CROSS_TOOLCHAIN=riscv64-gcc - -# 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) Modified: stable/12/share/man/man7/arch.7 ============================================================================== --- stable/12/share/man/man7/arch.7 Sat May 9 15:56:02 2020 (r360849) +++ stable/12/share/man/man7/arch.7 Sat May 9 17:14:59 2020 (r360850) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 14, 2019 +.Dd January 8, 2020 .Dt ARCH 7 .Os .Sh NAME @@ -325,12 +325,10 @@ This table shows the default tool chain for each archi .It powerpc Ta GCC 4.2.1 Ta GNU ld 2.17.50 .It powerpcspe Ta GCC 4.2.1 Ta GNU ld 2.17.50 .It powerpc64 Ta GCC 4.2.1 Ta GNU ld 2.17.50 -.It riscv64 Ta GCC(1) Ta GNU ld(1) -.It riscv64sf Ta GCC(1) Ta GNU ld(1) +.It riscv64 Ta Clang Ta lld +.It riscv64sf Ta Clang Ta lld .It sparc64 Ta GCC 4.2.1 Ta GNU ld 2.17.50 .El -.Pp -(1) External toolchain provided by ports/packages. .Pp Note that GCC 4.2.1 is deprecated, and scheduled for removal on 2020-03-31. Any CPU architectures not migrated by then Modified: stable/12/share/mk/src.opts.mk ============================================================================== --- stable/12/share/mk/src.opts.mk Sat May 9 15:56:02 2020 (r360849) +++ stable/12/share/mk/src.opts.mk Sat May 9 17:14:59 2020 (r360850) @@ -296,7 +296,8 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF # build Clang without using an external compiler. .if ${COMPILER_FEATURES:Mc++11} && (${__T} == "aarch64" || \ - ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386") + ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386" || \ + ${__TT} == "riscv") # Clang is enabled, and will be installed as the default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC @@ -325,7 +326,7 @@ __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND .endif .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "armv7" || \ - ${__T} == "i386" + ${__T} == "i386" || ${__TT} == "riscv" __DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .else __DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD