meson: Convert undefsym.sh to undefsym.py
PATCH 1/1 meson: Convert undefsym.sh to undefsym.py
From: Yonggang Luo <[email protected]>
undefsym.sh are not msys2 compatible, convert it to python script
Signed-off-by Yonggang Luo <[email protected]>
--- meson.build | 2 +- scripts/undefsym.py | 57 +++++++++++++++++++++++++++++++++++++++++++++ scripts/undefsym.sh | 20 ---------------- 3 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 scripts/undefsym.py delete mode 100755 scripts/undefsym.sh
meson.build +1 -1
@@ -859,7 +859,7 @@ foreach d, list : modules endforeach nm = find_program('nm') -undefsym = find_program('scripts/undefsym.sh') +undefsym = find_program('scripts/undefsym.py') block_syms = custom_target('block.syms', output: 'block.syms', input: [libqemuutil, block_mods], capture: true,
scripts/undefsym.py new file +57 -0
57 lines not on this page · raw message
scripts/undefsym.sh deleted +0 -20
@@ -1,20 +0,0 @@ -#! /usr/bin/env bash - -# Before a shared module's DSO is produced, a static library is built for it -# and passed to this script. The script generates -Wl,-u options to force -# the inclusion of symbol from libqemuutil.a if the shared modules need them, -# This is necessary because the modules may use functions not needed by the -# executable itself, which would cause the function to not be linked in. -# Then the DSO loading would fail because of the missing symbol. - -if test $# -le 2; then - exit 0 -fi - -NM=$1 -staticlib=$2 -shift 2 -# Find symbols defined in static libraries and undefined in shared modules -comm -12 \ - <( $NM -P -g $staticlib | awk '$2!="U"{print "-Wl,-u," $1}' | sort -u) \ - <( $NM -P -g "$@" | awk '$2=="U"{print "-Wl,-u," $1}' | sort -u)
Signature · 1 line
2.27.0.windows.1
Quoted 13 lines · On Fri, 28 Aug 2020 at 15:11, <[email protected]> wrote:
From: Yonggang Luo <[email protected]>
undefsym.share not msys2 compatible, convert it to python scriptSigned-off-by Yonggang Luo <[email protected]>scripts/undefsym.py new file +0
-0
scripts/undefsym.py line 3
Quoted 3 lines
scripts/undefsym.py new file +3
-0@@ -0,0 +1,57 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +
All new files need to start with a header comment giving the copyright and license information, please.
thanks
-- PMM