symbols-check: support OSes based on GNU toolchain

Some of the symbols listed in PLATFORM_SYMBOLS are not only specific
to Linux, but rather specific to the GNU toolchain. Hence, use them
when inspecting ELF binaries produced by a GNU toolchain: this means
on Hurd ('GNU'), and on e.g. kFreeBSD ('GNU/kFreeBSD').

Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21825>
This commit is contained in:
Pino Toscano 2023-03-09 22:21:43 +01:00 committed by Marge Bot
parent e5b29e6735
commit 9d42e31b54
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ def get_symbols_nm(nm, lib):
if len(fields) == 2 or fields[1] == 'U':
continue
symbol_name = fields[0]
if platform_name == 'Linux':
if platform_name == 'Linux' or platform_name == 'GNU' or platform_name.startswith('GNU/'):
if symbol_name in PLATFORM_SYMBOLS:
continue
elif platform_name == 'Darwin':