[build] Use -mpreferred-stack-boundary=2 on 32-bit x86 #4633
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I know DXVK doesn't officially support AVX builds, but I'd still like to suggest this flag to fix stack alignment issues when using mingw, since apparently i686-w64-mingw32 assumes that stack alignment is 16-bit when SSE is used, which is incorrect and causes game crashing issues. Wine experienced similar issues and added this flag about a year ago to workaround them by ensuring that the stack alignment is always 4 bytes, please see for more details:
https://gitlab.winehq.org/wine/wine/-/merge_requests/4030
https://gitlab.winehq.org/wine/wine/-/commit/4b458775bb8c9492ac859cfd167c5f54f245dec1
I'm fine if there any concerns why this can't be merged, as I realize that stack alignment issues need to be fixed either on the compiler side or by more courteous code, but it's too hard to debug, and things like #4627 were more about luck.
Fixes: #4447 (Not tested in Arma 3, but at least confirmed in Company Of Heroes 1)