[Bug ada/100486] Ada build fails for 32bit Windows

2022-05-22 Thread charlet at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #74 from Arnaud Charlet  ---
The patch is desirable even outside of this PR, so we'll keep it. And as shown
by PR105507, we have other exception propagation that crept in unintentionally,
so I'll also have a look at these when I get a chance.

[Bug ada/100486] Ada build fails for 32bit Windows

2022-05-22 Thread reiter.christoph at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #73 from Christoph Reiter  ---
In a similar bug 105507 we figured out that the MSYS2 build was broken because
it was linking libgcc both statically and dynamically via dependencies, and
that breaks exceptions with dwarf-2.

So in theory the above patch could be reverted. I can try building with it
being reverted to confirm, if wanted.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-20 Thread reiter.christoph at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #72 from Christoph Reiter  ---
Works nicely now. Thanks everyone!

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-20 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #71 from Óscar Fuentes  ---
(In reply to Eric Botcazou from comment #70)
> Tentatively fixed, reopen if not.

The bootstrap works.

Thank you.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-20 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

Eric Botcazou  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED
   Target Milestone|--- |11.3

--- Comment #70 from Eric Botcazou  ---
Tentatively fixed, reopen if not.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #69 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Eric Botcazou
:

https://gcc.gnu.org/g:40b209e340b610248f9b1eec082f6b1ff734a2d0

commit r11-9177-g40b209e340b610248f9b1eec082f6b1ff734a2d0
Author: Arnaud Charlet 
Date:   Wed Oct 20 10:23:40 2021 +0200

Avoid exception propagation during bootstrap

This addresses PR ada/100486, which is the bootstrap failure of GCC 11 for
32-bit Windows in the MSYS setup.  The PR shows that we cannot rely on
exception propagation being operational during the bootstrap, at least on
the 11 branch, so fix this by removing the problematic raise statement.

gcc/ada/
PR ada/100486
* sem_prag.adb (Check_Valid_Library_Unit_Pragma): Do not raise an
exception as part of the bootstrap.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #68 from CVS Commits  ---
The master branch has been updated by Eric Botcazou :

https://gcc.gnu.org/g:8fe93cc664ded8cc1952da28b23f3fc68504a73e

commit r12-4530-g8fe93cc664ded8cc1952da28b23f3fc68504a73e
Author: Arnaud Charlet 
Date:   Wed Oct 20 10:23:40 2021 +0200

Avoid exception propagation during bootstrap

This addresses PR ada/100486, which is the bootstrap failure of GCC 11 for
32-bit Windows in the MSYS setup.  The PR shows that we cannot rely on
exception propagation being operational during the bootstrap, at least on
the 11 branch, so fix this by removing the problematic raise statement.

gcc/ada/
PR ada/100486
* sem_prag.adb (Check_Valid_Library_Unit_Pragma): Do not raise an
exception as part of the bootstrap.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-18 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #67 from Eric Botcazou  ---
> Note that, as before, .text.startup is present in gcc-10 but missing in
> gcc-11 crtend.o.

That's expected if you compile with -Og or -O1, i.e. it requires -O2 or above.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-18 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #66 from Óscar Fuentes  ---
(In reply to Eric Botcazou from comment #65)
> Thanks.  Do you still have this line:
> 
>  r .eh_frame
> 
> for crtend.o of the GCC 10 compiler after the grep mess was resolved?  Do
> you have the same line for the crtend.o of the GCC 11 compiler?

The problem with grep didn't affect my gcc 10 install because it was built with
grep 3.0, so crtend.o didn't change. Here it is again for completeness:

$ for f in `find /mingw32 -name crtend.o` ; do echo $f && nm $f ; done 
/mingw32/lib/gcc/i686-w64-mingw32/10.3.0/crtend.o
 b .bss
 d .ctors.65535
 d .data
 r .eh_frame
 r .rdata$zzz
 t .text
 t .text.startup
 r ___FRAME_END__
 U ___gcc_register_frame
 t _register_frame_ctor


Now, these are the crtend.o created in the gcc 11.2 build directory before it
failed at a-except.o (this is also with grep 3.0, while in comment#29 was with
the botched grep 3.6, but I see no differences):

$ for f in `find
/d/dev/other/MINGW-packages/mingw-w64-gcc/src/build-i686-w64-mingw32 -name
crtend.o` ; do echo $f && nm $f ; done
/d/dev/other/MINGW-packages/mingw-w64-gcc/src/build-i686-w64-mingw32/prev-gcc/crtend.o
 b .bss
 d .ctors.65535
 d .data
 r .eh_frame
 r .rdata$zzz
 t .text
 r ___FRAME_END__
 U ___gcc_register_frame
 t _register_frame_ctor
/d/dev/other/MINGW-packages/mingw-w64-gcc/src/build-i686-w64-mingw32/prev-i686-w64-mingw32/libgcc/crtend.o
 b .bss
 d .ctors.65535
 d .data
 r .eh_frame
 r .rdata$zzz
 t .text
 r ___FRAME_END__
 U ___gcc_register_frame
 t _register_frame_ctor


Note that, as before, .text.startup is present in gcc-10 but missing in gcc-11
crtend.o.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-18 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #65 from Eric Botcazou  ---
> Searching for HAVE_LD_RO_RW_SECTION_MIXING in the build directory used for
> extracting the previous gdb backtraces shows this:
> 
> gcc/auto-host.h:1684:11:/* #undef HAVE_LD_RO_RW_SECTION_MIXING */

Thanks.  Do you still have this line:

 r .eh_frame

for crtend.o of the GCC 10 compiler after the grep mess was resolved?  Do you
have the same line for the crtend.o of the GCC 11 compiler?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-18 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #64 from Óscar Fuentes  ---
Searching for HAVE_LD_RO_RW_SECTION_MIXING in the build directory used for
extracting the previous gdb backtraces shows this:

gcc/auto-host.h:1684:11:/* #undef HAVE_LD_RO_RW_SECTION_MIXING */

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-18 Thread charlet at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #63 from Arnaud Charlet  ---
(In reply to Eric Botcazou from comment #62)
> > No need to, there are actually several reasons to not rely on exception
> > propagation during bootstrap, so let's restore this invariant instead, I'm
> > testing a change to that effect.
> 
> Fair enough.  In any case, the symptoms are again consistent with a lack of
> registration of unwind tables, this time for libgcc, so this might be the
> same underlying issue as the grep-induced mess for GCC 10.  My hunch would
> point to a  constructor section merging issue in the linker, maybe related
> to the GCC configure check for HAVE_LD_RO_RW_SECTION_MIXING, which should
> fail for MinGW and may incorrectly succeed when things go wrong.

Right, that's most likely the underlying issue and indeed ensuring we don't use
exception propagation during the bootstrap is just a way to hide/avoid this
underlying mismatch.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-18 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #62 from Eric Botcazou  ---
> No need to, there are actually several reasons to not rely on exception
> propagation during bootstrap, so let's restore this invariant instead, I'm
> testing a change to that effect.

Fair enough.  In any case, the symptoms are again consistent with a lack of
registration of unwind tables, this time for libgcc, so this might be the same
underlying issue as the grep-induced mess for GCC 10.  My hunch would point to
a  constructor section merging issue in the linker, maybe related to the GCC
configure check for HAVE_LD_RO_RW_SECTION_MIXING, which should fail for MinGW
and may incorrectly succeed when things go wrong.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-18 Thread charlet at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #61 from Arnaud Charlet  ---
(In reply to Eric Botcazou from comment #60)
> > And yes, the previous PR was more of a special case while this PR is in the
> > middle of the bootstrap path (triggers as part of compiling a-except.adb).
> 
> Right.  As a last resort, I'm OK to try backporting the improved bootstrap
> process present on the mainline onto this 11 branch.

No need to, there are actually several reasons to not rely on exception
propagation during bootstrap, so let's restore this invariant instead, I'm
testing a change to that effect.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-18 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #60 from Eric Botcazou  ---
> And yes, the previous PR was more of a special case while this PR is in the
> middle of the bootstrap path (triggers as part of compiling a-except.adb).

Right.  As a last resort, I'm OK to try backporting the improved bootstrap
process present on the mainline onto this 11 branch.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-18 Thread charlet at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #59 from Arnaud Charlet  ---
Right, PR ada/80590.
And yes, the previous PR was more of a special case while this PR is in the
middle of the bootstrap path (triggers as part of compiling a-except.adb).

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-18 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #58 from Eric Botcazou  ---
So we have the dreaded mix of 11.x Ada exception code and 10.x unwind code:

#0  0x773bb68b in msvcrt!abort () from C:\WINDOWS\SysWOW64\msvcrt.dll
#1  0x02074f7d in uw_init_context_1 (context=context@entry=0x1070c890,
outer_cfa=outer_cfa@entry=0x1070ca70,
outer_ra=0x406f8a <__gnat_Unwind_RaiseException(_Unwind_Exception*)+17>)
at ../../../gcc-10.3.0/libgcc/unwind-dw2.c:1593
#2  0x01e2ba3d in _Unwind_RaiseException (exc=0x132d8a90)
at ../../../gcc-10.3.0/libgcc/unwind.inc:93
#3  0x00406f8a in __gnat_Unwind_RaiseException (e=e@entry=0x132d8a90)
at ../../gcc-11.2.0/gcc/ada/raise-gcc.c:1391

On the one hand, this should no longer exist on the mainline but, on the other
hand, this has never been problematic for AdaCore's internal builds.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-18 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #57 from Eric Botcazou  ---
> Thanks for the log, exception propagation crept in again in the bootstrap
> causing the same kind of issues as last time, investigating how to get rid
> of exception propagation when compiling a-except.adb

Are you referring to PR ada/80590?  Note that this was an exception propagation
during the build of the runtime for a --disable-bootstrap build.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-18 Thread charlet at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

Arnaud Charlet  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |charlet at gcc dot 
gnu.org
 Status|WAITING |ASSIGNED
 CC||charlet at gcc dot gnu.org

--- Comment #56 from Arnaud Charlet  ---
Thanks for the log, exception propagation crept in again in the bootstrap
causing the same kind of issues as last time, investigating how to get rid of
exception propagation when compiling a-except.adb

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-17 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #55 from Óscar Fuentes  ---
Here we go (this is a debug build):

$
/d/dev/other/MINGW-packages/mingw-w64-gcc/src/build-i686-w64-mingw32/./prev-gcc/xgcc
-B/d/dev/other/MINGW-packages/mingw-w64-gcc/src/build-i686-w64-mingw32/./prev-gcc/
-B/mingw32/i686-w64-mingw32/bin/ -L/mingw32/i686-w64-mingw32/lib -L/mingw32/lib
-isystem /mingw32/i686-w64-mingw32/include -isystem /mingw32/include
-B/mingw32/i686-w64-mingw32/bin/ -B/mingw32/i686-w64-mingw32/lib/ -isystem
/mingw32/i686-w64-mingw32/include -isystem
/mingw32/i686-w64-mingw32/sys-include   -fno-checking -c -g -O2
-D__USE_MINGW_ACCESS -Wno-pedantic-ms-format -fno-checking -gtoggle  -gnatpg 
-W -Wall -g -O1 -fno-inline  -nostdinc -I- -I. -Iada/generated -Iada
-Iada/gcc-interface -I../../gcc-11.2.0/gcc/ada
-I../../gcc-11.2.0/gcc/ada/gcc-interface -Iada/libgnat
-I../../gcc-11.2.0/gcc/ada/libgnat
../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb -o ada/libgnat/a-except.o
-wrapper gdb,--args
GNU gdb (GDB) 10.2
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "i686-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from
D:/dev/other/MINGW-packages/mingw-w64-gcc/src/build-i686-w64-mingw32/prev-gcc/gnat1.exe...
Breakpoint 1 at 0x1b9b938: file ../../gcc-11.2.0/gcc/diagnostic.c, line 1884.
Breakpoint 2 at 0x1b9b79f: file ../../gcc-11.2.0/gcc/diagnostic.c, line 1804.
Breakpoint 3 at 0x1e3b618
Breakpoint 4 at 0x1e3b5e8
File tree.h will be skipped when stepping.
File is-a.h will be skipped when stepping.
File line-map.h will be skipped when stepping.
File timevar.h will be skipped when stepping.
Function rtx_expr_list::next will be skipped when stepping.
Function rtx_expr_list::element will be skipped when stepping.
Function rtx_insn_list::next will be skipped when stepping.
Function rtx_insn_list::insn will be skipped when stepping.
Function rtx_sequence::len will be skipped when stepping.
Function rtx_sequence::element will be skipped when stepping.
Function rtx_sequence::insn will be skipped when stepping.
Function INSN_UID will be skipped when stepping.
Function PREV_INSN will be skipped when stepping.
Function SET_PREV_INSN will be skipped when stepping.
Function NEXT_INSN will be skipped when stepping.
Function SET_NEXT_INSN will be skipped when stepping.
Function BLOCK_FOR_INSN will be skipped when stepping.
Function PATTERN will be skipped when stepping.
Function INSN_LOCATION will be skipped when stepping.
Function INSN_HAS_LOCATION will be skipped when stepping.
Function JUMP_LABEL_AS_INSN will be skipped when stepping.
Successfully loaded GDB hooks for GCC
(gdb) catch exception
Catchpoint 5: all Ada exceptions
(gdb) run
Starting program:
D:\dev\other\MINGW-packages\mingw-w64-gcc\src\build-i686-w64-mingw32\prev-gcc\gnat1.exe
-I - -I . -I ada/generated -I ada -I ada/gcc-interface -I
../../gcc-11.2.0/gcc/ada -I ../../gcc-11.2.0/gcc/ada/gcc-interface -I
ada/libgnat -I ../../gcc-11.2.0/gcc/ada/libgnat -gnatwa -quiet -nostdinc -O2
-O1 -Wno-pedantic-ms-format -Wextra -Wall -dumpdir ada/libgnat/ -dumpbase
a-except.adb -dumpbase-ext .adb -g -fno-checking -gtoggle -gnatpg -g
-fno-inline "-mtune=generic" "-march=i686" -gnatO ada/libgnat/a-except.o
../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb -o C:\apps\msys64\tmp\ccyhgK0H.s
[New Thread 4320.0x1d80]
[New Thread 4320.0x1d04]
[New Thread 4320.0x2010]
gnat1.exe: warning: command-line option '-Wno-pedantic-ms-format' is valid for
C/C++/ObjC/ObjC++ but not for Ada

Catchpoint 5, SEM_PRAG.ANALYZE_PRAGMA.PRAGMA_EXIT (sem_prag.adb:6605) at
0x007e816c in sem_prag.analyze_pragma.check_valid_library_unit_pragma ()
at ../../gcc-11.2.0/gcc/ada/sem_prag.adb:6605
6605  raise Pragma_Exit;
(gdb) bt
#0  <__gnat_debug_raise_exception> (
e=0x207a990 , message=...)
at ../../gcc-11.2.0/gcc/ada/libgnat/s-excdeb.adb:40
#1  0x0048e862 in ada.exceptions.complete_occurrence (x=x@entry=0x132d8ac0)
at ../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb:912
#2  0x0048e878 in ada.exceptions.complete_and_propagate_occurrence (
x=x@entry=0x132d8ac0) at ../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb:923
#3  0x0048e8b3 in <__gnat_raise_exception> (
e=0x207a990 , message=...)
at ../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb:960
#4  0x007e816c in sem_prag.analyze_pragma.check_valid_library_unit_pragma ()
at ../../gcc-11.2.0/gcc/ada/sem_prag.adb:6605
#5  

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-17 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #54 from Eric Botcazou  ---
> "this" means the problem with C++ exceptions, which indeed is fixed by
> building gcc after reverting to grep 3.0.
> 
> The build failure with Ada, which predated the grep upgrade, persists.
> 
> Eric: I'm sorry for the time you wasted on this wild goose chase.

