[glib/glib-2-64: 1/2] Define G_MSVC_SYMBOL_PREFIX correctly for ARM32
- From: Sebastian Dröge <sdroege src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-64: 1/2] Define G_MSVC_SYMBOL_PREFIX correctly for ARM32
- Date: Wed, 23 Sep 2020 10:45:36 +0000 (UTC)
commit c444a1aec78926cbeaebe41b03400cd4cc3317fa
Author: Wolfgang Stöggl <c72578 yahoo de>
Date: Mon Oct 28 09:09:51 2019 +0100
Define G_MSVC_SYMBOL_PREFIX correctly for ARM32
Symbols on x86 are prefixed with an underscore
but symbols on x64/ARM/ARM64 are not.
Relevant information concerning the prefixes for the architectures
can be found in the vcpkg project [1,2], where arm and arm64 builds
are part of the CI.
Specifically, _WIN64 is defined on Windows ARM64, so this issue is
only visible when building on ARM32.
[1]
https://github.com/microsoft/vcpkg/blob/08e74979df124d9360343751cefcae615c2ec5ed/ports/glib/fix-arm-builds.patch
[2] https://github.com/microsoft/vcpkg/pull/6116
glib/gconstructor.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/glib/gconstructor.h b/glib/gconstructor.h
index 9509e595f..407202167 100644
--- a/glib/gconstructor.h
+++ b/glib/gconstructor.h
@@ -42,13 +42,13 @@
*/
/* We need to account for differences between the mangling of symbols
- * for Win32 (x86) and x64 programs, as symbols on Win32 are prefixed
- * with an underscore but symbols on x64 are not.
+ * for x86 and x64/ARM/ARM64 programs, as symbols on x86 are prefixed
+ * with an underscore but symbols on x64/ARM/ARM64 are not.
*/
-#ifdef _WIN64
-#define G_MSVC_SYMBOL_PREFIX ""
-#else
+#ifdef _M_IX86
#define G_MSVC_SYMBOL_PREFIX "_"
+#else
+#define G_MSVC_SYMBOL_PREFIX ""
#endif
#define G_DEFINE_CONSTRUCTOR(_func) G_MSVC_CTOR (_func, G_MSVC_SYMBOL_PREFIX)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]