Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bf73faef
Commit
bf73faef
authored
Nov 16, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Force stack alignment on all x86 platforms.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cd525dda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
24 deletions
+11
-24
winegcc.c
tools/winegcc/winegcc.c
+11
-24
No files found.
tools/winegcc/winegcc.c
View file @
bf73faef
...
...
@@ -548,47 +548,34 @@ static void compile(struct options* opts, const char* lang)
if
(
gcc_defs
)
{
int
fastcall_done
=
0
;
if
(
opts
->
target_cpu
==
CPU_x86_64
)
switch
(
opts
->
target_cpu
)
{
case
CPU_x86_64
:
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))"
);
fastcall_done
=
1
;
}
else
if
(
opts
->
target_platform
==
PLATFORM_APPLE
)
{
/* Mac OS X uses a 16-byte aligned stack and not a 4-byte one */
break
;
case
CPU_x86
:
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_stdcall=__attribute__((__stdcall__)) __attribute__((__force_align_arg_pointer__))"
);
strarray_add
(
comp_args
,
"-D_cdecl=__attribute__((__cdecl__)) __attribute__((__force_align_arg_pointer__))"
);
}
else
if
(
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__))"
);
break
;
case
CPU_ARM
:
case
CPU_ARM64
:
case
CPU_POWERPC
:
strarray_add
(
comp_args
,
"-D__stdcall="
);
strarray_add
(
comp_args
,
"-D__cdecl="
);
strarray_add
(
comp_args
,
"-D_stdcall="
);
strarray_add
(
comp_args
,
"-D_cdecl="
);
strarray_add
(
comp_args
,
"-D__fastcall="
);
strarray_add
(
comp_args
,
"-D_fastcall="
);
fastcall_done
=
1
;
}
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__))"
);
}
if
(
!
fastcall_done
)
{
strarray_add
(
comp_args
,
"-D__fastcall=__attribute__((__fastcall__))"
);
strarray_add
(
comp_args
,
"-D_fastcall=__attribute__((__fastcall__))"
);
break
;
}
strarray_add
(
comp_args
,
"-D__declspec(x)=__declspec_##x"
);
strarray_add
(
comp_args
,
"-D__declspec_align(x)=__attribute__((aligned(x)))"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment