From owner-svn-src-projects@freebsd.org Tue Dec 11 06:45:54 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA3BF1323678 for ; Tue, 11 Dec 2018 06:45:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75DEA86C19; Tue, 11 Dec 2018 06:45:54 +0000 (UTC) (envelope-from dim@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 4ABA42BE50; Tue, 11 Dec 2018 06:45:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id wBB6jsbx067245; Tue, 11 Dec 2018 06:45:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id wBB6js8A067244; Tue, 11 Dec 2018 06:45:54 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201812110645.wBB6js8A067244@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 11 Dec 2018 06:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r341812 - projects/clang700-import/share/mk X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang700-import/share/mk X-SVN-Commit-Revision: 341812 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 75DEA86C19 X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.967,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2018 06:45:55 -0000 Author: dim Date: Tue Dec 11 06:45:53 2018 New Revision: 341812 URL: https://svnweb.freebsd.org/changeset/base/341812 Log: For arm and armv6, only enable LLVM target support for arm by default, to shrink libllvm.a. This is a workaround for "relocation truncated to fit" errors with BFD ld 2.17.50 on arm and armv6, when linking executables against it. The required range extensions are not yet supported by this very old version of BFD ld. When arm and armv6 userland can be successfully linked by lld, this workaround can be removed. Modified: projects/clang700-import/share/mk/src.opts.mk Modified: projects/clang700-import/share/mk/src.opts.mk ============================================================================== --- projects/clang700-import/share/mk/src.opts.mk Tue Dec 11 05:10:22 2018 (r341811) +++ projects/clang700-import/share/mk/src.opts.mk Tue Dec 11 06:45:53 2018 (r341812) @@ -269,6 +269,10 @@ __LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/spar # Default the given TARGET's LLVM_TARGET support to the value of MK_CLANG. .if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt} __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG +# Disable other targets for arm and armv6, to work around "relocation truncated +# to fit" errors with BFD ld, since libllvm.a will get too large to link. +.elif ${__T} == "arm" || ${__T} == "armv6" +__DEFAULT_NO_OPTIONS+=LLVM_TARGET_${__llt:tu} # aarch64 needs arm for -m32 support. .elif ${__TT} == "arm64" && ${__llt} == "arm" __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_ARM/LLVM_TARGET_AARCH64