Summary: | sys-devel/gcc-5.3.0, 5.4.0 produces stupid code in wine (force_align_arg_pointer, -mstackrealign breakage) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Daniel Santos <daniel.santos> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=661118 https://bugs.gentoo.org/show_bug.cgi?id=677852 https://bugs.gentoo.org/show_bug.cgi?id=616402 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 915000 |
Description
Daniel Santos
2016-08-27 03:46:46 UTC
(In reply to Daniel Santos from comment #0) > https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=228728 This commit is from 2015-10-12 and it is already included in GCC 5.3.0 (released on 2015-12-04) and GCC 5.4.0 (released on 2016-06-03). Maybe you pasted wrong URL? (In reply to Arfrever Frehtes Taifersar Arahesis from comment #1) > (In reply to Daniel Santos from comment #0) > > https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=228728 > > This commit is from 2015-10-12 and it is already included in GCC 5.3.0 > (released on 2015-12-04) and GCC 5.4.0 (released on 2016-06-03). > Maybe you pasted wrong URL? Oh poo! You are right. I guess I misread the patch then, as I thought it should have been in 5.3.0 as well. I guess I need to file a new gcc bug. I'm working on gcc right now and I think I hacked it to fix this case (potentially breaking others) just so I can get finished with my project. I suppose that as a temporary work-around for Wine, these headers can be changed, but I have *not* verified that it solves the problem (as I hacked the compiler too). Also the selection of gcc 5.5.0 was just laziness, probably the whole #if/else can be replaced with the body of the #else: diff --git a/include/msvcrt/crtdefs.h b/include/msvcrt/crtdefs.h index dde5ea1..dc464a9 100644 --- a/include/msvcrt/crtdefs.h +++ b/include/msvcrt/crtdefs.h @@ -55,7 +55,7 @@ # error You need to define __stdcall for your compiler # endif # elif defined(__x86_64__) && defined (__GNUC__) -# if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3)) +# if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 5)) # define __stdcall __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__)) # else # define __stdcall __attribute__((ms_abi)) @@ -73,7 +73,7 @@ # define __cdecl __attribute__((__cdecl__)) # endif # elif defined(__x86_64__) && defined (__GNUC__) -# if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3)) +# if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 5)) # define __cdecl __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__)) # else # define __cdecl __attribute__((ms_abi)) diff --git a/include/windef.h b/include/windef.h index 1e54fcb..0cd9683 100644 --- a/include/windef.h +++ b/include/windef.h @@ -64,7 +64,7 @@ extern "C" { # error You need to define __stdcall for your compiler # endif # elif defined(__x86_64__) && defined (__GNUC__) -# if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3)) +# if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 5)) # define __stdcall __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__)) # else # define __stdcall __attribute__((ms_abi)) @@ -82,7 +82,7 @@ extern "C" { # define __cdecl __attribute__((__cdecl__)) # endif # elif defined(__x86_64__) && defined (__GNUC__) -# if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3)) +# if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 5)) # define __cdecl __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__)) # else # define __cdecl __attribute__((ms_abi)) However, that probably belongs in a different bug report, and it only affects performance. Feel free to take this upstream. |