Skip to content
Nico Williams edited this page May 15, 2015 · 18 revisions

For Windows (64-bit):

$ # Install mingw bits
$ # Fetch Oniguruma, untar
$ # Make a directory for installing cross-built code into
$ cd <path-to-oniguruma-source>
$ PATH=<path-to-mingw>/mingw-w64-x86_64/bin:$PATH ./configure --target=win64-x86_64 --host=x86_64-w64-mingw32
$ PATH=<path-to-mingw>/mingw-w64-x86_64/bin:$PATH make -j16 LDFLAGS=-all-static clean all install DESTDIR=<path-to-cross-built-things>/win64
$ cd <path-to-jq-workspace>
$ PATH=<path-to-mingw>/bin:$PATH scripts/crosscompile win64 --target=win64-x86_64 --host=x86_64-w64-mingw32 --with-oniguruma=<path-to-cross-built-things>/win64/usr/local LDFLAGS=-all-static

Similarly for Windows 32-bit:

$ # Install mingw bits
$ # Fetch Oniguruma, untar
$ # Make a directory for installing cross-built code into
$ cd <path-to-oniguruma-source>
$ PATH=<path-to-mingw>/mingw-w64-x86_64/bin:$PATH ./configure --target=win64-x86_64 --host=x86_64-w64-mingw32
$ PATH=<path-to-mingw>/mingw-w64-x86_64/bin:$PATH make -j16 LDFLAGS=-all-static clean all install DESTDIR=<path-to-cross-built-things>/win64
$ cd <path-to-jq-workspace>
$ PATH=<path-to-mingw>/mingw-w32-x86_64/bin:$PATH scripts/crosscompile win32 --targetw32 --with-oniguruma=<path-to-cross-built-things>/usr/locah-oniguruma=/tmp/onig32/usr/local LDFLAGS=-all-static
Clone this wiki locally