> -----Original Message-----
> From: Jason Merrill <[email protected]>
> Sent: 28 February 2026 21:26
> To: gcc-patches mailing list <[email protected]>; Evgeny Karpov
> <[email protected]>; Matthieu Longo <[email protected]>;
> Andrew Pinski <[email protected]>; Richard Earnshaw
> <[email protected]>; [email protected]; Saurabh Jha
> via Sourceware Forge <[email protected]>
> Subject: Re: [PATCH v1 1/1] aarch64: mingw: Fix regression in C++ support
>
> On 2/25/26 6:07 PM, Saurabh Jha via Sourceware Forge wrote:
> > From: Saurabh Jha <[email protected]>
> >
> > Fixes regression in C++ support without exception handling by:
> > 1. Creating Makefile fragments, t-seh-eh and t-sjlj-eh, that configures
> > C++ exception handling. This is sufficient to fix the regression
> > even if the exception handling itself is not implemented yet.
> > 2. Adding the new Makefile fragments, t-sjlj-eh and t-seh-eh, in
> > libgcc/config.host.
Do we actually need the setjiump/longjump fragment? As far as I'm aware
64-bit mingw only uses SEH and SJLJ is there only for compatibility with 32-bit
systems. So it seems unlikely we'd ever support it.
Thanks,
Tamar
> >
> > With these changes, the compiler can now be built with C and C++.
> >
> > This patch doesn't add support for Structured Exception Handling (SEH)
> > which will be done separately.
> >
> > libgcc/ChangeLog:
> >
> > * config.host: Set tmake_eh_file for aarch64-*-mingw*.
> > * config/aarch64/t-no-eh: Removed.
> > * config/aarch64/t-seh-eh: New file.
> > * config/aarch64/t-sjlj-eh: New file.
> >
> > gcc/testsuite/ChangeLog:
> >
> > * gcc.target/aarch64/mingw/mingw.exp: Add support for .cc files.
> > * gcc.target/aarch64/mingw/minimal_new_del.cc: New test.
>
> Why not use .C extension like other C++ tests? Presumably any issues
> with windows case handling would affect other tests as well.
>
> > diff --git a/libgcc/config.host b/libgcc/config.host
> > index 850a37b05558..d46019f363dd 100644
> > --- a/libgcc/config.host
> > +++ b/libgcc/config.host
> > @@ -463,7 +463,14 @@ aarch64-*-mingw*)
> > tmake_thr_file="mingw/t-mingw-mcfgthread"
> > ;;
> > esac
> > - tmake_file="${tmake_file} ${cpu_type}/t-no-eh ${tmake_thr_file}"
> > + # This has to match the logic for DWARF2_UNWIND_INFO in
> > + # gcc/config/aarch64/cygming.h
>
> All I see in that file is
>
> #define DWARF2_UNWIND_INFO 0
>
> > + if test x$ac_cv_sjlj_exceptions = xyes; then
> > + tmake_eh_file="aarch64/t-sjlj-eh"
> > + else
> > + tmake_eh_file="aarch64/t-seh-eh"
> > + fi
> > + tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_thr_file}"
> > tmake_file="${tmake_file} t-dfprules"
> > tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
> > tmake_file="${tmake_file} ${cpu_type}/t-mingw"