From: Uwe Hermann Date: Thu, 17 Dec 2015 08:21:04 +0000 (+0100) Subject: sigrok-cross-mingw: Switch to i686-w64-mingw32.static.posix. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=01b17442b9132403deef1486be5a46fea333e83c;p=sigrok-util.git sigrok-cross-mingw: Switch to i686-w64-mingw32.static.posix. This is a new MXE target that uses POSIX threads (and thus gives us C++11 std::thread support, among other things) out of the box. Using this, we no longer have to build gcc twice. --- diff --git a/cross-compile/mingw/README b/cross-compile/mingw/README index 248af54..e645124 100644 --- a/cross-compile/mingw/README +++ b/cross-compile/mingw/README @@ -41,20 +41,10 @@ Apply some fixes that are currently required for a proper build: $ patch -p1 < mxe_fixes.patch -For now we need to build gcc and winpthreads in two steps. First: +Build all required packages: - $ make MXE_TARGETS=i686-w64-mingw32.static gcc winpthreads - -In src/gcc.mk change "--enable-threads=win32" to "--enable-threads=posix". - -Then build gcc again: - - $ make MXE_TARGETS=i686-w64-mingw32.static gcc - -We now have a system that supports C++11 std::thread. Now build the rest: - - $ make MXE_TARGETS=i686-w64-mingw32.static glib libzip libusb1 libftdi1 \ - glibmm qt boost check + $ make MXE_TARGETS=i686-w64-mingw32.static.posix gcc glib libzip libusb1 \ + libftdi1 glibmm qt boost check This will take a while. diff --git a/cross-compile/mingw/sigrok-cross-mingw b/cross-compile/mingw/sigrok-cross-mingw index 66ce718..8b30158 100755 --- a/cross-compile/mingw/sigrok-cross-mingw +++ b/cross-compile/mingw/sigrok-cross-mingw @@ -53,7 +53,7 @@ GIT_CLONE="git clone --depth=1" # We need to find tools in the toolchain. export PATH=$MXE/usr/bin:$PATH -TOOLCHAIN_TRIPLET="$TARGET-w64-mingw32.static" +TOOLCHAIN_TRIPLET="$TARGET-w64-mingw32.static.posix" P="$PREFIX/lib/pkgconfig" P2="$MXE/usr/$TOOLCHAIN_TRIPLET/lib/pkgconfig" @@ -62,9 +62,9 @@ CM="-DCMAKE_TOOLCHAIN_FILE=$MXE/usr/$TOOLCHAIN_TRIPLET/share/cmake/mxe-conf.cmak L="--disable-shared --enable-static" if [ $TARGET = "i686" ]; then - export PKG_CONFIG_PATH_i686_w64_mingw32_static="$P:$P2" + export PKG_CONFIG_PATH_i686_w64_mingw32_static_posix="$P:$P2" else - export PKG_CONFIG_PATH_x86_64_w64_mingw32_static="$P:$P2" + export PKG_CONFIG_PATH_x86_64_w64_mingw32_static_posix="$P:$P2" fi # Remove build directory contents (if any) and create a new build dir.