From owner-dev-commits-src-main@freebsd.org Sun Aug 29 13:54:17 2021 Return-Path: Delivered-To: dev-commits-src-main@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 15E1B65F1AC; Sun, 29 Aug 2021 13:54:17 +0000 (UTC) (envelope-from git@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) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GyFLJ6tdqz3vWt; Sun, 29 Aug 2021 13:54:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D42793BED; Sun, 29 Aug 2021 13:54:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 17TDsGn1099674; Sun, 29 Aug 2021 13:54:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17TDsG20099673; Sun, 29 Aug 2021 13:54:16 GMT (envelope-from git) Date: Sun, 29 Aug 2021 13:54:16 GMT Message-Id: <202108291354.17TDsG20099673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 22b8ab15c41a - main - Remove -simplifycfg-dup-ret from CLANG_OPT_SMALL flags for clang 13 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 22b8ab15c41a9efac201691b40e961b83698aa9c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Aug 2021 13:54:17 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=22b8ab15c41a9efac201691b40e961b83698aa9c commit 22b8ab15c41a9efac201691b40e961b83698aa9c Author: Dimitry Andric AuthorDate: 2021-08-29 13:39:16 +0000 Commit: Dimitry Andric CommitDate: 2021-08-29 13:39:16 +0000 Remove -simplifycfg-dup-ret from CLANG_OPT_SMALL flags for clang 13 After llvm/clang 13.0.0, the -simplifycfg-dup-ret backend flag is no longer supported. This was part of CLANG_OPT_SMALL, which is only still used for stand/i386/boot2 and stand/i386/isoboot, to achieve the very small binary size required. Luckily clang 13.0.0 does not need any additional flags for this (I get 240 bytes available when building boot2). MFC after: 3 days --- share/mk/bsd.sys.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 80cc3080e552..a4bb54e19890 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -228,8 +228,10 @@ CFLAGS+=-nobuiltininc -idirafter ${COMPILER_RESOURCE_DIR}/include .endif .endif -CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3\ - -mllvm -simplifycfg-dup-ret +CLANG_OPT_SMALL= -mstack-alignment=8 -mllvm -inline-threshold=3 +.if ${COMPILER_VERSION} < 130000 +CLANG_OPT_SMALL+= -mllvm -simplifycfg-dup-ret +.endif CLANG_OPT_SMALL+= -mllvm -enable-load-pre=false CFLAGS.clang+= -Qunused-arguments # The libc++ headers use c++11 extensions. These are normally silenced because