git: 420f3826f1a8 - main - depend-cleanup: Fix incremental libcrypto build

From: Dag-Erling Smørgrav <des_at_FreeBSD.org>
Date: Thu, 19 Nov 2026 14:34:42 UTC
The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=420f3826f1a840ad3cd2364358561e3eb25fd6f3

commit 420f3826f1a840ad3cd2364358561e3eb25fd6f3
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-11-19 14:03:10 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-11-19 14:34:20 +0000

    depend-cleanup: Fix incremental libcrypto build
    
    Note that our clean_obj() function previously used plain `strings`, but
    in this case the offending symbol is not in a loadable section so it was
    not being picked up.  Switching to `strings -a` fixes this case and
    should not break cases that already worked.
    
    Fixes:          46453f0abb85 ("openssl: build legacy provider as upstream does")
---
 tools/build/depend-cleanup.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh
index a8e6b1ca1344..7947694cf374 100755
--- a/tools/build/depend-cleanup.sh
+++ b/tools/build/depend-cleanup.sh
@@ -187,7 +187,7 @@ clean_obj()
 	for libcompat in "" $ALL_libcompats; do
 		dirprfx=${libcompat:+obj-lib${libcompat}}
 		dir="${OBJTOP%/}/${dirprfx}/$1"
-		if strings "${dir}"/$2.*o 2>/dev/null | egrep -qw "${4}"; then
+		if strings -a "${dir}"/$2.*o 2>/dev/null | egrep -qw "${4}"; then
 			echo "Removing stale ${libcompat:+lib${libcompat} }objects for $2.$3"
 			run rm -fv "${dir}"/$2.*o
 		fi
@@ -317,6 +317,10 @@ check_epoch_and_opts
 #          "$OBJTOP"/tests/sys/kqueue/libkqueue/*
 #fi
 
+# 20261106 # OpenSSL build changes
+clean_obj secure/lib/libcrypto/modules/legacy cpuid c OPENSSL_rdtsc
+clean_obj secure/lib/libcrypto cpuid c OPENSSL_rdtsc
+
 # 20260427 # bc / dc test scripts no longer generated
 dir="${OBJTOP%/}"/usr.bin/gh-bc/tests
 run rm -fv "${dir}"/bc_tests.sh "${dir}"/dc_tests.sh