public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables
@ 2021-01-18 14:29 brechtsanders at users dot sourceforge.net
  2021-01-18 14:32 ` [Bug c/98729] " brechtsanders at users dot sourceforge.net
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: brechtsanders at users dot sourceforge.net @ 2021-01-18 14:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729

            Bug ID: 98729
           Summary: GCC 11 MinGW Windows build doesn't generate working PE
                    executables
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: brechtsanders at users dot sourceforge.net
  Target Milestone: ---

Created attachment 49994
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49994&action=edit
Invalid Windows .exe PE file

When I try to build GCC 11 for MinGW (using MinGW-w64 8.0.0) configure fails
(on both 32-bit and 64-bit) when it's trying to test if it can run a compiled
.exe file.

When I replicate this command with:
`echo "int main () { return 0; }" |
/R/winlibs64_stage/gcc-11-20210117/build_mingw/./gcc/xgcc
-B/R/winlibs64_stage/gcc-11-20210117/build_mingw/./gcc/
-L/R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/x86_64-w64-mingw32/lib
-L/R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/mingw/lib -isystem
/R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/x86_64-w64-mingw32/include
-isystem /R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/mingw/include
-B/R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/x86_64-w64-mingw32/bin/
-B/R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/x86_64-w64-mingw32/lib/
-isystem
/R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/x86_64-w64-mingw32/include
-isystem
/R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/x86_64-w64-mingw32/sys-include
--sysroot=/R/winlibs64_stage/gcc-11-20210117/build_mingw/mingw-w64   -o
conftest.exe -g -O2 -xc -`
it builds `conftest.exe`, but running it (fro MSYS2 bash shell) with
`conftest.exe` fails with error `bash: ./conftest.exe: cannot execute binary
file: Exec format error`, or when I run it from Windows or Command prompt it
pops up a message saying `This app can't run on your PC`.

The command `file conftest.exe` does return `conftest.exe: PE32+ executable
(console) x86-64, for MS Windows`.

I have attached this file.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2021-02-09 20:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 14:29 [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables brechtsanders at users dot sourceforge.net
2021-01-18 14:32 ` [Bug c/98729] " brechtsanders at users dot sourceforge.net
2021-01-18 16:40 ` [Bug target/98729] " pinskia at gcc dot gnu.org
2021-01-18 17:16 ` brechtsanders at users dot sourceforge.net
2021-01-19  7:38 ` [Bug target/98729] [11 Regression] " rguenth at gcc dot gnu.org
2021-01-19  7:41 ` rguenth at gcc dot gnu.org
2021-01-19 19:06 ` brechtsanders at users dot sourceforge.net
2021-01-19 19:06 ` brechtsanders at users dot sourceforge.net
2021-01-20  9:23 ` brechtsanders at users dot sourceforge.net
2021-01-20 12:40 ` brechtsanders at users dot sourceforge.net
2021-02-01 17:39 ` ebotcazou at gcc dot gnu.org
2021-02-02  8:51 ` brechtsanders at users dot sourceforge.net
2021-02-02 12:05 ` ebotcazou at gcc dot gnu.org
2021-02-09 20:21 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).