I am trying to get the libgpg-error to compile natively (i.e. without resorting to ShiftMediaProject fork) using vcpkg: https://github.com/microsoft/vcpkg/pull/20447
This works fine for native compilation, but not when cross-compiling. Specifically, when targeting arm64-windows, the mkheader.exe is built for the HOST, not BUILD triplet:
"/bin/sh: ./mkheader.exe: cannot execute binary file: Exec format error"
Configure script is run with:
./configure --host=aarch64-pc-mingw32 --build=x86_64-pc-mingw32 --target=x86_64-pc-mingw32 --disable-tests --disable-doc --disable-silent-rules ac_cv_prog_ac_ct_STRIP=: gl_cv_double_slash_root=yes ac_cv_func_memmove=yes gl_cv_host_cpu_c_abi=no lt_cv_deplibs_check_method=pass_all --disable-silent-rules --verbose --enable-shared --disable-static --prefix=/C/vcpkg/installed/arm64-windows/debug '--bindir=${prefix}/../tools/libgpg-error/debug/bin' '--sbindir=${prefix}/../tools/libgpg-error/debug/sbin' '--libdir=${prefix}/lib' '--includedir=${prefix}/../include' '--datarootdir=${prefix}/share/libgpg-error'
BUILD and HOST are detected correctly:
checking build system type... x86_64-pc-mingw32 checking host system type... aarch64-pc-mingw32