Page MenuHomeFreeBSD

depend-cleanup.sh: Handle commit cbdec8db18b5
ClosedPublic

Authored by markj on Dec 7 2021, 4:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 21, 10:15 AM
Unknown Object (File)
Oct 5 2024, 9:20 AM
Unknown Object (File)
Oct 1 2024, 8:40 AM
Unknown Object (File)
Sep 24 2024, 5:36 PM
Unknown Object (File)
Sep 21 2024, 5:30 AM
Unknown Object (File)
Sep 19 2024, 3:40 PM
Unknown Object (File)
Sep 19 2024, 5:04 AM
Unknown Object (File)
Sep 18 2024, 6:18 PM
Subscribers

Details

Summary

That commit changed libc to use the MI pdfork implementation, but with
an incremental build the object file for the pdfork.S stub lingers and
causes a linker error.

Cleaning the depend file is not enouch, so modify clean_deps() to remove
object files as well, and add a call to ensure that pdfork.*o is
cleaned. The new file is _pdfork.o.

Reported by: jhb
Fixes: cbdec8db18b5 ("libc: Add pdfork to the list of interposed system calls")
Sponsored by: The FreeBSD Foundation

Test Plan
$ cd lib/libc
$ git revert -n cbdec8db18b5
$ make cleandir
$ make -s WITHOUT_TESTS=
$ git checkout -f
$ make -s WITHOUT_TESTS= # fails
$ cd ../../
$ sh tools/build/depend-cleanup.sh /usr/obj/usr/home/markj/src/freebsd/amd64.amd64
Removing stale dependencies for pdfork.S
$ sh tools/build/depend-cleanup.sh /usr/obj/usr/home/markj/src/freebsd/amd64.amd64
$ cd lib/libc
$ make -s WITHOUT_TESTS= # succeeds

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Dec 7 2021, 4:31 PM
emaste added inline comments.
tools/build/depend-cleanup.sh
33–34

Might want to make this "stale dependencies and objects for" now

This revision is now accepted and ready to land.Dec 7 2021, 4:56 PM
This revision was automatically updated to reflect the committed changes.