From nobody Thu Feb 17 04:03:32 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 96D6919C6C4F; Thu, 17 Feb 2022 04:03:32 +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 4Jzh5J3pWvz50mC; Thu, 17 Feb 2022 04:03:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645070612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m5eS4Gvk86TZWxPKFUIfvRX0PxJW93TwpIn2lLSmfL0=; b=Enn1Qfw+KeNJmNCLQZyYq48jji+BRfU0EZ2smSKQA5lQn2q0xAzM9qi1jxO7+4RsGMNkFV 83VEJWDH/GOldGfnUaqIOskksapGpCZmpPEf6cDBkHbswPSVFoVObRJaTUB0hNuoPXoT6o nH6AG/f4iUW8aO1yWAAzj9EqqdwuxW5z9WPQl2H1DS3AcKfPhj7aE4D/MDyLNrSbB4i8tu u8ZONwmeo/dTP2VongITSEOFPEFD1TC4fF5pce7XQBKekRckV5rWH7fqVabgNEO8MKeZQA XUa3AAI3LYieUwZf70Pf66GlQ6xLL7aBC7yUdh8+7k8hW2hPIdEF1CIB5ZVY/A== 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 581DB22F8A; Thu, 17 Feb 2022 04:03:32 +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 21H43WPp070322; Thu, 17 Feb 2022 04:03:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21H43WDS070321; Thu, 17 Feb 2022 04:03:32 GMT (envelope-from git) Date: Thu, 17 Feb 2022 04:03:32 GMT Message-Id: <202202170403.21H43WDS070321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: aea2a658ef8b - main - Don't delete hack.c - causes perpetual 'out of date' kernel List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aea2a658ef8b75a2246bf0d44f80ba8d6c6d344e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645070612; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m5eS4Gvk86TZWxPKFUIfvRX0PxJW93TwpIn2lLSmfL0=; b=KFBRXpVvMyYhhsH8BNMK2p4bF1NnQzq33Cmb/DbD2AqTlxb2hLwwhNWFo9feg9PpAkrLSf Y6jOhKtJ2AwCCjZ7izLSlYaG7MkvW9pHtz0lh+Hp66spPPzG7XqleRY/PuA0NolWJbjUBS 6PpcYKC3vQZRM+p5fRvunXNHCbA6xfTjJjM1uuq7lVArlBIHaZIaWYfPlqHW0r7ziWVBzR +H1zT+lGI91xHy0Beh+9dFUUDZXO9W/G5zA/4XSysakRRUeeHdIXSE5X2Ovz1Z4AqQJja8 taTxwNwSea3lGnyvic0Gifh4sJkLkDNnwvXXQNtbsuc5VRaD7cm7TLFMZdFjWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645070612; a=rsa-sha256; cv=none; b=aKHg2vKWn/k2XFMos7NqrBgW069402PgZhuY0WJhgtuRHm9nXbd4c2xpcCgcftqMJUMgld vMvcp36al9t4AQSDsk0sIYBkEZyCdeqpV/0rkTJ0zg7kn7HJRetMZtI9BlNH1T5U9VAwqY /l+ek5L0AoZuDCpNFXJUClTRucL9s5pAetphaHnSUAHX0NeVOBMtNuXtg1TOojKXsjFGa7 ehgj6H/dpwQ2pynMRNX2DWuqaV3AYDQ/PjWVcmhx2S1O1iZwHO+ajDS0RaKgN2Efxyb6d4 E5Ux/E66oJRPez4xMyS8na8MJ8NlvBjOuAQaFffBDL7GbAlHZ+4ZObwurkEJig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=aea2a658ef8b75a2246bf0d44f80ba8d6c6d344e commit aea2a658ef8b75a2246bf0d44f80ba8d6c6d344e Author: David E. O'Brien AuthorDate: 2022-02-14 02:24:36 +0000 Commit: David E. O'Brien CommitDate: 2022-02-17 04:02:50 +0000 Don't delete hack.c - causes perpetual 'out of date' kernel Deleting hack.c cause the kernel to always be out of date: $ make kernel make: /usr/src/sys/amd64/compile/GENERIC/.depend.hack.pico, 1: ignoring stale .depend for hack.c :> hack.c cc -shared -O2 -pipe ... -nostdlib hack.c -o hack.pico rm -f hack.c MAKE="make" sh ../../../conf/newvers.sh "-R" GENERIC cc -c -O2 -pipe ... -std=iso9899:1999 -Werror vers.c ctfconvert -L VERSION -g vers.o linking kernel.full Keeping hack.c in the compile directory causes no harm, so there's no reason to delete it. Also rename the file to "force-dyamic-hack.c" so it is clear what the hack is aboug. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D34281 --- sys/conf/kern.post.mk | 12 +++++++----- sys/conf/kern.pre.mk | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 087beb73f9ae..4fcae712e974 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -230,10 +230,12 @@ kernel-clean: # This is a hack. BFD "optimizes" away dynamic mode if there are no # dynamic references. We could probably do a '-Bforcedynamic' mode like # in the a.out ld. For now, this works. -hack.pico: Makefile - :> hack.c - ${CC} ${CCLDFLAGS} -shared ${CFLAGS} -nostdlib hack.c -o hack.pico - rm -f hack.c +force-dynamic-hack.c: + :> ${.TARGET} + +force-dynamic-hack.pico: force-dynamic-hack.c Makefile + ${CC} ${CCLDFLAGS} -shared ${CFLAGS} -nostdlib \ + force-dynamic-hack.c -o ${.TARGET} offset.inc: $S/kern/genoffset.sh genoffset.o NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genoffset.sh genoffset.o > ${.TARGET} @@ -444,7 +446,7 @@ config.o env.o hints.o vers.o vnode_if.o: .if ${MK_REPRODUCIBLE_BUILD} != "no" REPRO_FLAG="-R" .endif -vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP} +vers.c: .NOMETA_CMP $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP:Nvers.*} MAKE="${MAKE}" sh $S/conf/newvers.sh ${REPRO_FLAG} ${KERN_IDENT} vnode_if.c: $S/tools/vnode_if.awk $S/kern/vnode_if.src diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 8c753783b527..5a786c81324d 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -314,7 +314,7 @@ SYSTEM_CFILES= config.c env.c hints.c vnode_if.c SYSTEM_DEP= Makefile ${SYSTEM_OBJS} SYSTEM_OBJS= locore.o ${MDOBJS} ${OBJS} SYSTEM_OBJS+= ${SYSTEM_CFILES:.c=.o} -SYSTEM_OBJS+= hack.pico +SYSTEM_OBJS+= force-dynamic-hack.pico KEYMAP=kbdcontrol -P ${SRCTOP}/share/vt/keymaps -P ${SRCTOP}/share/syscons/keymaps KEYMAP_FIX=sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /'