Browse Source

GDNative: Fix Linux arm64 warning about ignored `sysv_abi` attribute

Fixes #41160.

(cherry picked from commit 52b32ed533a5c91bf45696b1e4b5b5682df4bc17)
Rémi Verschelde 1 year ago
parent
commit
28bb7ef140
1 changed files with 9 additions and 5 deletions
  1. 9 5
      modules/gdnative/include/gdnative/gdnative.h

+ 9 - 5
modules/gdnative/include/gdnative/gdnative.h

@@ -37,20 +37,24 @@ extern "C" {
 
 
 #if defined(_WIN32) || defined(__ANDROID__)
 #if defined(_WIN32) || defined(__ANDROID__)
 #define GDCALLINGCONV
 #define GDCALLINGCONV
-#define GDAPI GDCALLINGCONV
+
 #elif defined(__APPLE__)
 #elif defined(__APPLE__)
 #include "TargetConditionals.h"
 #include "TargetConditionals.h"
 #if TARGET_OS_IPHONE
 #if TARGET_OS_IPHONE
 #define GDCALLINGCONV __attribute__((visibility("default")))
 #define GDCALLINGCONV __attribute__((visibility("default")))
-#define GDAPI GDCALLINGCONV
 #elif TARGET_OS_MAC
 #elif TARGET_OS_MAC
 #define GDCALLINGCONV __attribute__((sysv_abi))
 #define GDCALLINGCONV __attribute__((sysv_abi))
-#define GDAPI GDCALLINGCONV
 #endif
 #endif
-#else // !_WIN32 && !__APPLE__
+
+#else // Linux/BSD/Web
+#if defined(__aarch64__)
+#define GDCALLINGCONV
+#else
 #define GDCALLINGCONV __attribute__((sysv_abi))
 #define GDCALLINGCONV __attribute__((sysv_abi))
-#define GDAPI GDCALLINGCONV
 #endif
 #endif
+#endif
+
+#define GDAPI GDCALLINGCONV
 
 
 // This is for libraries *using* the header, NOT GODOT EXPOSING STUFF!!
 // This is for libraries *using* the header, NOT GODOT EXPOSING STUFF!!
 #if !defined(GDN_EXPORT)
 #if !defined(GDN_EXPORT)