Add %mingw_nm macro

This commit is contained in:
Sandro Mani 2017-09-10 13:51:18 +02:00
parent c9e430bd5a
commit 9a9de1654b
3 changed files with 9 additions and 2 deletions

View File

@ -7,6 +7,7 @@
%mingw_strip mingw-strip
%mingw_objdump mingw-objdump
%mingw_objcopy mingw-objcopy
%mingw_nm mingw-nm
%mingw_findprovides %{_rpmconfigdir}/mingw-find-provides.sh %{mingw_build_targets}
%mingw_findrequires %{_rpmconfigdir}/mingw-find-requires.sh %{mingw_build_targets}

View File

@ -6,7 +6,7 @@
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
Name: mingw-filesystem
Version: 102
Version: 103
Release: 1%{?dist}
Summary: MinGW cross compiler base filesystem and environment
@ -309,6 +309,9 @@ install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_datadir}/mingw/
%changelog
* Sun Sep 10 2017 Sandro Mani <manisandro@gmail.com> - 103-1
- Add %%mingw_nm macro
* Sat Sep 09 2017 Sandro Mani <manisandro@gmail.com> - 102-1
- Also extract debuginfo data from pyd binaries

View File

@ -25,7 +25,10 @@ do
echo extracting debug info from $f
mingw-objcopy --only-keep-debug $f $f.debug || :
pushd `dirname $f`
mingw-objcopy --add-gnu-debuglink=`basename $f.debug` --strip-unneeded `basename $f` || :
keep_symbols=`mktemp`
mingw-nm $f.debug --format=sysv --defined-only | awk -F \| '{ if ($4 ~ "Function") print $1 }' | sort > "$keep_symbols"
mingw-objcopy --add-gnu-debuglink=`basename $f.debug` --strip-unneeded `basename $f` --keep-symbols="$keep_symbols" || :
rm -f "$keep_symbols"
popd
done