Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zcc] Update some compiler options for zcc-3.2.5. #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions samples/coremark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ if("${TOOLCHAIN_VARIANT}" STREQUAL "zcc")
sdk_zcc_ld_options("-fuse-size-lib")
sdk_zcc_ld_options(-Wl,-mllvm,--riscv-misched-load-clustering=true)
sdk_zcc_ld_options(-Wl,-mllvm,--misfetch-cost=8)
sdk_zcc_ld_options(-Wl,-mllvm,--misched-topdown=true)
sdk_zcc_ld_options(-Wl,-mllvm,--disable-constant-hoisting=true)
else()
set(opt_string "-O3 -funroll-all-loops -finline-limit=600 -fno-code-hoisting -fselective-scheduling -fno-forward-propagate -fno-tree-ter -fipa-pta -fno-tree-vrp")
endif()
Expand Down
2 changes: 0 additions & 2 deletions soc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ elseif("${TOOLCHAIN_VARIANT}" STREQUAL "zcc")
sdk_ld_options("-march=${RV_ARCH}_xandes")
endif()

sdk_zcc_compile_options("-mtune=andes-kavalan")
sdk_zcc_ld_options("-mtune=andes-kavalan")
sdk_zcc_ld_options(-Wl,-mllvm,--align-all-nofallthru-blocks=2)
sdk_zcc_ld_options(-falign-functions=4)
sdk_zcc_ld_options(-flate-loop-unroll)
Expand Down
4 changes: 2 additions & 2 deletions soc/HPM5300/HPM5301/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ if(${INCLUDE_BOOTHEADER})
endif()

sdk_nds_compile_options(-mcpu=d25)
sdk_zcc_compile_options(-mtune=andes-d25)
sdk_zcc_ld_options(-mtune=andes-d25)
sdk_zcc_compile_options(-mtune=andes-d25-series)
sdk_zcc_ld_options(-mtune=andes-d25-series)

if(NOT HPM_SOC_DISABLE_B_EXT)
get_toolchain_gcc_spec(spec)
Expand Down
4 changes: 2 additions & 2 deletions soc/HPM5300/HPM5361/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ if(${INCLUDE_BOOTHEADER})
endif()

sdk_nds_compile_options(-mcpu=d25)
sdk_zcc_compile_options(-mtune=andes-d25)
sdk_zcc_ld_options(-mtune=andes-d25)
sdk_zcc_compile_options(-mtune=andes-d25-series)
sdk_zcc_ld_options(-mtune=andes-d25-series)

set(SOC_LINKER_SCRIPT "" PARENT_SCOPE)
if(NOT DEFINED USE_CUSTOM_LINKER)
Expand Down
4 changes: 2 additions & 2 deletions soc/HPM6200/HPM6280/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ if(${INCLUDE_BOOTHEADER})
endif()

sdk_nds_compile_options(-mcpu=d45)
sdk_zcc_compile_options(-mtune=andes-kavalan)
sdk_zcc_ld_options(-mtune=andes-kavalan)
sdk_zcc_compile_options(-mtune=andes-d45-series)
sdk_zcc_ld_options(-mtune=andes-d45-series)

set(SOC_LINKER_SCRIPT "" PARENT_SCOPE)
if(NOT DEFINED USE_CUSTOM_LINKER)
Expand Down
4 changes: 2 additions & 2 deletions soc/HPM6300/HPM6360/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ if(${INCLUDE_BOOTHEADER})
endif()

sdk_nds_compile_options(-mcpu=d45)
sdk_zcc_compile_options(-mtune=andes-kavalan)
sdk_zcc_ld_options(-mtune=andes-kavalan)
sdk_zcc_compile_options(-mtune=andes-d45-series)
sdk_zcc_ld_options(-mtune=andes-d45-series)

set(SOC_LINKER_SCRIPT "" PARENT_SCOPE)
if(NOT DEFINED USE_CUSTOM_LINKER)
Expand Down
4 changes: 2 additions & 2 deletions soc/HPM6700/HPM6750/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ if(${INCLUDE_BOOTHEADER})
endif()

sdk_nds_compile_options(-mcpu=d45)
sdk_zcc_compile_options(-mtune=andes-kavalan)
sdk_zcc_ld_options(-mtune=andes-kavalan)
sdk_zcc_compile_options(-mtune=andes-d45-series)
sdk_zcc_ld_options(-mtune=andes-d45-series)

set(SOC_LINKER_SCRIPT "" PARENT_SCOPE)
if(NOT DEFINED USE_CUSTOM_LINKER)
Expand Down
4 changes: 2 additions & 2 deletions soc/HPM6800/HPM6880/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ if(${INCLUDE_BOOTHEADER})
endif()

sdk_nds_compile_options(-mcpu=d45)
sdk_zcc_compile_options(-mtune=andes-kavalan)
sdk_zcc_ld_options(-mtune=andes-kavalan)
sdk_zcc_compile_options(-mtune=andes-d45-series)
sdk_zcc_ld_options(-mtune=andes-d45-series)

set(SOC_LINKER_SCRIPT "" PARENT_SCOPE)
if(NOT DEFINED USE_CUSTOM_LINKER)
Expand Down
4 changes: 2 additions & 2 deletions soc/HPM6E00/HPM6E80/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ if(${INCLUDE_BOOTHEADER})
endif()

sdk_nds_compile_options(-mcpu=d45)
sdk_zcc_compile_options(-mtune=andes-kavalan)
sdk_zcc_ld_options(-mtune=andes-kavalan)
sdk_zcc_compile_options(-mtune=andes-d45-series)
sdk_zcc_ld_options(-mtune=andes-d45-series)

if(NOT HPM_SOC_DISABLE_B_EXT)
get_toolchain_gcc_spec(spec)
Expand Down