Eric Pouech : winegcc: On x86-64, don't define twice the fastcall macros.
Module: wine Branch: master Commit: d4dfcc1f321be6eee478c8bbada31ca89cf607c0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d4dfcc1f321be6eee478c8bbad... Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Mon Apr 19 22:33:33 2010 +0200 winegcc: On x86-64, don't define twice the fastcall macros. --- tools/winegcc/winegcc.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 7023ff4..a5f7004 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -360,6 +360,7 @@ static void compile(struct options* opts, const char* lang) if (gcc_defs) { + int fastcall_done = 0; if (opts->target_cpu == CPU_x86_64) { strarray_add(comp_args, "-D__stdcall=__attribute__((ms_abi))"); @@ -368,6 +369,7 @@ static void compile(struct options* opts, const char* lang) 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))"); + fastcall_done = 1; } else if (opts->target_platform == PLATFORM_APPLE) { @@ -385,8 +387,11 @@ static void compile(struct options* opts, const char* lang) strarray_add(comp_args, "-D_cdecl=__attribute__((__cdecl__))"); } - strarray_add(comp_args, "-D__fastcall=__attribute__((__fastcall__))"); - strarray_add(comp_args, "-D_fastcall=__attribute__((__fastcall__))"); + if (!fastcall_done) + { + strarray_add(comp_args, "-D__fastcall=__attribute__((__fastcall__))"); + strarray_add(comp_args, "-D_fastcall=__attribute__((__fastcall__))"); + } 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)))");
participants (1)
-
Alexandre Julliard