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)
Thu, Sep 5, 10:49 PM
Unknown Object (File)
Wed, Sep 4, 9:57 AM
Unknown Object (File)
Sat, Aug 17, 8:21 PM
Unknown Object (File)
Jul 27 2024, 2:47 AM
Unknown Object (File)
Jul 10 2024, 2:44 AM
Unknown Object (File)
Jul 10 2024, 1:39 AM
Unknown Object (File)
Jul 9 2024, 10:33 PM
Unknown Object (File)
Jul 9 2024, 10:12 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.