x86: correct compiler flags for SSE

It is possible to enable SSE without using SSE for floating
point, so fix the compiler flags.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2021-01-07 13:38:04 -08:00 committed by Anas Nashif
parent f725719cf1
commit 23a9a3234b

View file

@ -21,7 +21,18 @@ if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
)
endif()
zephyr_cc_option_ifndef(CONFIG_SSE_FP_MATH -mno-sse)
if(CONFIG_SSE)
zephyr_cc_option(-msse)
if(CONFIG_SSE_FP_MATH)
zephyr_cc_option(-mfpmath=sse)
else()
zephyr_cc_option(-mfpmath=387)
endif()
else()
zephyr_cc_option(-mno-sse)
endif()
if(CMAKE_VERBOSE_MAKEFILE)
set(GENIDT_EXTRA_ARGS --verbose)