No problem, I already wasted more time in other circumstances...

So we're back to square one with the Ada-specific problem.  At this point a
backtrace would really be needed because our environments are quite different.

According to the initial report, the problem occurs during stage #2 compiling
ada/libgnat/a-except.adb, so one would need to go into the gcc/ subdirectory of
the build tree and replay the command line:

/C/_/mingw-w64-gcc/src/build-i686-w64-mingw32/./prev-gcc/xgcc
-B/C/_/mingw-w64-gcc/src/build-i686-w64-mingw32/./prev-gcc/
-B/mingw32/i686-w64-mingw32/bin/ -L/mingw32/i686-w64-mingw32/lib -L/mingw32/lib
-isystem /mingw32/i686-w64-mingw32/include -isystem /mingw32/include
-B/mingw32/i686-w64-mingw32/bin/ -B/mingw32/i686-w64-mingw32/lib/ -isystem
/mingw32/i686-w64-mingw32/include -isystem
/mingw32/i686-w64-mingw32/sys-include   -fno-checking -c -g -O2
-D__USE_MINGW_ACCESS -Wno-pedantic-ms-format -fno-checking -gtoggle  -gnatpg 
-W -Wall -g -O1 -fno-inline \
2021-05-08T11:34:54.9009139Z  -nostdinc -I- -I. -Iada/generated -Iada
-Iada/gcc-interface -I../../gcc-11.1.0/gcc/ada
-I../../gcc-11.1.0/gcc/ada/gcc-interface -Iada/libgnat
-I../../gcc-11.1.0/gcc/ada/libgnat
../../gcc-11.1.0/gcc/ada/libgnat/a-except.adb -o ada/libgnat/a-except.o

