diff options
author | rlibby <rlibby@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f> | 2020-12-19 08:38:27 +0000 |
---|---|---|
committer | rlibby <rlibby@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f> | 2020-12-19 08:38:27 +0000 |
commit | 76df4d9a40fd96eb41e1a4ab7721ebb6423728cf (patch) | |
tree | 71451662e391f104c382bddac5d2e38f43dab941 | |
parent | 67e5f0a28f76cc7cbfdf02bb821246e8151fb059 (diff) | |
download | freebsd-76df4d9a40fd96eb41e1a4ab7721ebb6423728cf.tar.gz freebsd-76df4d9a40fd96eb41e1a4ab7721ebb6423728cf.tar.bz2 |
rtld-libc: fix incremental build
ar cr is an update of an archive, not a creation of a new one. During
incremental builds (e.g. with meta mode) the archive was not getting
cleaned, and so could retain now-deleted objects from previous builds.
Now, delete the archive before creating/updating it.
Reviewed by: arichardson, bdrewery, kib
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27663
git-svn-id: http://svn.freebsd.org/base/head@368788 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
-rw-r--r-- | libexec/rtld-elf/rtld-libc/Makefile.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/rtld-elf/rtld-libc/Makefile.inc b/libexec/rtld-elf/rtld-libc/Makefile.inc index 74ac3668f1a..88f13c8db8c 100644 --- a/libexec/rtld-elf/rtld-libc/Makefile.inc +++ b/libexec/rtld-elf/rtld-libc/Makefile.inc @@ -89,8 +89,9 @@ CLEANFILES+=${_obj}.nossppico # We insert all the .o files from libc_nossp_pic.a into a new rtld_libc.a file # to ensure that only .o files that are actually used end up being included. rtld_libc.a: ${LIBC_NOSSP_PIC} ${SRCTOP}/libexec/rtld-elf/rtld-libc/Makefile.inc + @rm -f ${.TARGET} ${AR} x ${LIBC_NOSSP_PIC} ${_rtld_libc_objs} - ${AR} cr ${.OBJDIR}/${.TARGET} ${_rtld_libc_objs} + ${AR} cr ${.TARGET} ${_rtld_libc_objs} CLEANFILES+=rtld_libc.a LDADD+=${.OBJDIR}/rtld_libc.a beforelinking: rtld_libc.a |