BobBuildTool/basement

x86_64-w64-mingw32 toolchain support

Opened this issue · 2 comments

have u ever tried to get up a mingw toolchain in bob?

i tried this in cross-toolchain.yaml:

x86_64-w64-mingw32:
    environment:
    AUTOCONF_TARGET:·"x86_64-w64-mingw32"
    AUTOCONF_TARGET_32:·"i686-w64-mingw32"
    ARCH:·"x86_64"¬
    GCC_LIBC:·"glibc"¬
    GCC_MULTILIB:·"m32,m64"

error:

stddef.h:1:15: fatal error: stddef.h: No such file or directory
 #include_next <stddef.h>

and this (cross instead of w64), the cross should fix the issue above:

x86_64-w64-mingw32:
    environment:
    AUTOCONF_TARGET:·"x86_64-cross-mingw32"
    AUTOCONF_TARGET_32:·"i686-cross-mingw32"
    ARCH:·"x86_64"¬
    GCC_LIBC:·"glibc"¬
    GCC_MULTILIB:·"m32,m64"

error:

libgcc/libgcc2.c:2186:10: fatal error: windows.h: No such file or directory
 #include <windows.h>

no idea, what's that.

x86_64-cross-w64-mingw32 will fail already in binutils:
checking target system type... Invalid configuration x86_64-cross-w64-mingw32': system w64-mingw32' not recognized

I guess we would need to support a different libc. I cannot imagine that glibc works for Windows. But I have never tried to build such a toolchain myself. I'm afraid you're in uncharted territory...

yea. i guess i could try to convert the pkgbuild files of aur to bob recipes: https://archlinux.org/groups/x86_64/mingw-w64-toolchain/