mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:07:35 +00:00
Meta: Fix shellcheck whines in check-symbols.sh
This commit is contained in:
parent
638790c9a4
commit
18ff9c3fc2
1 changed files with 2 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
|
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.
|
# 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
|
# 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"
|
LIBC_PATH="Build/Libraries/LibC/libc.a"
|
||||||
for forbidden_symbol in $FORBIDDEN_SYMBOLS; do
|
for forbidden_symbol in $FORBIDDEN_SYMBOLS; do
|
||||||
# check if symbol is undefined
|
# check if symbol is undefined
|
||||||
nm $LIBC_PATH | grep "U $forbidden_symbol"
|
if nm $LIBC_PATH | grep "U $forbidden_symbol" ; then
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "Forbidden undefined symbol in LibC: $forbidden_symbol"
|
echo "Forbidden undefined symbol in LibC: $forbidden_symbol"
|
||||||
echo "See comment in Meta/check-symbols.sh for more info"
|
echo "See comment in Meta/check-symbols.sh for more info"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue