Quote:
Originally Posted by LoRd_MuldeR
Try "g++ -v" and check the output.
|
Code:
$ ./i686-w64-mingw32-g++.exe -v
Using built-in specs.
COLLECT_GCC=./i686-w64-mingw32-g++
COLLECT_LTO_WRAPPER=/[...]/cross_compilers/mingw-w64-i686/libexec/gcc/i686-w64-mingw32/8.2.0/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: ../source/gcc-8.2.0/configure --build=i686-pc-cygwin --target=i686-w64-mingw32 --disable-shared --enable-static --disable-nls --disable-multilib --prefix=/[...]/cross_compilers/mingw-w64-i686 --with-sysroot=/[...]/cross_compilers/mingw-w64-i686 --with-mpc=/[...]/cross_compilers/pkgs/mpc/mpc-1.1.0-i686 --with-mpfr=/[...]/cross_compilers/pkgs/mpfr/mpfr-4.0.1-i686 --with-gmp=/[...]/cross_compilers/pkgs/gmp/gmp-6.1.2-i686 --with-isl=/[...]/cross_compilers/pkgs/isl/isl-0.20-i686 --enable-languages=c,c++ --enable-fully-dynamic-string --enable-lto
Thread model: win32
gcc version 8.2.0 (GCC)
I've tried to rerun the script with
--enable-threads=posix ...
Code:
diff --git a/patches/mingw-w64-build-r25 b/patches/mingw-w64-build-r25
index d43cbd5..007ce53 100755
--- a/patches/mingw-w64-build-r25
+++ b/patches/mingw-w64-build-r25
@@ -317,7 +317,7 @@ fi
case "$gcc_ver" in
$gcc_old_release_ver ) CC=$gcc "../source/gcc-$gcc_ver/configure" --build="$system_type" --target="$mingw_w64_target" "${static_build[@]}" "${disable_nls[@]}" --disable-multilib --prefix="$mingw_w64_prefix" --with-sysroot="$mingw_w64_prefix" --with-mpc="$mpc_prefix" --with-mpfr="$mpfr_prefix" --with-gmp="$gmp_prefix" --with-host-libstdcxx="-lstdc++" --with-cloog="$cloog_prefix" --with-isl="$isl_prefix" --enable-languages="$enabled_langs" --enable-fully-dynamic-string --enable-lto > >(build_log) 2>&1 ;;
- $gcc_release_ver ) CC=$gcc "../source/gcc-$gcc_ver/configure" --build="$system_type" --target="$mingw_w64_target" $gcc_host "${static_build[@]}" "${disable_nls[@]}" --disable-multilib --prefix="$mingw_w64_prefix" --with-sysroot="$mingw_w64_prefix" --with-mpc="$mpc_prefix" --with-mpfr="$mpfr_prefix" --with-gmp="$gmp_prefix" --with-isl="$isl_prefix" --enable-languages="$enabled_langs" --enable-fully-dynamic-string --enable-lto > >(build_log) 2>&1 || print_error ;;
+ $gcc_release_ver ) CC=$gcc "../source/gcc-$gcc_ver/configure" --build="$system_type" --target="$mingw_w64_target" $gcc_host "${static_build[@]}" "${disable_nls[@]}" --disable-multilib --prefix="$mingw_w64_prefix" --with-sysroot="$mingw_w64_prefix" --with-mpc="$mpc_prefix" --with-mpfr="$mpfr_prefix" --with-gmp="$gmp_prefix" --with-isl="$isl_prefix" --enable-languages="$enabled_langs" --enable-fully-dynamic-string --enable-lto --enable-threads=posix > >(build_log) 2>&1 || print_error ;;
esac
}
... but that didn't work out:
Code:
/[...]/cross_compilers/pkgs/gcc/build/./gcc/xgcc -B/[...]/cross_compilers/pkgs/gcc/build/./gcc/ -L/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib -L/[...]/cross_compilers/mingw-w64-i686/mingw/lib -isystem /[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -isystem /[...]/cross_compilers/mingw-w64-i686/mingw/include -B/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/bin/ -B/[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/lib/ -isystem /[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/include -isystem /[...]/cross_compilers/mingw-w64-i686/i686-w64-mingw32/sys-include -g -O2 -O2 -I../../../source/gcc-8.2.0/libgcc/../winsup/w32api/include -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -I. -I. -I../.././gcc -I../../../source/gcc-8.2.0/libgcc -I../../../source/gcc-8.2.0/libgcc/. -I../../../source/gcc-8.2.0/libgcc/../gcc -I../../../source/gcc-8.2.0/libgcc/../include -I../../../source/gcc-8.2.0/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_EMUTLS -o unwind-dw2.o -MT unwind-dw2.o -MD -MP -MF unwind-dw2.dep -fexceptions -c ../../../source/gcc-8.2.0/libgcc/unwind-dw2.c
In file included from ../../../source/gcc-8.2.0/libgcc/gthr.h:148,
from ../../../source/gcc-8.2.0/libgcc/unwind-dw2.c:37:
./gthr-default.h:35:10: fatal error: pthread.h: No such file or directory
#include <pthread.h>
^~~~~~~~~~~
compilation terminated.
make[1]: *** [../../../source/gcc-8.2.0/libgcc/static-object.mk:17: unwind-dw2.o] Error 1
make[1]: Leaving directory '/[...]/cross_compilers/pkgs/gcc/build/i686-w64-mingw32/libgcc'
make: *** [Makefile:12735: all-target-libgcc] Error 2
Quote:
Originally Posted by LoRd_MuldeR
(BTW: Why not simply grab MinGW/GCC via MSYS2? This is what I'm using now exclusively)
|
The toolchain that the 'mingw-w64-build-r25' script produces is the only toolchain I have yet experience with. I'm still relatively new to this.
I might give it a try some day.