]> git.droids-corp.org - dpdk.git/commitdiff
devtools: fix symbols check
authorThomas Monjalon <thomas@monjalon.net>
Tue, 8 Mar 2022 21:02:48 +0000 (22:02 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 8 Mar 2022 21:19:18 +0000 (22:19 +0100)
In some environments, the check of local symbols catch-all
was failing. Note: this script is called during the build.

The reason is that grep returns an error if nothing is found.
The option -e of the shell script makes this error fatal.
It is not always fatal because the grep is in a command substitution.

Fixes: b403498e1422 ("build: hide local symbols in shared libraries")
Reported-by: Usama Arif <usama.arif@bytedance.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
devtools/check-symbol-maps.sh

index 8266fdf9ea423aeef2ce59740d90c8e724174152..32e1fa5c8f658e01e1789bc1f587241a2c3c6a1f 100755 (executable)
@@ -53,7 +53,7 @@ if [ -n "$duplicate_symbols" ] ; then
     ret=1
 fi
 
-local_miss_maps=$(grep -L 'local: \*;' $@)
+local_miss_maps=$(grep -L 'local: \*;' $@ || true)
 if [ -n "$local_miss_maps" ] ; then
     echo "Found maps without local catch-all:"
     echo "$local_miss_maps"