Hi, i'm on Windows 8.1 and using the package i686-7.3.0-release-posix-sjlj-rt_v5-rev0.7z. I've fixed GZDoom compilation (C++) for MinGW.
First the console executables are non functional and the makefile fails. These are old C targets. They won't give any output both from the command prompt and from within MSYS2. Also they can't create files. They just exit cleanly. A simple hello world program works however.
The first failing executable is arithchk.exe and the source is in the gdtoa folder(see below).
The makefiles are created with CMake (3.9.6).
I managed to compile the main target copying the exes created with tdm-gcc from another folder.
But GZDoom.exe also fails and exits cleanly, this is an OpenGL and DX application. With gdb i get the message inferior 1 exited with code 0375 (more numbers follow).
The source is @ https://github.com/drfrag666/gzdoom/tree/g3.3mgw
The main devs have suggested to report this issue to you. Thanks very much in advance.
Some news:
The arithchk executable is working when compiled separately without any flags. So some flag is breaking them. The project builds and runs with tdm-gcc.
`Building C object gdtoa/CMakeFiles/arithchk.dir/arithchk.c.obj
cd /d C:\DEV\msys32\g33mgw\release\gdtoa && C:\DEV\msys32\mingw32\bin\gcc.exe -DINFNAN_CHECK -DMULTIPLE_THREADS @CMakeFiles/arithchk.dir/includes_C.rsp -ffp-contract=off -fPIE -Wall -Wextra -g -D_DEBUG -D_DEBUG -o CMakeFiles\arithchk.dir\arithchk.c.obj -c C:\DEV\msys32\g33mgw\gdtoa\arithchk.c
Linking C executable arithchk.exe
cd /d C:\DEV\msys32\g33mgw\release\gdtoa && C:\DEV\cmake-3.9.6-win32-x86\bin\cmake.exe -E cmake_link_script CMakeFiles\arithchk.dir\link.txt --verbose=1
C:\DEV\cmake-3.9.6-win32-x86\bin\cmake.exe -E remove -f CMakeFiles\arithchk.dir/objects.a
C:\DEV\msys32\mingw32\bin\ar.exe cr CMakeFiles\arithchk.dir/objects.a @CMakeFiles\arithchk.dir\objects1.rsp
C:\DEV\msys32\mingw32\bin\gcc.exe -ffp-contract=off -fPIE -Wall -Wextra -g -D_DEBUG -D_DEBUG -pie -Wl,--whole-archive CMakeFiles\arithchk.dir/objects.a -Wl,--no-whole-archive -o arithchk.exe -Wl,--out-implib,libarithchk.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\arithchk.dir\linklibs.rsp
mingw32-make[2]: Leaving directory 'C:/DEV/msys32/g33mgw/release'
Built target arithchk
C:/DEV/msys32/mingw32/bin/mingw32-make -f gdtoa\CMakeFiles\qnan.dir\build.make gdtoa/CMakeFiles/qnan.dir/depend
mingw32-make[2]: Entering directory 'C:/DEV/msys32/g33mgw/release'
Generating arith.h
cd /d C:\DEV\msys32\g33mgw\release\gdtoa && .\arithchk.exe >C:/DEV/msys32/g33mgw/release/gdtoa/arith.h
mingw32-make[2]: Leaving directory 'C:/DEV/msys32/g33mgw/release'
mingw32-make[1]: Leaving directory 'C:/DEV/msys32/g33mgw/release'
mingw32-make[2]: [gdtoa\CMakeFiles\qnan.dir\build.make:61: gdtoa/arith.h] Error 295720572
mingw32-make[2]: Deleting file 'gdtoa/arith.h'
mingw32-make[1]: [CMakeFiles\Makefile2:780: gdtoa/CMakeFiles/qnan.dir/all] Error 2
mingw32-make: [Makefile:129: all] Error 2`
Sorry, it was not a bug. It's fixed now. It was the fPIE flag, it was added recently for Linux and was ignored by tdm-gcc but not with MinGW-w64. Thanks anyway.
Sorry, according to the main devs this is still a bug (an unimplemented feature creating broken code). Why does the fPIE flag break executables? Could you please elaborate? Thanks.