From owner-svn-src-all@freebsd.org Thu Apr 30 14:51:33 2020 Return-Path: Delivered-To: svn-src-all@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 4BDD52BFAE8; Thu, 30 Apr 2020 14:51:33 +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 49Cdcj1Mgjz4tVm; Thu, 30 Apr 2020 14:51:33 +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 2A18120882; Thu, 30 Apr 2020 14:51:33 +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 03UEpXxd054424; Thu, 30 Apr 2020 14:51:33 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03UEpV75054418; Thu, 30 Apr 2020 14:51:31 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202004301451.03UEpV75054418@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 30 Apr 2020 14:51:31 +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: r360496 - in stable/12/sys: conf modules/linux modules/linux64 modules/vmm X-SVN-Group: stable-12 X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in stable/12/sys: conf modules/linux modules/linux64 modules/vmm X-SVN-Commit-Revision: 360496 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2020 14:51:33 -0000 Author: kevans Date: Thu Apr 30 14:51:31 2020 New Revision: 360496 URL: https://svnweb.freebsd.org/changeset/base/360496 Log: MFC r360071-r360072: force -fcommon in kernel/modules where needed This contains some extra bits over the original commits, as things are slightly different in earlier branches. r360071: Allow kernel modules to build with a compiler that defaults to -fno-common This uses the same approach as r359691. r360072: More fixes to build the kernel with a compiler that defaults to -fno-common Using the same approach as the last commit for the files used by genassym.sh. Modified: stable/12/sys/conf/files.amd64 stable/12/sys/conf/files.i386 stable/12/sys/conf/kern.post.mk stable/12/sys/conf/kmod.mk stable/12/sys/modules/linux/Makefile stable/12/sys/modules/linux64/Makefile stable/12/sys/modules/vmm/Makefile Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/conf/files.amd64 ============================================================================== --- stable/12/sys/conf/files.amd64 Thu Apr 30 14:38:55 2020 (r360495) +++ stable/12/sys/conf/files.amd64 Thu Apr 30 14:51:31 2020 (r360496) @@ -34,7 +34,7 @@ cloudabi64_vdso_blob.o optional compat_cloudabi64 \ # linux32_genassym.o optional compat_linux32 \ dependency "$S/amd64/linux32/linux32_genassym.c offset.inc" \ - compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux32_genassym.o" # @@ -58,7 +58,7 @@ linux32_vdso.so optional compat_linux32 \ # ia32_genassym.o standard \ dependency "$S/compat/ia32/ia32_genassym.c offset.inc" \ - compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "ia32_genassym.o" # Modified: stable/12/sys/conf/files.i386 ============================================================================== --- stable/12/sys/conf/files.i386 Thu Apr 30 14:38:55 2020 (r360495) +++ stable/12/sys/conf/files.i386 Thu Apr 30 14:51:31 2020 (r360496) @@ -21,7 +21,7 @@ cloudabi32_vdso_blob.o optional compat_cloudabi32 \ # linux_genassym.o optional compat_linux \ dependency "$S/i386/linux/linux_genassym.c offset.inc" \ - compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -c ${.IMPSRC}" \ + compile-with "${CC} ${CFLAGS:N-flto:N-fno-common} -fcommon -c ${.IMPSRC}" \ no-obj no-implicit-rule \ clean "linux_genassym.o" # Modified: stable/12/sys/conf/kern.post.mk ============================================================================== --- stable/12/sys/conf/kern.post.mk Thu Apr 30 14:38:55 2020 (r360495) +++ stable/12/sys/conf/kern.post.mk Thu Apr 30 14:51:31 2020 (r360496) @@ -202,20 +202,20 @@ offset.inc: $S/kern/genoffset.sh genoffset.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genoffset.sh genoffset.o > ${.TARGET} genoffset.o: $S/kern/genoffset.c - ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/kern/genoffset.c + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon $S/kern/genoffset.c # genoffset_test.o is not actually used for anything - the point of compiling it # is to exercise the CTASSERT that checks that the offsets in the offset.inc # _lite struct(s) match those in the original(s). genoffset_test.o: $S/kern/genoffset.c offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} -DOFFSET_TEST \ + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon -DOFFSET_TEST \ $S/kern/genoffset.c -o ${.TARGET} assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: $S/$M/$M/genassym.c offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} $S/$M/$M/genassym.c + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon $S/$M/$M/genassym.c OBJS_DEPEND_GUESS+= opt_global.h genoffset.o genassym.o vers.o: opt_global.h Modified: stable/12/sys/conf/kmod.mk ============================================================================== --- stable/12/sys/conf/kmod.mk Thu Apr 30 14:38:55 2020 (r360495) +++ stable/12/sys/conf/kmod.mk Thu Apr 30 14:51:31 2020 (r360496) @@ -515,13 +515,13 @@ assym.inc: ${SYSDIR}/kern/genassym.sh sh ${SYSDIR}/kern/genassym.sh genassym.o > ${.TARGET} genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc genassym.o: ${SRCS:Mopt_*.h} - ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon \ ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} genoffset.o: ${SYSDIR}/kern/genoffset.c genoffset.o: ${SRCS:Mopt_*.h} - ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon \ ${SYSDIR}/kern/genoffset.c CLEANDEPENDFILES+= ${_ILINKS} Modified: stable/12/sys/modules/linux/Makefile ============================================================================== --- stable/12/sys/modules/linux/Makefile Thu Apr 30 14:38:55 2020 (r360495) +++ stable/12/sys/modules/linux/Makefile Thu Apr 30 14:51:31 2020 (r360496) @@ -78,7 +78,7 @@ ${VDSO}.so: linux${SFX}_locore.o .endif linux${SFX}_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC} .if !defined(KERNBUILDDIR) .if defined(KTR) Modified: stable/12/sys/modules/linux64/Makefile ============================================================================== --- stable/12/sys/modules/linux64/Makefile Thu Apr 30 14:38:55 2020 (r360495) +++ stable/12/sys/modules/linux64/Makefile Thu Apr 30 14:51:31 2020 (r360496) @@ -53,7 +53,7 @@ linux_support.o: assym.inc linux_assym.h ${.IMPSRC} -o ${.TARGET} linux_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC} .if !defined(KERNBUILDDIR) .if defined(DEBUG) Modified: stable/12/sys/modules/vmm/Makefile ============================================================================== --- stable/12/sys/modules/vmm/Makefile Thu Apr 30 14:38:55 2020 (r360495) +++ stable/12/sys/modules/vmm/Makefile Thu Apr 30 14:51:31 2020 (r360496) @@ -75,9 +75,9 @@ svm_support.o: ${.IMPSRC} -o ${.TARGET} vmx_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC} svm_genassym.o: offset.inc - ${CC} -c ${CFLAGS:N-flto:N-fno-common} ${.IMPSRC} + ${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC} .include