Page MenuHomeFreeBSD

depend-cleanup.sh: Handle commit cbdec8db18b5
ClosedPublic

Authored by markj on Dec 7 2021, 4:31 PM.
Tags
None
Referenced Files
F153597262: D33322.id.diff
Wed, Apr 22, 5:41 AM
F153572059: D33322.diff
Wed, Apr 22, 12:41 AM
Unknown Object (File)
Mon, Apr 13, 8:07 AM
Unknown Object (File)
Sat, Apr 11, 1:28 AM
Unknown Object (File)
Fri, Apr 10, 8:57 AM
Unknown Object (File)
Thu, Apr 9, 9:10 PM
Unknown Object (File)
Thu, Apr 9, 9:08 PM
Unknown Object (File)
Tue, Apr 7, 4:21 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.