From owner-svn-src-head@freebsd.org Fri Apr 10 14:01:08 2020 Return-Path: Delivered-To: svn-src-head@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 927972BEA40; Fri, 10 Apr 2020 14:01:08 +0000 (UTC) (envelope-from kevans@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 48zKRm3J7Gz44xS; Fri, 10 Apr 2020 14:01:08 +0000 (UTC) (envelope-from kevans@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 6C0BD27321; Fri, 10 Apr 2020 14:01:08 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03AE18lK013627; Fri, 10 Apr 2020 14:01:08 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03AE18Ww013626; Fri, 10 Apr 2020 14:01:08 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004101401.03AE18Ww013626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Fri, 10 Apr 2020 14:01:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359774 - in head: gnu/usr.bin/gdb share/mk X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head: gnu/usr.bin/gdb share/mk X-SVN-Commit-Revision: 359774 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Apr 2020 14:01:08 -0000 Author: kevans Date: Fri Apr 10 14:01:07 2020 New Revision: 359774 URL: https://svnweb.freebsd.org/changeset/base/359774 Log: userland build: replace -fno-common with ${CFCOMMONFLAG} This change allows any downstream or otherwise consumer to easily override the new -fno-common default on a temporary basis without having to hack into src.sys.mk, and also makes it a bit easier to search for these specific cases where -fno-common must be overridden with -fcommon or else the build will fail. The gdb build, the only program requiring -fcommon on head/, is switched over as an example usage. It will need it on all branches, so this does not harm future mergability. MFC after: 3 days Modified: head/gnu/usr.bin/gdb/Makefile.inc head/share/mk/src.sys.mk Modified: head/gnu/usr.bin/gdb/Makefile.inc ============================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc Fri Apr 10 09:37:20 2020 (r359773) +++ head/gnu/usr.bin/gdb/Makefile.inc Fri Apr 10 14:01:07 2020 (r359774) @@ -50,7 +50,7 @@ CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit # Some bits here currently rely on some of the linker-merging magic that happens # with -fcommon. While this is the default right now, explicitly set -fcommon # so that it continues to build when the default flips. -CFLAGS+= -fcommon +CFCOMMONFLAG= -fcommon GENSRCS+= nm.h tm.h Modified: head/share/mk/src.sys.mk ============================================================================== --- head/share/mk/src.sys.mk Fri Apr 10 09:37:20 2020 (r359773) +++ head/share/mk/src.sys.mk Fri Apr 10 14:01:07 2020 (r359774) @@ -37,7 +37,8 @@ __postrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}: # The following should be removed no earlier than LLVM11 being imported into the # tree, to ensure we don't regress the build. LLVM11 and GCC10 will switch the # default over to -fno-common, making this redundant. -CFLAGS+= -fno-common +CFCOMMONFLAG?= -fno-common +CFLAGS+= ${CFCOMMONFLAG} # tempting, but bsd.compiler.mk causes problems this early # probably need to remove dependence on bsd.own.mk