installworld: improve portability of ldd use
b3b462229f
added a case statement to ignore lines containing strings
in square brackets such as "[vdso]" and "[preloaded]". On MacOS
Monterey where /bin/sh may be zsh, this fails with:
/bin/sh: -c: line 0: syntax error near unexpected token `;;'
Invoke grep in the pipeline to remove such lines instead.
Reviewed by: emaste
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D35618
This commit is contained in:
parent
3b8d04f845
commit
bda5d2a45c
@ -1368,12 +1368,8 @@ distributeworld installworld stageworld: _installcheck_world .PHONY
|
||||
fi; \
|
||||
done); \
|
||||
if [ -z "${CROSSBUILD_HOST}" ] ; then \
|
||||
libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | \
|
||||
libs=$$(ldd -f "%o %p\n" -f "%o %p\n" $$progs 2>/dev/null | sort -u | grep -Ev '\[.*]' | \
|
||||
while read line; do \
|
||||
case $$line in \
|
||||
"["*"]") \
|
||||
continue;; \
|
||||
esac; \
|
||||
set -- $$line; \
|
||||
if [ "$$2 $$3" != "not found" ]; then \
|
||||
echo $$2; \
|
||||
|
Loading…
Reference in New Issue
Block a user