[PATCH] winegcc: Don't set stdcall and fastcall attributes on ARM.

Grazvydas Ignotas notasas at gmail.com
Sun Feb 23 12:24:53 CST 2014


Otherwise we get lots of "attribute directive ignored" warnings.
Wine headers can take care defining __stdcall to nothing on ARM.
---
 tools/winegcc/winegcc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 8afe5af..e91d8ac 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -564,7 +564,7 @@ static void compile(struct options* opts, const char* lang)
             strarray_add(comp_args, "-D_stdcall=__attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__))");
             strarray_add(comp_args, "-D_cdecl=__attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))");
         }
-        else
+        else if (opts->target_cpu != CPU_ARM && opts->target_cpu != CPU_ARM64)
         {
             strarray_add(comp_args, "-D__stdcall=__attribute__((__stdcall__))");
             strarray_add(comp_args, "-D__cdecl=__attribute__((__cdecl__))");
@@ -572,7 +572,7 @@ static void compile(struct options* opts, const char* lang)
             strarray_add(comp_args, "-D_cdecl=__attribute__((__cdecl__))");
         }
 
-	if (!fastcall_done)
+        if (!fastcall_done && opts->target_cpu != CPU_ARM && opts->target_cpu != CPU_ARM64)
         {
             strarray_add(comp_args, "-D__fastcall=__attribute__((__fastcall__))");
             strarray_add(comp_args, "-D_fastcall=__attribute__((__fastcall__))");
-- 
1.7.0.2




More information about the wine-patches mailing list