after appending -wrapper gdb,--args to it.  This should launch an interactive
GDB session for gcc/gnat1 with the above command line.  Then 'catch exception'
and 'run' might reveal what happens.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-16 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #53 from Óscar Fuentes  ---
(In reply to Christoph Reiter from comment #52)
> Turns out this might be fallout from the last grep update, see
> https://github.com/msys2/MINGW-packages/issues/9771#issuecomment-945007372
> Needs investigating..

"this" means the problem with C++ exceptions, which indeed is fixed by building
gcc after reverting to grep 3.0.

The build failure with Ada, which predated the grep upgrade, persists.

Eric: I'm sorry for the time you wasted on this wild goose chase.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-16 Thread reiter.christoph at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #52 from Christoph Reiter  ---
Turns out this might be fallout from the last grep update, see
https://github.com/msys2/MINGW-packages/issues/9771#issuecomment-945007372
Needs investigating..

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-16 Thread reiter.christoph at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #51 from Christoph Reiter  ---
(In reply to Eric Botcazou from comment #50)
> > Yes, from 2.36.1 to 2.37, but I've already tried reverting that and it
> > didn't help. I'm going to try older versions (of everything) though..
> 
> This could as well be a miscompilation of the linker.  Can you upload ld.exe
> somewhere so that I replace mine with it?

If you happen to have an tool that supports extracting .tar.zst you could take
the .exe from package directly:
https://repo.msys2.org/mingw/mingw32/mingw-w64-i686-binutils-2.37-4-any.pkg.tar.zst

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-16 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #50 from Eric Botcazou  ---
> Yes, from 2.36.1 to 2.37, but I've already tried reverting that and it
> didn't help. I'm going to try older versions (of everything) though..

This could as well be a miscompilation of the linker.  Can you upload ld.exe
somewhere so that I replace mine with it?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-16 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #49 from Eric Botcazou  ---
> Fore completeness: The "exceptions not working" problem now also crept into
> our v10.3 build with the last rebuild. Maybe some dependency change in the
> last two months, but no idea :/
> 
> https://github.com/msys2/MINGW-packages/issues/9771

I can confirm that the libstdc++ DLL available from there is broken in exactly
the same way as the one from GCC 11: it fails to register its unwinding tables,
i.e. the call to __register_frame_info on startup is missing.  That's managed
by the pair of crtbegin.o/ctrend.o object files from the compiler but the
intermediate __gcc_register_frame is never called.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-16 Thread reiter.christoph at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #48 from Christoph Reiter  ---
(In reply to Eric Botcazou from comment #47)
> > Yes, everything is checksummed in our build script. We apply various patches
> > and backports, they are also checksummed:
> > https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-gcc/PKGBUILD
> 
> Did you change binutils, in particular the linker, in between?

Yes, from 2.36.1 to 2.37, but I've already tried reverting that and it didn't
help. I'm going to try older versions (of everything) though..

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-16 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #47 from Eric Botcazou  ---
> Yes, everything is checksummed in our build script. We apply various patches
> and backports, they are also checksummed:
> https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-gcc/PKGBUILD

Did you change binutils, in particular the linker, in between?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-16 Thread reiter.christoph at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #46 from Christoph Reiter  ---
(In reply to Eric Botcazou from comment #45)
> > Fore completeness: The "exceptions not working" problem now also crept into
> > our v10.3 build with the last rebuild. Maybe some dependency change in the
> > last two months, but no idea :/
> > 
> > https://github.com/msys2/MINGW-packages/issues/9771
> 
> Can you confirm that this is with the same compiler sources as the previous
> 10.3 version that works?  Do you apply local changes to them?

Yes, everything is checksummed in our build script. We apply various patches
and backports, they are also checksummed:
https://github.com/msys2/MINGW-packages/blob/master/mingw-w64-gcc/PKGBUILD

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-16 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #45 from Eric Botcazou  ---
> Fore completeness: The "exceptions not working" problem now also crept into
> our v10.3 build with the last rebuild. Maybe some dependency change in the
> last two months, but no idea :/
> 
> https://github.com/msys2/MINGW-packages/issues/9771

Can you confirm that this is with the same compiler sources as the previous
10.3 version that works?  Do you apply local changes to them?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread reiter.christoph at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #44 from Christoph Reiter  ---
Fore completeness: The "exceptions not working" problem now also crept into our
v10.3 build with the last rebuild. Maybe some dependency change in the last two
months, but no idea :/

https://github.com/msys2/MINGW-packages/issues/9771

So this isn't something new in v11

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #43 from Óscar Fuentes  ---
(In reply to Eric Botcazou from comment #42)
> Can you remove the crtbegin.o too, just to be sure, rebuild libstdc++ and
> upload the DLL at the same URL as before?

Same result after moving away crtbegin.o. DLL uploaded with name

libstdc++-6.dll.without-crt-begin-end

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #42 from Eric Botcazou  ---
> After removing the spurious crtend.o and rebuilding libstdc++ following
> those instructions, the new libstdc++-6.dll still crashes the same way.

Can you remove the crtbegin.o too, just to be sure, rebuild libstdc++ and
upload the DLL at the same URL as before?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #41 from Óscar Fuentes  ---
(In reply to Eric Botcazou from comment #40)
> > Do you want a full rebuild of gcc?
> 
> At least a full rebuild of libstdc++-v3:
>   rm -rf i686-w64-mingw32/libstdc++-v3
>   make all-target-libstdc++-v3 -jN

After removing the spurious crtend.o and rebuilding libstdc++ following those
instructions, the new libstdc++-6.dll still crashes the same way.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #40 from Eric Botcazou  ---
> Do you want a full rebuild of gcc?

At least a full rebuild of libstdc++-v3:
  rm -rf i686-w64-mingw32/libstdc++-v3
  make all-target-libstdc++-v3 -jN

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #39 from Eric Botcazou  ---
> We do not have it.  Can you (temporarily) remove it and see what happens?

In fact we specifically remove them at packaging time:

# Remove crtbegin.o and crtend.o. We are rebuilding them during
# GCC builds
rm(os.path.join(self["PKG_DIR"], "lib", "crtbegin.o"))
rm(os.path.join(self["PKG_DIR"], "lib", "crtend.o"))

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #38 from Óscar Fuentes  ---
(In reply to Eric Botcazou from comment #37)
> > It comes from the MinGW-w64 CRT.
> 
> We do not have it.  Can you (temporarily) remove it and see what happens?

After moving away that file, exceptions still are broken, but that can be due
to a tainted libstdc++ dll.

Do you want a full rebuild of gcc?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #37 from Eric Botcazou  ---
> It comes from the MinGW-w64 CRT.

We do not have it.  Can you (temporarily) remove it and see what happens?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #36 from Óscar Fuentes  ---
(In reply to Eric Botcazou from comment #34)
> > These are the crtend.o from the installed gcc 10.3 (which works fine):
> > 
> > $ for f in `find /mingw32 -name crtend.o` ; do echo $f && nm $f ; done  
> > /mingw32/i686-w64-mingw32/lib/crtend.o
> >  b .bss
> >  d .data
> >  r .rdata$zzz
> >  t .text
> 
> Where does this one come from exactly?  It looks totally empty.

It comes from the MinGW-w64 CRT.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #35 from Óscar Fuentes  ---
Yes, it is a debug build (the libstdc++ dll you got is from that). The same
crash happens with a release build, though.

Note the -Og going after the -O2:

/d/dev/other/MINGW-packages/mingw-w64-gcc/src/build-i686-w64-mingw32/./gcc/xgcc
-B/d/dev/other/MINGW-packages/mingw-w64-gcc/src/build-i686-w64-mingw32/./gcc/
-L/mingw32/i686-w64-mingw32/lib -L/mingw32/lib -isystem
/mingw32/i686-w64-mingw32/include -isystem /mingw32/include
-B/mingw32/i686-w64-mingw32/bin/ -B/mingw32/i686-w64-mingw32/lib/ -isystem
/mingw32/i686-w64-mingw32/include -isystem
/mingw32/i686-w64-mingw32/sys-include-g -march=pentium4 -mtune=generic -O2
-pipe -ggdb -Og
-fdebug-prefix-map=/d/dev/other/MINGW-packages/mingw-w64-gcc/src=/usr/src/debug
-O2 -g -march=pentium4 -mtune=generic -O2 -pipe -ggdb -Og
-fdebug-prefix-map=/d/dev/other/MINGW-packages/mingw-w64-gcc/src=/usr/src/debug
-DIN_GCC-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes
-Wno-error=format-diag -Wold-style-definition  -isystem ./include  -I. -I.
-I../.././gcc -I../../../gcc-11.2.0/libgcc -I../../../gcc-11.2.0/libgcc/.
-I../../../gcc-11.2.0/libgcc/../gcc -I../../../gcc-11.2.0/libgcc/../include
-I../../../gcc-11.2.0/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT  -g0 
-finhibit-size-directive -fno-inline -fno-exceptions
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize
-fbuilding-libgcc -fno-stack-protector-I. -I. -I../.././gcc
-I../../../gcc-11.2.0/libgcc -I../../../gcc-11.2.0/libgcc/.
-I../../../gcc-11.2.0/libgcc/../gcc -I../../../gcc-11.2.0/libgcc/../include
-I../../../gcc-11.2.0/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -o
crtend.o -MT crtend.o -MD -MP -MF crtend.dep -fno-omit-frame-pointer -Wno-error
-c ../../../gcc-11.2.0/libgcc/config/i386/cygming-crtend.c

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #34 from Eric Botcazou  ---
> These are the crtend.o from the installed gcc 10.3 (which works fine):
> 
> $ for f in `find /mingw32 -name crtend.o` ; do echo $f && nm $f ; done  
> /mingw32/i686-w64-mingw32/lib/crtend.o
>  b .bss
>  d .data
>  r .rdata$zzz
>  t .text

Where does this one come from exactly?  It looks totally empty.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #33 from Eric Botcazou  ---
> Weird, this looks like a compilation at -O0.  Can you post the command line?

-O1 gives the same assembly.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #32 from Eric Botcazou  ---
> The compilation emits this warning:
> 
> ../../../gcc-11.2.0/libgcc/config/i386/cygming-crtend.c:59:1: warning:
> constructor priorities from 0 to 100 are reserved for the implementation
> [-Wprio-ctor-dtor]
>59 | static void register_frame_ctor (void) __attribute__ ((constructor
> (0)));
>   | ^~

Yes, expected.

> Contents of crtend.s:
> 
> $ cat crtend.s
> .file   "cygming-crtend.c"
> .text
> .section.eh_frame,"w"
> .align 4
> ___FRAME_END__:
> .space 4
> .text
> .def_register_frame_ctor;   .scl3;  .type   32;
> .endef
> _register_frame_ctor:
> LFB55:
> .cfi_startproc
> pushl   %ebp
> .cfi_def_cfa_offset 8
> .cfi_offset 5, -8
> movl%esp, %ebp
> .cfi_def_cfa_register 5
> subl$8, %esp
> call___gcc_register_frame
> leave
> .cfi_restore 5
> .cfi_def_cfa 4, 4
> ret
> .cfi_endproc
> LFE55:
> .section.ctors.65535,"w"
> .align 4
> .long   _register_frame_ctor
> .ident  "GCC: (Rev1, Built by MSYS2 project) 11.2.0"
> .def___gcc_register_frame;  .scl2;  .type   32;
> .endef

Weird, this looks like a compilation at -O0.  Can you post the command line?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #31 from Óscar Fuentes  ---
> Could you replay the compilation of this file?  In the top level directory,
> do
>   rm i686-w64-mingw32/libgcc/crtend.o
>   make all-target-libgcc
> copy the (long) command line, go into the i686-w64-mingw32/libgcc directory
> and execute it after adding -save-temps to it.  You should get a small
> assembly file named crtend.s and I would be interested in its contents.

The compilation emits this warning:

../../../gcc-11.2.0/libgcc/config/i386/cygming-crtend.c:59:1: warning:
constructor priorities from 0 to 100 are reserved for the implementation
[-Wprio-ctor-dtor]
   59 | static void register_frame_ctor (void) __attribute__ ((constructor
(0)));
  | ^~


Contents of crtend.s:

$ cat crtend.s
.file   "cygming-crtend.c"
.text
.section.eh_frame,"w"
.align 4
___FRAME_END__:
.space 4
.text
.def_register_frame_ctor;   .scl3;  .type   32; .endef
_register_frame_ctor:
LFB55:
.cfi_startproc
pushl   %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl%esp, %ebp
.cfi_def_cfa_register 5
subl$8, %esp
call___gcc_register_frame
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE55:
.section.ctors.65535,"w"
.align 4
.long   _register_frame_ctor
.ident  "GCC: (Rev1, Built by MSYS2 project) 11.2.0"
.def___gcc_register_frame;  .scl2;  .type   32; .endef

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #30 from Eric Botcazou  ---
> I have quite a few crtend.o files in the build directory. A quick glance
> indicates that .text.startup is missing:
> 
> $ for f in `find ./build-i686-w64-mingw32/ -name crtend.o` ; do echo $f &&
> nm $f ; done
> ./build-i686-w64-mingw32/gcc/crtend.o
>  b .bss
>  d .ctors.65535
>  d .data
>  r .eh_frame
>  r .rdata$zzz
>  t .text
>  r ___FRAME_END__
>  U ___gcc_register_frame
>  t _register_frame_ctor

Yep, that is suspicious, this might indicate that:

static void register_frame_ctor (void) __attribute__ ((constructor (0)));

is not considered a static constructor.

Could you replay the compilation of this file?  In the top level directory, do
  rm i686-w64-mingw32/libgcc/crtend.o
  make all-target-libgcc
copy the (long) command line, go into the i686-w64-mingw32/libgcc directory and
execute it after adding -save-temps to it.  You should get a small assembly
file named crtend.s and I would be interested in its contents.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #29 from Óscar Fuentes  ---
(In reply to Eric Botcazou from comment #28)
> OK, I know what's wrong in the libstdc++.dll of GCC 11, now let's try to
> figure out why this is so...  Can you run 'nm' on one of the occurrences of
> crtend.o in the build tree (there are two copies of it)?  On my machine it
> yields:
> 
>  b .bss
>  d .ctors.65535
>  d .data
>  d .eh_frame
>  r .rdata$zzz
>  t .text
>  t .text.startup
>  d ___FRAME_END__
>  U ___gcc_register_frame
>  t _register_frame_ctor

I have quite a few crtend.o files in the build directory. A quick glance
indicates that .text.startup is missing:

$ for f in `find ./build-i686-w64-mingw32/ -name crtend.o` ; do echo $f && nm
$f ; done
./build-i686-w64-mingw32/gcc/crtend.o
 b .bss
 d .ctors.65535
 d .data
 r .eh_frame
 r .rdata$zzz
 t .text
 r ___FRAME_END__
 U ___gcc_register_frame
 t _register_frame_ctor
./build-i686-w64-mingw32/i686-w64-mingw32/libgcc/crtend.o
 b .bss
 d .ctors.65535
 d .data
 r .eh_frame
 r .rdata$zzz
 t .text
 r ___FRAME_END__
 U ___gcc_register_frame
 t _register_frame_ctor
./build-i686-w64-mingw32/prev-gcc/crtend.o
 b .bss
 d .ctors.65535
 d .data
 r .eh_frame
 r .rdata$zzz
 t .text
 r ___FRAME_END__
 U ___gcc_register_frame
 t _register_frame_ctor
./build-i686-w64-mingw32/prev-i686-w64-mingw32/libgcc/crtend.o
 b .bss
 d .ctors.65535
 d .data
 r .eh_frame
 r .rdata$zzz
 t .text
 r ___FRAME_END__
 U ___gcc_register_frame
 t _register_frame_ctor
./build-i686-w64-mingw32/stage1-gcc/crtend.o
 b .bss
 d .ctors.65535
 d .data
 r .eh_frame
 r .rdata$zzz
 t .text
 r ___FRAME_END__
 U ___gcc_register_frame
 t _register_frame_ctor
./build-i686-w64-mingw32/stage1-i686-w64-mingw32/libgcc/crtend.o
 b .bss
 d .ctors.65535
 d .data
 r .eh_frame
 r .rdata$zzz
 t .text
 r ___FRAME_END__
 U ___gcc_register_frame
 t _register_frame_ctor



These are the crtend.o from the installed gcc 10.3 (which works fine):

$ for f in `find /mingw32 -name crtend.o` ; do echo $f && nm $f ; done 
/mingw32/i686-w64-mingw32/lib/crtend.o
 b .bss
 d .data
 r .rdata$zzz
 t .text
/mingw32/lib/gcc/i686-w64-mingw32/10.3.0/crtend.o
 b .bss
 d .ctors.65535
 d .data
 r .eh_frame
 r .rdata$zzz
 t .text
 t .text.startup
 r ___FRAME_END__
 U ___gcc_register_frame
 t _register_frame_ctor

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #28 from Eric Botcazou  ---
OK, I know what's wrong in the libstdc++.dll of GCC 11, now let's try to figure
out why this is so...  Can you run 'nm' on one of the occurrences of crtend.o
in the build tree (there are two copies of it)?  On my machine it yields:

 b .bss
 d .ctors.65535
 d .data
 d .eh_frame
 r .rdata$zzz
 t .text
 t .text.startup
 d ___FRAME_END__
 U ___gcc_register_frame
 t _register_frame_ctor

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #27 from Eric Botcazou  ---
> Curious. I tested the executable on Windows 10 and on Wine, with same
> result. Maybe your setup is hiding the output? Or the executable is not
> being started at all? (I've seen that on some environments where a required
> dll was missing or was incorrect.)

My bad, missing executable bit on the DLLs...

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #26 from Óscar Fuentes  ---
(In reply to Eric Botcazou from comment #25)
> > Sorry, I misread your message and now realized that you just wanted the
> > executable and its dependencies. They are now on the same URL. The 11.2
> > libstdc++ and libgcc dlls are built with debug info.
> 
> Thanks.  I cannot reproduce the problem though:

Curious. I tested the executable on Windows 10 and on Wine, with same result.
Maybe your setup is hiding the output? Or the executable is not being started
at all? (I've seen that on some environments where a required dll was missing
or was incorrect.)

I uploaded new excep.cpp/excep.exe files. Now the executable should give signs
of life before crashing:

$ ./excep.exe
Throwing...

terminate called after throwing an instance of 'int'
terminate called recursively

abnormal program termination


I suggest to try the reproducer under a normal Windows shell, not some
MSYS2/Cygwin terminal emulator.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-15 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #25 from Eric Botcazou  ---
> Sorry, I misread your message and now realized that you just wanted the
> executable and its dependencies. They are now on the same URL. The 11.2
> libstdc++ and libgcc dlls are built with debug info.

Thanks.  I cannot reproduce the problem though:

botcazou@PAWNEE ~
$ cd gcc10/

botcazou@PAWNEE ~/gcc10
$ ./excep.exe 

botcazou@PAWNEE ~/gcc10
$ ls -l
total 2636
-rwxr-xr-x+ 1 botcazou None  111259 Oct 15 09:25 excep.exe
-rwxr-xr-x+ 1 botcazou None  604303 Oct 15 09:23 libgcc_s_dw2-1.dll
-rw-r--r--+ 1 botcazou None 1904773 Oct 15 09:23 libstdc++-6.dll
-rw-r--r--+ 1 botcazou None   69066 Oct 15 09:25 libwinpthread-1.dll

botcazou@PAWNEE ~/gcc10
$ cd ..

botcazou@PAWNEE ~
$ cd gcc11/

botcazou@PAWNEE ~/gcc11
$ ls -l
total 24636
-rwxr-xr-x+ 1 botcazou None   111259 Oct 15 09:25 excep.exe
-rwxr-xr-x+ 1 botcazou None   604303 Oct 15 09:25 libgcc_s_dw2-1.dll
-rwxr-xr-x+ 1 botcazou None 24433712 Oct 15 09:25 libstdc++-6.dll
-rw-r--r--+ 1 botcazou None69066 Oct 15 09:25 libwinpthread-1.dll

botcazou@PAWNEE ~/gcc11
$ ./excep.exe 

botcazou@PAWNEE ~/gcc11

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-11 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #24 from Óscar Fuentes  ---
Sorry, I misread your message and now realized that you just wanted the
executable and its dependencies. They are now on the same URL. The 11.2
libstdc++ and libgcc dlls are built with debug info.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-11 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #23 from Óscar Fuentes  ---
See http://88.17.68.234/clientes/gcc

It contains the gcc binary packages with debug info, plus packages for
dependencies (mpc/gmp/etc.)

It also contains the libstdc++ dll from 10.3 (the "working" one).

The gcc packages are built with the MSYS2 local patches included in the tarfile
patches.tgz.

Note that a build without local patches was already tried with the same failure
while building Ada.

If the local patches are a problem for you, I'll make a build from stock gcc,
but it will take time.

Please let me know if you need something else. Thanks.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-11 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #22 from Eric Botcazou  ---
> ldd does not list libstdc++.dll, but `Dependency Walker` lists both
> libstdc++.dll and libgcc_s_dw2-1.dll.
> 
> Imports from libstdc++.dll:
> 
> _ZTIi
> __cxa_allocate_exception
> __cxa_begin_catch
> __cxa_end_catch
> __cxa_throw
> __gxx_personality_v0
> 
> 
> Imports from libgcc_s_dw2-1.dll:
> 
> __deregister_frame_info
> __register_frame_info

Yes, I figured out that ldd was not reliable in the meantime.  How nice...

So it looks like exception propagation is broken in your setup and it's hard to
guess why without investigating a little.  Of course it's a bit tricky to do,
especially on Windows.

Can you upload somewhere a package containing the executable,
libgcc_s_dw2-1.dll and libstdc++.dll from GCC 11, as well as libstdc++.dll from
GCC 10 and post the URL here?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-11 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #21 from Óscar Fuentes  ---
(In reply to Eric Botcazou from comment #20)
> Weird, I don't have any dependency on the DLL for it:
> 
> $ ldd t.exe
> ntdll.dll => /Windows/SYSTEM32/ntdll.dll (0x7ffc6556)
> ntdll.dll => /Windows/SysWOW64/ntdll.dll (0x770b)
> wow64.dll => /Windows/System32/wow64.dll (0x5d1b)
> wow64win.dll => /Windows/System32/wow64win.dll (0x5d21)
> 
> Can you post the output of 'g++ foo.cpp -v' for your C++ testcase?  Can you
> find out what symbol(s) of libstdc++.dll are referenced by your executable?

ldd does not list libstdc++.dll, but `Dependency Walker` lists both
libstdc++.dll and libgcc_s_dw2-1.dll.

Imports from libstdc++.dll:

_ZTIi
__cxa_allocate_exception
__cxa_begin_catch
__cxa_end_catch
__cxa_throw
__gxx_personality_v0


Imports from libgcc_s_dw2-1.dll:

__deregister_frame_info
__register_frame_info


$ g++ -v excep.cpp
Using built-in specs.
COLLECT_GCC=D:\dev\other\MINGW-packages\mingw-w64-gcc\pkg\mingw-w64-i686-gcc\mingw32\bin\g++.exe
COLLECT_LTO_WRAPPER=D:/dev/other/MINGW-packages/mingw-w64-gcc/pkg/mingw-w64-i686-gcc/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.2.0/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../gcc-11.2.0/configure --prefix=/mingw32
--with-local-prefix=/mingw32/local --build=i686-w64-mingw32
--host=i686-w64-mingw32 --target=i686-w64-mingw32
--with-native-system-header-dir=/mingw32/i686-w64-mingw32/include
--libexecdir=/mingw32/lib --enable-bootstrap --enable-checking=release
--with-arch=i686 --with-tune=generic
--enable-languages=c,lto,c++,fortran,objc,obj-c++,jit --enable-shared
--enable-static --enable-libatomic --enable-threads=posix --enable-graphite
--enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts
--enable-libstdcxx-time --disable-libstdcxx-pch --enable-libstdcxx-debug
--enable-lto --enable-libgomp --disable-multilib --disable-rpath
--disable-win32-registry --disable-nls --disable-werror --disable-symvers
--with-libiconv --with-system-zlib --with-gmp=/mingw32 --with-mpfr=/mingw32
--with-mpc=/mingw32 --with-isl=/mingw32 --with-pkgversion='Rev1, Built by MSYS2
project' --with-bugurl=https://github.com/msys2/MINGW-packages/issues
--with-gnu-as --with-gnu-ld --with-boot-ldflags='-pipe
-Wl,--dynamicbase,--nxcompat,--no-seh -Wl,--large-address-aware
-Wl,--disable-dynamicbase -static-libstdc++ -static-libgcc'
'LDFLAGS_FOR_TARGET=-pipe -Wl,--dynamicbase,--nxcompat,--no-seh
-Wl,--large-address-aware'
--enable-linker-plugin-flags='LDFLAGS=-static-libstdc++\ -static-libgcc\ -pipe\
-Wl,--dynamicbase,--nxcompat,--no-seh\ -Wl,--large-address-aware\
-Wl,--stack,12582912' --disable-sjlj-exceptions --with-dwarf2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (Rev1, Built by MSYS2 project)
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=i686'
'-dumpdir' 'a-'

D:/dev/other/MINGW-packages/mingw-w64-gcc/pkg/mingw-w64-i686-gcc/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.2.0/cc1plus.exe
-quiet -v -iprefix
D:/dev/other/MINGW-packages/mingw-w64-gcc/pkg/mingw-w64-i686-gcc/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.2.0/
-D_REENTRANT excep.cpp -quiet -dumpdir a- -dumpbase excep.cpp -dumpbase-ext
.cpp -mtune=generic -march=i686 -version -o C:\apps\msys64\tmp\ccit4tWf.s
GNU C++17 (Rev1, Built by MSYS2 project) version 11.2.0 (i686-w64-mingw32)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version
4.1.0-p13, MPC version 1.2.1, isl version isl-0.24-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"D:/dev/other/MINGW-packages/mingw-w64-gcc/pkg/mingw-w64-i686-gcc/mingw32/bin/../lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/include"
ignoring duplicate directory
"D:/dev/other/MINGW-packages/mingw-w64-gcc/pkg/mingw-w64-i686-gcc/mingw32/lib/gcc/../../lib/gcc/i686-w64-mingw32/11.2.0/../../../../include/c++/11.2.0"
ignoring duplicate directory
"D:/dev/other/MINGW-packages/mingw-w64-gcc/pkg/mingw-w64-i686-gcc/mingw32/lib/gcc/../../lib/gcc/i686-w64-mingw32/11.2.0/../../../../include/c++/11.2.0/i686-w64-mingw32"
ignoring duplicate directory
"D:/dev/other/MINGW-packages/mingw-w64-gcc/pkg/mingw-w64-i686-gcc/mingw32/lib/gcc/../../lib/gcc/i686-w64-mingw32/11.2.0/../../../../include/c++/11.2.0/backward"
ignoring duplicate directory
"D:/dev/other/MINGW-packages/mingw-w64-gcc/pkg/mingw-w64-i686-gcc/mingw32/lib/gcc/../../lib/gcc/i686-w64-mingw32/11.2.0/include"
ignoring duplicate directory
"D:/dev/other/MINGW-packages/mingw-w64-gcc/pkg/mingw-w64-i686-gcc/mingw32/lib/gcc/../../lib/gcc/i686-w64-mingw32/11.2.0/include-fixed"
ignoring nonexistent directory
"D:/dev/other/MINGW-packages/mingw-w64-gcc/pkg/mingw-w64-i686-gcc/mingw32/lib/gcc/../../lib/gcc/i686-w64-mingw32/11.2.0/../../../../i686-w64-mingw32/include"
#include "..." search starts here:
#include <...> search starts here:


[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-11 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #20 from Eric Botcazou  ---
> Adding --enable-frame-pointer makes no difference. No change either adding
> 
> --enable-large-address-aware --with-fpmath=sse --disable-sjlj-exceptions
> --enable-frame-pointer --disable-libada --enable-libstdcxx
> 
> Another data point: for the test mentioned on Comment 16, if I replace
> libstdc++.dll with the same file from gcc 10, the test works.

Weird, I don't have any dependency on the DLL for it:

$ ldd t.exe
ntdll.dll => /Windows/SYSTEM32/ntdll.dll (0x7ffc6556)
ntdll.dll => /Windows/SysWOW64/ntdll.dll (0x770b)
wow64.dll => /Windows/System32/wow64.dll (0x5d1b)
wow64win.dll => /Windows/System32/wow64win.dll (0x5d21)

Can you post the output of 'g++ foo.cpp -v' for your C++ testcase?  Can you
find out what symbol(s) of libstdc++.dll are referenced by your executable?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-10 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #19 from Óscar Fuentes  ---
When I say that --enable-frame-pointer makes no difference, I'm talking about
the build failure that prompted this bug report. The build still fails with

  /C/_/mingw-w64-gcc/src/build-i686-w64-mingw32/./prev-gcc/xgcc
-B/C/_/mingw-w64-gcc/src/build-i686-w64-mingw32/./prev-gcc/
-B/mingw32/i686-w64-mingw32/bin/ -L/mingw32/i686-w64-mingw32/lib -L/mingw32/lib
-isystem /mingw32/i686-w64-mingw32/include -isystem /mingw32/include
-B/mingw32/i686-w64-mingw32/bin/ -B/mingw32/i686-w64-mingw32/lib/ -isystem
/mingw32/i686-w64-mingw32/include -isystem
/mingw32/i686-w64-mingw32/sys-include   -fno-checking -c -g -O2
-D__USE_MINGW_ACCESS -Wno-pedantic-ms-format -fno-checking -gtoggle  -gnatpg 
-W -Wall -g -O1 -fno-inline \
   -nostdinc -I- -I. -Iada/generated -Iada -Iada/gcc-interface
-I../../gcc-11.2.0/gcc/ada -I../../gcc-11.2.0/gcc/ada/gcc-interface
-Iada/libgnat -I../../gcc-11.2.0/gcc/ada/libgnat
../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb -o ada/libgnat/a-except.o

make[3]: *** [../../gcc-11.2.0/gcc/ada/gcc-interface/Make-lang.in:1052:
ada/libgnat/a-except.o] Error 1

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-10 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #18 from Óscar Fuentes  ---
Adding --enable-frame-pointer makes no difference. No change either adding

--enable-large-address-aware --with-fpmath=sse --disable-sjlj-exceptions
--enable-frame-pointer --disable-libada --enable-libstdcxx

Another data point: for the test mentioned on Comment 16, if I replace
libstdc++.dll with the same file from gcc 10, the test works.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-10 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #17 from Eric Botcazou  ---
Thanks for the data point.  We have a working 11.2 compiler on the same
platform configured with:

../src/configure --enable-languages=ada,c,c++ --enable-checking=release
--enable-threads=win32 --enable-lto --enable-large-address-aware
--with-fpmath=sse --disable-sjlj-exceptions --enable-frame-pointer
--disable-nls --disable-libstdcxx-pch --disable-libada --enable-libstdcxx

Would it be possible for you to add --enable-frame-pointer to the options?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-10-09 Thread gcc_bugzilla at axeitado dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #16 from Óscar Fuentes  ---
With g++ 11.2 mingw-w64-i686 a simple test like this crashes:

int main() {
  try {
throw 13;
  }
  catch(...) {
return 1;
  }
  return 0;
}

$ g++ foo.cpp
$ ./a.exe
terminate called after throwing an instance of 'int'
terminate called recursively


The configure command is the same mentioned in comment 5, sans Ada.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-30 Thread reiter.christoph at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #15 from Christoph Reiter  ---
Still the same error with GCC 11.2 and binutils 2.37:
https://github.com/msys2/MINGW-packages/pull/9088/checks?check_run_id=3196226530

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-28 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #14 from Eric Botcazou  ---
Now that GCC 11.2 and binutils 2.37 are out, could you retry with them?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-05 Thread ralphengels at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

ralphengels at gmail dot com  changed:

   What|Removed |Added

 CC||ralphengels at gmail dot com

--- Comment #13 from ralphengels at gmail dot com  ---
sadly the successfull build of gcc-11 with dwarf exceptions cannot bootstrap
gcc-11 as well, though it now fails even in stage 1 the error is different and
seems to be equal to one encountered several years back with gcc-4.1.0 ->

TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h config/i386/xm-mingw32.h"
DEFINES="USED_FOR_TARGET " \
/bin/sh ../../gcc-11.1.0/gcc/mkconfig.sh tconfig.h
gnatmake: "xsinfo.adb" compilation error
echo "   S0 : constant String := \"/mingw32/\";" >>tmp-sdefault.adb
cat ../../gcc-11.1.0/gcc/config/i386/gmm_malloc.h > mm_malloc.h
/bin/sh: line 1: ./xsinfo: No such file or directory
(echo "@set version-GCC 11.1.0"; \
 if [ "" = "experimental" ]; \
 then echo "@set DEVELOPMENT"; \
 else echo "@clear DEVELOPMENT"; \
 fi) > gcc-vers.texiT
make[3]: *** [../../gcc-11.1.0/gcc/ada/Make-generated.in:45: ada/sinfo.h] Error
127
make[3]: *** Waiting for unfinished jobs

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-04 Thread ofv at wanadoo dot es via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #12 from ofv at wanadoo dot es ---
I don't see other failure messages on the previous dozens of lines but, if they
exist, they are not deemed serious enough to stop the build by the build
system.

BTW, we successfully built gcc-11-dwarf with gcc-10-sjlj. Now we will see if
the resulting binaries work for bootstrapping gcc-11. That would suggest that
there is a problem with 10 and it is fixed/masked/whatever on 11.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-04 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #11 from Eric Botcazou  ---
> Other users reported that only DWARF crashes. If the build is configured for
> SJLJ or SEH exception models, it completes.
> 
> A user speculated that the problem might be related to Gcc 11 using DWARF 5
> now. If you think that that is plausible and instruct me on how to revert
> that change I'll test the hypothesis.

We do have successful builds (DWARF EH + DWARF 5), that's why I'm trying to
understand what's different in your setup.  Do you really have no other failure
message than the one output by 'make'?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-04 Thread ofv at wanadoo dot es via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #10 from ofv at wanadoo dot es ---
Setting CFLAGS/CXXFLAGS/BOOT_CFLAGS to -dwarf-4 has no effect: the build fails
the same.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-04 Thread ofv at wanadoo dot es via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #9 from ofv at wanadoo dot es ---
With those variables unset the build fails the same.

Other users reported that only DWARF crashes. If the build is configured for
SJLJ or SEH exception models, it completes.

A user speculated that the problem might be related to Gcc 11 using DWARF 5
now. If you think that that is plausible and instruct me on how to revert that
change I'll test the hypothesis.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-04 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #8 from Eric Botcazou  ---
> make BOOT_CFLAGS='-O1' V=1 all
> 
> make BOOT_CFLAGS='-O0' V=1
> 
> both fails the same way as the initial report.

That's not what I was asking for though, BOOT_CFLAGS should generally not be
fiddled with.

> Finally, trying to reduce as much as possible the optimization passes:
> 
> export CFLAGS="-march=i686 -mtune=generic -Og -pipe"
> export CXXFLAGS="-march=i686 -mtune=generic -Og -pipe"
> make BOOT_CFLAGS='-Og' V=1

What happens if you do not set any of CFLAGS/CXXFLAGS/BOOT_CFLAGS?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-03 Thread ofv at wanadoo dot es via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #7 from ofv at wanadoo dot es ---
make BOOT_CFLAGS='-O1' V=1 all

make BOOT_CFLAGS='-O0' V=1

both fails the same way as the initial report.


export CFLAGS="-march=i686 -mtune=generic -O0 -pipe"
export CXXFLAGS="-march=i686 -mtune=generic -O0 -pipe"
make BOOT_CFLAGS='-O0' V=1

fails on

 configure: error: unsupported system, cannot find sizeof (omp_lock_t)
 make[2]: *** [Makefile:24035: configure-stage1-target-libgomp] Error 1

(this is before the build reaches the failure point discussed on this bug
report).


Finally, trying to reduce as much as possible the optimization passes:

export CFLAGS="-march=i686 -mtune=generic -Og -pipe"
export CXXFLAGS="-march=i686 -mtune=generic -Og -pipe"
make BOOT_CFLAGS='-Og' V=1

fails the same way as the initial report.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-03 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #6 from Eric Botcazou  ---
Thanks.

> '--with-bugurl=https://github.com/msys2/MINGW-packages/issues'
> '--with-gnu-as' '--with-gnu-ld' '--with-boot-ldflags=-pipe
> -Wl,--dynamicbase,--nxcompat,--no-seh -Wl,--large-address-aware
> -Wl,--disable-dynamicbase -static-libstdc++ -static-libgcc'
> 'LDFLAGS_FOR_TARGET=-pipe -Wl,--dynamicbase,--nxcompat,--no-seh
> -Wl,--large-address-aware'
> '--enable-linker-plugin-flags=LDFLAGS=-static-libstdc++\\ -static-libgcc\\
> -pipe\\ -Wl,--dynamicbase,--nxcompat,--no-seh\\ -Wl,--large-address-aware\\
> -Wl,--stack,12582912' '--disable-sjlj-exceptions' '--with-dwarf2'
> 'build_alias=i686-w64-mingw32' 'host_alias=i686-w64-mingw32'
> 'target_alias=i686-w64-mingw32' 'CC=gcc' 'CFLAGS=-march=i686 -mtune=generic
> -O2 -pipe' 'LDFLAGS=-pipe -Wl,--dynamicbase,--nxcompat,--no-seh
> -Wl,--large-address-aware -Wl,--disable-dynamicbase'
> 'CPPFLAGS=-D__USE_MINGW_ANSI_STDIO=1' 'CXX=g++' 'CXXFLAGS=-march=i686
> -mtune=generic -O2 -pipe'
> '--enable-languages=c,ada,c++,fortran,jit,lto,objc,obj-c++'"

AFAICS the failure occurs during stage #2 so the stage #1 compiler might be
miscompiled by the base compiler.  Could you change the -O2 into -O1 above?
If this still does not work, could you change it into -O0?

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-02 Thread ofv at wanadoo dot es via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #5 from ofv at wanadoo dot es ---
Taken from config.log:

ac_cs_config=" '--prefix=/mingw32' '--with-local-prefix=/mingw32/local'
'--build=i686-w64-mingw32' '--host=i686-w64-mingw32'
'--target=i686-w64-mingw32'
'--with-native-system-header-dir=/mingw32/i686-w64-mingw32/include'
'--libexecdir=/mingw32/lib' '--enable-bootstrap' '--enable-checking=release'
'--with-arch=i686' '--with-tune=generic' '--enable-shared' '--enable-static'
'--enable-libatomic' '--enable-threads=posix' '--enable-graphite'
'--enable-fully-dynamic-string' '--enable-libstdcxx-filesystem-ts'
'--enable-libstdcxx-time' '--disable-libstdcxx-pch' '--disable-libstdcxx-debug'
'--enable-lto' '--enable-libgomp' '--disable-multilib' '--disable-rpath'
'--disable-win32-registry' '--disable-nls' '--disable-werror'
'--disable-symvers' '--with-libiconv' '--with-system-zlib'
'--with-gmp=/mingw32' '--with-mpfr=/mingw32' '--with-mpc=/mingw32'
'--with-isl=/mingw32' '--with-pkgversion=Rev1, Built by MSYS2 project'
'--with-bugurl=https://github.com/msys2/MINGW-packages/issues' '--with-gnu-as'
'--with-gnu-ld' '--with-boot-ldflags=-pipe
-Wl,--dynamicbase,--nxcompat,--no-seh -Wl,--large-address-aware
-Wl,--disable-dynamicbase -static-libstdc++ -static-libgcc'
'LDFLAGS_FOR_TARGET=-pipe -Wl,--dynamicbase,--nxcompat,--no-seh
-Wl,--large-address-aware'
'--enable-linker-plugin-flags=LDFLAGS=-static-libstdc++\\ -static-libgcc\\
-pipe\\ -Wl,--dynamicbase,--nxcompat,--no-seh\\ -Wl,--large-address-aware\\
-Wl,--stack,12582912' '--disable-sjlj-exceptions' '--with-dwarf2'
'build_alias=i686-w64-mingw32' 'host_alias=i686-w64-mingw32'
'target_alias=i686-w64-mingw32' 'CC=gcc' 'CFLAGS=-march=i686 -mtune=generic -O2
-pipe' 'LDFLAGS=-pipe -Wl,--dynamicbase,--nxcompat,--no-seh
-Wl,--large-address-aware -Wl,--disable-dynamicbase'
'CPPFLAGS=-D__USE_MINGW_ANSI_STDIO=1' 'CXX=g++' 'CXXFLAGS=-march=i686
-mtune=generic -O2 -pipe'
'--enable-languages=c,ada,c++,fortran,jit,lto,objc,obj-c++'"

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-02 Thread ofv at wanadoo dot es via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #4 from ofv at wanadoo dot es ---
(In reply to Eric Botcazou from comment #3)
> We definitely cannot investigate this without more information, in
> particular the configure line.  Barring that, you might want to try with the
> current gcc-11 branch where a very recent change could help.

Which change? 014e6aa467b1648d09eab9897ca367bfec5e6b76 ? Applying that on top
of gcc 11.1 makes no difference.

Sorry for not providing the configure line yet. I'll try to setup a local build
environment ASAP.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-07-02 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

--- Comment #3 from Eric Botcazou  ---
We definitely cannot investigate this without more information, in particular
the configure line.  Barring that, you might want to try with the current
gcc-11 branch where a very recent change could help.

[Bug ada/100486] Ada build fails for 32bit Windows

2021-05-10 Thread ofv at wanadoo dot es via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

ofv at wanadoo dot es changed:

   What|Removed |Added

 CC||ofv at wanadoo dot es

--- Comment #2 from ofv at wanadoo dot es ---
IIUC the problem consists on the compiler crashing, so no "error message from
the compiler".

You can see the full build output here:

https://github.com/msys2/MINGW-packages/pull/8320/checks?check_run_id=2534098704

As for the configure line, it is not shown on the build output, I'll try to get
it from elsewhere. Meanwhile, you can look at the relevant point of the build
script here:

https://github.com/msys2/MINGW-packages/blob/134b37fb4bc9b395615cfdf701aeb0635c54fa1a/mingw-w64-gcc/PKGBUILD#L197

[Bug ada/100486] Ada build fails for 32bit Windows

2021-05-08 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100486

Eric Botcazou  changed:

   What|Removed |Added

   Last reconfirmed||2021-05-08
 Status|UNCONFIRMED |WAITING
 CC||ebotcazou at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Eric Botcazou  ---
We need 1) the configure line and 2) the error message from the compiler.