mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-24 11:35:13 +00:00
Meta: Fix shellcheck whines in check-symbols.sh
This commit is contained in:
parent
638790c9a4
commit
18ff9c3fc2
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
||||
cd "$script_path/.."
|
||||
cd "$script_path/.." || exit 1
|
||||
|
||||
# The __cxa_guard_* calls are generated for (non trivial) initialzation of local static objects.
|
||||
# These symbols are OK to use within serenity code, but they are problematic in LibC because their
|
||||
|
@ -12,8 +12,7 @@ FORBIDDEN_SYMBOLS="__cxa_guard_acquire __cxa_guard_release"
|
|||
LIBC_PATH="Build/Libraries/LibC/libc.a"
|
||||
for forbidden_symbol in $FORBIDDEN_SYMBOLS; do
|
||||
# check if symbol is undefined
|
||||
nm $LIBC_PATH | grep "U $forbidden_symbol"
|
||||
if [ $? -eq 0 ]; then
|
||||
if nm $LIBC_PATH | grep "U $forbidden_symbol" ; then
|
||||
echo "Forbidden undefined symbol in LibC: $forbidden_symbol"
|
||||
echo "See comment in Meta/check-symbols.sh for more info"
|
||||
exit 1
|
||||
|
|
Loading…
Reference in a new issue