Page MenuHomeFreeBSD

Don't delete hack.c - causes perpetual 'out of date' kernel
ClosedPublic

Authored by obrien on Feb 15 2022, 1:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 9 2024, 9:15 AM
Unknown Object (File)
Feb 7 2024, 12:45 PM
Unknown Object (File)
Jan 21 2024, 2:32 PM
Unknown Object (File)
Jan 20 2024, 1:56 PM
Unknown Object (File)
Dec 22 2023, 10:48 PM
Unknown Object (File)
Dec 22 2023, 10:11 PM
Unknown Object (File)
Dec 12 2023, 6:12 AM
Unknown Object (File)
Oct 12 2023, 4:52 PM

Details

Summary

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.

Test Plan

configure GENERIC ; cd ../compile/GENERIC ; make kernel ; make kernel

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 44453
Build 41341: arc lint + arc unit

Event Timeline

sys/conf/kern.post.mk
236

Why is there not simply a hack.c target:

hack.c:
      :> $@

might even be worth renaming it to its purpose force-dynamic-hack.c ?

Updating based on sjg's input.

This revision is now accepted and ready to land.Feb 16 2022, 7:41 PM
emaste added inline comments.
sys/conf/kern.post.mk
234

:> ${.TARGET} perhaps?

238

-o ${.TARGET} perhaps?