X-Git-Url: https://sigrok.org/gitweb/?p=sigrok-util.git;a=blobdiff_plain;f=cross-compile%2Fmingw%2FREADME;h=248af546f939a81855dda33142d834eecf2979c2;hp=45c9a38faa08b5d8ca715f0eee006bfb3f98f307;hb=3dcba30db405095905631b232270ade74a568e94;hpb=6e15e874837b46516c75b64fd583415a636c00f8 diff --git a/cross-compile/mingw/README b/cross-compile/mingw/README index 45c9a38..248af54 100644 --- a/cross-compile/mingw/README +++ b/cross-compile/mingw/README @@ -3,7 +3,7 @@ README ------------------------------------------------------------------------------- This is a small script for cross-compiling sigrok and its dependencies -for Windows/MinGW systems. +for MinGW-w64/Windows systems. Status @@ -18,20 +18,43 @@ Requirements - bash - gcc - make + - cmake - git + - wget + - p7zip - pkg-config (>= 0.22) - - MXE + - sdcc (needed for building the fx2lafw firmware) + - nsis + - MXE (*-w64-* targets, the *-pc-* targets are not supported) MXE setup --------- -First, setup the MXE cross-compile environment for MinGW/Windows: +First, get the MXE cross-compile environment for MinGW-w64/Windows: $ cd $HOME $ git clone https://github.com/mxe/mxe.git mxe-git $ cd mxe-git - $ make gcc glib libzip libusb1 libftdi gtk2 qt boost nsis + +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: + + $ 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 This will take a while.