Skip to content

Commit ae0720a

Browse files
committed
Disable gdb's native language support, and name every leak at once
gdb was the one component still building with NLS, so on Intel macOS it linked Homebrew's libintl -- a library no user's machine has, which is why the dependency audit refused the SDK. Its siblings all disable it already. The audit now reports every unexpected dependency before failing rather than the first: each one costs a full build to find, and a host that drags in one library from the machine tends to drag in several.
1 parent 64d8073 commit ae0720a

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

cmake/recipes/BuildHostDependencies.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,10 @@ function(toolchain_deps toolchain_deps_dir toolchain_install_dir toolchain_suffi
358358
--without-lzma
359359
--without-babeltrace
360360
--without-xxhash
361+
# Every other component here disables it. Left on, gdb links the
362+
# host's libintl -- on Intel macOS that is Homebrew's, which the
363+
# dependency audit refuses and a user's machine would not have.
364+
--disable-nls
361365
--without-debuginfod
362366
--with-gmp=${toolchain_deps_dir}
363367
--with-mpfr=${toolchain_deps_dir}

scripts/audit-host-deps.sh

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ set -eu
66
host_system=${VITASDK_HOST_SYSTEM_NAME:-$(uname -s)}
77
objdump_command=${VITASDK_OBJDUMP:-objdump}
88

9+
# Every offender, not the first: each one costs a full build to discover, and
10+
# a host that drags in one library from the machine usually drags in several.
11+
unexpected_count=0
12+
913
fail_dependency() {
1014
binary=$1
1115
dependency=$2
1216
echo "unexpected dynamic host dependency: $binary -> $dependency" >&2
13-
exit 1
17+
unexpected_count=$((unexpected_count + 1))
1418
}
1519

1620
# One reader for every ELF host; what differs between them is only which
@@ -153,4 +157,9 @@ case "$host_system" in
153157
;;
154158
esac
155159

160+
if [ "$unexpected_count" -ne 0 ]; then
161+
echo "$unexpected_count unexpected host dependencies" >&2
162+
exit 1
163+
fi
164+
156165
echo "Host dependency audit passed"

0 commit comments

Comments
 (0)