Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Aug 2021 13:54:16 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 22b8ab15c41a - main - Remove -simplifycfg-dup-ret from CLANG_OPT_SMALL flags for clang 13
Message-ID:  <202108291354.17TDsG20099673@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=22b8ab15c41a9efac201691b40e961b83698aa9c

commit 22b8ab15c41a9efac201691b40e961b83698aa9c
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-08-29 13:39:16 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108291354.17TDsG20099673>