From b7c1b95b4573a8adaf454de9847f12c905d4aa27 Mon Sep 17 00:00:00 2001 From: Konrad Dybcio <32096130+konradybcio@users.noreply.github.com> Date: Sat, 16 Oct 2021 10:58:08 +0200 Subject: [PATCH] [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 Reviewed-by: Stanislav Motylkov Signed-off-by: Konrad Dybcio --- sdk/cmake/gcc.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk/cmake/gcc.cmake b/sdk/cmake/gcc.cmake index cb20227501d..65085aba793 100644 --- a/sdk/cmake/gcc.cmake +++ b/sdk/cmake/gcc.cmake @@ -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("$<$>:-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()