From f4bc85ee806d4ecdaefdf1e8856c7dcd3496b93f Mon Sep 17 00:00:00 2001 From: mlankhorst Date: Thu, 3 Jul 2008 00:00:31 -0700 Subject: [PATCH] tools: Add calling conventions for win64 to winegcc --- tools/winegcc/winegcc.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 113819d..549153c 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -292,15 +292,23 @@ static void compile(struct options* opts, const char* lang) strarray_add(comp_args, "-D__cdecl=__attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))"); 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__))"); + strarray_add(comp_args, "-D__fastcall=__attribute__((__fastcall__)) __attribute__((__force_align_arg_pointer__))"); + strarray_add(comp_args, "-D_fastcall=__attribute__((__fastcall__)) __attribute__((__force_align_arg_pointer__))"); +#elif defined(__x86_64__) /* Windows 64 bits only has 1 true calling convention to bind them all */ + strarray_add(comp_args, "-D__stdcall=__attribute__((ms_abi))"); + strarray_add(comp_args, "-D__cdecl=__attribute__((ms_abi))"); + strarray_add(comp_args, "-D_stdcall=__attribute__((ms_abi))"); + strarray_add(comp_args, "-D_cdecl=__attribute__((ms_abi))"); + strarray_add(comp_args, "-D__fastcall=__attribute__((ms_abi))"); + strarray_add(comp_args, "-D_fastcall=__attribute__((ms_abi))"); #else strarray_add(comp_args, "-D__stdcall=__attribute__((__stdcall__))"); strarray_add(comp_args, "-D__cdecl=__attribute__((__cdecl__))"); strarray_add(comp_args, "-D_stdcall=__attribute__((__stdcall__))"); strarray_add(comp_args, "-D_cdecl=__attribute__((__cdecl__))"); -#endif - strarray_add(comp_args, "-D__fastcall=__attribute__((__fastcall__))"); strarray_add(comp_args, "-D_fastcall=__attribute__((__fastcall__))"); +#endif strarray_add(comp_args, "-D__declspec(x)=__declspec_##x"); strarray_add(comp_args, "-D__declspec_align(x)=__attribute__((aligned(x)))"); strarray_add(comp_args, "-D__declspec_allocate(x)=__attribute__((section(x)))"); -- 1.5.6.5