[PATCH] Re: stripping of DLLs?

Erik van Pienbroek erik at vanpienbroek.nl
Mon Jun 22 18:08:10 UTC 2009


Op maandag 22-06-2009 om 13:48 uur [tijdzone +0200], schreef Kevin
Kofler: 
> Erik van Pienbroek wrote:
> > I've also added a patch for one of my packages to indicate the steps
> > needed for all mingw32 packages to get -debug subpackage support. It
> > basically consists of two extra lines.
> > 
> > There's one thing that needs attention: one needs to add
> > %define __os_install_post %{_mingw32_debug_install_post}
> > to the spec file. %global doesn't work in this case!
> 
> Does this work on packages which are mixed native and cross such as
> mingw32-nsis?
> 
> And it should indeed be -debuginfo, not -debug.
> 
>         Kevin Kofler

While researching that situation I've discovered that the wrong RPM
variable is being overridden. Instead of __os_install_post the variable
__debug_install_post should be used. When __os_install_post is used,
stripping of the static libraries doesn't occur anymore. So the new line
should be:

%define __debug_install_post %{_mingw32_debug_install_post}

What's the best way to rectify this in the mingw32-filesystem package as
the ChangeLog entry for mingw32-filesystem-52-1.fc12 mentions the wrong
comment? See http://koji.fedoraproject.org/koji/buildinfo?buildID=111324

On with the mixed packages: I've experimented a bit with producing
debuginfo subpackages for both the native and mingw bits of mingw32-nsis
and came up with this:

%define __debug_install_post \
        %{_rpmconfigdir}/find-debuginfo.sh
%{?_missing_build_ids_terminate_build:--strict-build-id}
%{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}" \
        mkdir %{_builddir}/%{?buildsubdir}/tmp \
        /usr/lib/rpm/mingw32-find-debuginfo.sh
%{_builddir}/%{?buildsubdir}/tmp \
        cat %{_builddir}/%{?buildsubdir}/tmp/debugfiles.list >>
%{_builddir}/%{?buildsubdir}/debugfiles.list \
        rm -rf %{_builddir}/%{?buildsubdir}/tmp \
        %{nil}

With this instruction, the debuginfo for the native bits will be
generated first. Next the debuginfo for the mingw bits will be created.
The debugfiles.list which is produced in this step will be saved to a
temporary location. Next, the two debugfiles.list files are merged
together.

For this type of packages (where BuildArch != noarch), it isn't
necessary to use the %{_mingw32_debug_package} macro as that's done
automatically by RPM.

Please note that the current version of mingw32-nsis is compiled without
debug symbols (the mingw bits) so no mingw files are added to the
-debuginfo subpackage right now.

Regards,

Erik van Pienbroek









More information about the mingw mailing list