Building for Windows on ARM (using CLang)
When building natively on Windows on ARM (aarch64-w64-mingw32) using MSYS2's CLang I ran into some issues.
My configure
flags looke like this:
--host=$RUNPLATFORM --disable-shared --enable-static --with-internal-glib
Some issues were solved simply adding this to ./configure
:
CFLAGS="-Wno-int-conversion -DNVALGRIND"
Another issue was avoided after running this patch:
patch -ulbf glib/glib/gbacktrace.h << EOF
@@ -55,3 +55,3 @@
# define G_BREAKPOINT() G_STMT_START{ __asm int 3h }G_STMT_END
-#elif defined (_MSC_VER)
+#elif defined (_MSC_VER) || (defined (__MINGW64__) && defined (__aarch64__))
# define G_BREAKPOINT() G_STMT_START{ __debugbreak(); }G_STMT_END
EOF
After that the build succeeded, and the file
command returns this output:
pkg-config.exe: PE32+ executable (console) Aarch64, for MS Windows, 7 sections