Re: Switching Fedora mingw compiler to dwarf2 exceptions
by Hin-Tak Leung
(I am not on the list - and after looking at the archive, actually not very interested on most of the traffic... sorry if this offends some people).
BTW, I like to correct a mis-conception - you do not remove dependency with sjlj.dll with changing to dwarf2 exception - you just change to depend on a new dll, libgcc_s_dw2-1.dll .
14 years, 4 months
Switching to DWARF2 exceptions
by Kalev Lember
Hello,
We've talked about switching from SJLJ exceptions to DWARF2 for a while.
Last time when we were asked to switch over [1], it was too late in
Fedora release cycle to do it without compromising stability. However,
now that F-13 cycle has begun, I think it would be right time to switch.
Switching to DWARF2 is needed to fix binary compatibility with upstream
mingw gcc 4 compiler. Besides that, SJLJ has runtime cost in the common
case when no exceptions are thrown; DWARF2 doesn't have that problem.
MinGW upstream also thinks that DWARF2 should be made default in FSF GCC
in the future [2].
I have prepared needed changes to do the switchover. My tests show that
throwing exceptions between mingw DLLs works correctly with DWARF2. But
DWARF2 also includes a regression: unwinding through DLLs that use SEH
exceptions (Visual Studio compilers produce that) no longer works. To
work around that, upstream mingw has a patch to annotate functions which
support unwinding with SEH with __attribute__((seh_aware)). I've tested
that patch and it really does fix binary compatibility with binaries
produced by Visual Studio.
After the switchover mingw32-gcc will no longer provide
"mingw32(libgcc_s_sjlj-1.dll)". There are a number of mingw32- packages
that require that; I'll need to rebuild those in correct depencency
order to fix broken deps. The affected packages are:
$ sudo repoquery --disablerepo=* --enablerepo=rawhide --qf
'%{sourcerpm}' --whatrequires 'mingw32(libgcc_s_sjlj-1.dll)' | sort |
uniq | sed 's/-[^-]*-[^-]*\.src.rpm//'
mingw32-boost
mingw32-cairomm
mingw32-cppunit
mingw32-enchant
mingw32-gettext
mingw32-glibmm24
mingw32-gtkmm24
mingw32-hunspell
mingw32-libglademm24
mingw32-libsigc++20
mingw32-libsqlite3x
mingw32-libtiff
mingw32-libxml++
mingw32-pangomm
mingw32-plib
mingw32-plotmm
mingw32-pthreads
mingw32-qt
mingw32-qwt
mingw32-zfstream
I'll request commit access for each of those in pkgdb and rebuild the
affected packages myself. I'm not very interested in having tons of
broken dependencies introduced in rawhide, and the only way to avoid
that is to rebuild the packages quickly.
Also note that mingw32-qwt currently fails to rebuild in rawhide and
will have a broken dep; Thomas Sailer said that qwt author thinks it's a
bug in Qt itself.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=510949
[2] http://thread.gmane.org/gmane.comp.gnu.mingw.devel/3331/focus=3348
--
Kalev
14 years, 4 months