Store debug files below /usr/lib/debug
This commit is contained in:
parent
a2f99cbf2d
commit
6c5a8d2258
@ -6,8 +6,8 @@
|
||||
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
||||
|
||||
Name: mingw-filesystem
|
||||
Version: 119
|
||||
Release: 2%{?dist}
|
||||
Version: 120
|
||||
Release: 1%{?dist}
|
||||
Summary: MinGW cross compiler base filesystem and environment
|
||||
|
||||
License: GPLv2+
|
||||
@ -353,6 +353,10 @@ echo ".so man1/pkgconf.1" > %{buildroot}%{_mandir}/man1/x86_64-w64-mingw32-pkg-c
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Aug 27 2021 Sandro Mani <manisandro@gmail.com> - 120-1
|
||||
- Adapt mingw-find-debuginfo.sh to store debug files below /usr/lib/debug
|
||||
- See https://fedoraproject.org/wiki/Changes/F36MingwDebugLocation
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org>
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
|
@ -23,20 +23,22 @@ do
|
||||
esac
|
||||
|
||||
echo extracting debug info from $f
|
||||
mingw-objcopy --only-keep-debug $f $f.debug || :
|
||||
pushd `dirname $f`
|
||||
dest=${RPM_BUILD_ROOT}/usr/lib/debug${f/$RPM_BUILD_ROOT/}.debug
|
||||
mkdir -p `dirname $dest`
|
||||
mingw-objcopy --only-keep-debug $f $dest || :
|
||||
pushd `dirname $dest`
|
||||
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" || :
|
||||
mingw-nm $dest --format=sysv --defined-only | awk -F \| '{ if ($4 ~ "Function") print $1 }' | sort > "$keep_symbols"
|
||||
mingw-objcopy --add-gnu-debuglink=`basename $dest` --strip-unneeded `basename $f` --keep-symbols="$keep_symbols" || :
|
||||
rm -f "$keep_symbols"
|
||||
popd
|
||||
done
|
||||
|
||||
for target in $@; do
|
||||
prefix=`rpm --eval "%{_prefix}/%{${target}_target}"`
|
||||
if [ ! -d $RPM_BUILD_ROOT$prefix ] ; then
|
||||
if [ ! -d ${RPM_BUILD_ROOT}/usr/lib/debug/$prefix ] ; then
|
||||
continue
|
||||
fi
|
||||
find $RPM_BUILD_ROOT$prefix -type f -name "*.exe.debug" -or -name "*.dll.debug" -or -name "*.pyd.debug" |
|
||||
find ${RPM_BUILD_ROOT}/usr/lib/debug/$prefix -type f -name "*.exe.debug" -or -name "*.dll.debug" -or -name "*.pyd.debug" |
|
||||
sed -n -e "s#^$RPM_BUILD_ROOT##p" > $BUILDDIR/${target}-debugfiles.list
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user