Page MenuHomeFreeBSD

crossbuild: Make the CHECK_TIME variable work on Linux
ClosedPublic

Authored by arichardson on Feb 1 2018, 2:20 PM.
Tags
None
Referenced Files
F144292476: D14157.id38944.diff
Sat, Feb 7, 4:38 PM
Unknown Object (File)
Sat, Jan 31, 5:38 AM
Unknown Object (File)
Dec 25 2025, 11:43 AM
Unknown Object (File)
Nov 24 2025, 3:13 AM
Unknown Object (File)
Nov 21 2025, 2:49 AM
Unknown Object (File)
Nov 21 2025, 2:46 AM
Unknown Object (File)
Nov 21 2025, 2:43 AM
Unknown Object (File)
Nov 21 2025, 2:32 AM
Subscribers
None

Details

Summary

Linux /usr/bin/find doesn't understand the -mtime -0s flag.
Instead create a temporary file and compare that file's mtime to
sys/sys/param.h to check whether the clock is correct.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Makefile
360 โ†—(On Diff #38756)

This is now wrong. This changes from 0s to 0 days. Due to funky roundings, this tests to see if the sys/sys/param.h file is one day or less old (or in the future), whereas on FreeBSD it tests if it is 1 second old or in the future. The difference is important and will lead to false positives.

"touch /tmp/junk && find ${.CURDIR}/sys/sys/param.h -newer /tmp/junk && rm /tmp/junk" would do the same thing and be portable...

arichardson edited the summary of this revision. (Show Details)

Use a temporary file instead

imp added inline comments.
Makefile
355 โ†—(On Diff #38884)

Thanks!

This revision is now accepted and ready to land.Feb 5 2018, 5:12 PM
This revision was automatically updated to reflect the committed changes.