https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88772
--- Comment #4 from Andoni <ylatuya at gmail dot com> --- (In reply to Eric Botcazou from comment #3) > > I just wiped the build to start a clean build from scratch, but I remember > > checking this and it was "no". I can confirm it in ~1 hour > > Can you confirm that we're talking about the 32-bit multilib of libgcc here? > Then, if the answer was "no", we need to understand why. The check is > simple: > > dnl Check if the compiler is configured for setjmp/longjmp exceptions. > AC_DEFUN([GCC_CHECK_SJLJ_EXCEPTIONS], > [AC_CACHE_CHECK([whether the compiler is configured for setjmp/longjmp > exceptions], > ac_cv_sjlj_exceptions, > [AC_COMPILE_IFELSE( > [AC_LANG_PROGRAM( > [[#ifdef __USING_SJLJ_EXCEPTIONS__ > this will fail > #endif]], > [[int i;]])], > [ac_cv_sjlj_exceptions=no], > [ac_cv_sjlj_exceptions=yes])])]) > > Can you run it manually with -m32? For 64bits the result is "no": 643 configure:4751: checking whether the compiler is configured for setjmp/longjmp exceptions 644 configure:4769: x86_64-w64-mingw32-gcc -L/home/andoni/mingw/windows/multilib/x86_64-w64-mingw32/lib -L/home/andoni/mingw/windows/multilib/mingw/lib -isystem /home /andoni/mingw/windows/multilib/x86_64-w64-mingw32/include -isystem /home/andoni/mingw/windows/multilib/mingw/include -c -Wall -g -O2 -DWINVER=0x0600 -D_WIN32_ WINNT=0x0600 conftest.c >&5 645 conftest.c: In function 'main': 646 conftest.c:30:5: warning: unused variable 'i' [-Wunused-variable] 647 int i; 648 ^ 649 configure:4769: $? = 0 650 configure:4776: result: no for 32 bits the result is "yes": 631 configure:4751: checking whether the compiler is configured for setjmp/longjmp exceptions 632 configure:4769: x86_64-w64-mingw32-gcc -L/home/andoni/mingw/windows/multilib/x86_64-w64-mingw32/lib -L/home/andoni/mingw/windows/multilib/mingw/lib -isystem /home /andoni/mingw/windows/multilib/x86_64-w64-mingw32/include -isystem /home/andoni/mingw/windows/multilib/mingw/include -m32 -c -Wall -g -O2 -DWINVER=0x0600 -D_WIN 32_WINNT=0x0600 conftest.c >&5 633 conftest.c:25:11: error: unknown type name 'this' 634 this will fail 635 ^~~~ 636 conftest.c:25:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'fail' 637 this will fail 638 ^~~~ 639 configure:4769: $? = 1 [...] 674 configure:4776: result: yes For 32 bits the final EH model being used is Dwarf2: 340 # Additional sources to handle exceptions; overridden by targets as needed. 341 LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/unwind-dw2-fde.c \ 342 $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c What I understand is happening in a multilib build is that for 64 it chooses SEH because ac_cv_sjlj_exceptions is not "yes" but for 32, it chooses dw2 instead of SJLJ for the same reason, because ac_cv_sjlj_exceptions is not "yes": if test x$ac_cv_sjlj_exceptions = xyes; then tmake_eh_file="i386/t-sjlj-eh" elif test "${host_address}" = 32; then # biarch -m32 with --disable-sjlj-exceptions tmake_eh_file="i386/t-dw2-eh" md_unwind_header=i386/w32-unwind.h else tmake_eh_file="i386/t-seh-eh" fi What should happen in a mutilib build is that if the user configured without passing any specific options for EH, the 32 bits target should be forced to be configured with --enable-sjlj-exceptions.