Skip to content

Commit

Permalink
Remove cast-align for RISC-V
Browse files Browse the repository at this point in the history
Fix #2836.

Signed-off-by: Steven Bellock <[email protected]>
  • Loading branch information
steven-bellock authored and jyao1 committed Sep 30, 2024
1 parent d8d079c commit 525ba87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,10 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")

if(TOOLCHAIN STREQUAL "GCC")
set(CMAKE_C_COMPILER gcc)
add_compile_options(-std=c99 -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-common -Wno-address -fpie -fno-asynchronous-unwind-tables -DUSING_LTO -Wno-maybe-uninitialized -Wno-uninitialized -Wno-builtin-declaration-mismatch -Wno-nonnull-compare -Werror-implicit-function-declaration -Wcast-qual -Wcast-align)
add_compile_options(-std=c99 -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -fno-common -Wno-address -fpie -fno-asynchronous-unwind-tables -DUSING_LTO -Wno-maybe-uninitialized -Wno-uninitialized -Wno-builtin-declaration-mismatch -Wno-nonnull-compare -Werror-implicit-function-declaration -Wcast-qual)
if (NOT ARCH STREQUAL "riscv32" AND "riscv64")
add_compile_options(-Wcast-align)
endif()
if (ARCH STREQUAL "x64")
add_compile_options(-mno-red-zone)
endif()
Expand Down

0 comments on commit 525ba87

Please sign in to comment.