[SDK] gcc.cmake: Only add -mstackrealign on i386 (#4016)

This option is only useful for the i386 architecture and breaks ARM builds.

Reviewed-by: Victor Perevertkin <victor.perevertkin@reactos.org>
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
This commit is contained in:
Konrad Dybcio 2021-10-16 10:58:08 +02:00 committed by GitHub
parent ea4c1a067b
commit b7c1b95b45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,8 +45,6 @@ add_compile_options(-pipe -fms-extensions -fno-strict-aliasing)
# The case for C++ is handled through the reactos_c++ INTERFACE library
add_compile_options("$<$<NOT:$<COMPILE_LANGUAGE:CXX>>:-nostdinc>")
add_compile_options(-mstackrealign)
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
add_compile_options(-fno-aggressive-loop-optimizations)
if (DBG)
@ -145,7 +143,7 @@ if(LTCG)
endif()
if(ARCH STREQUAL "i386")
add_compile_options(-fno-optimize-sibling-calls -fno-omit-frame-pointer)
add_compile_options(-fno-optimize-sibling-calls -fno-omit-frame-pointer -mstackrealign)
if(NOT CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_compile_options(-mpreferred-stack-boundary=3 -fno-set-stack-executable)
endif()