Skip to content
Merged
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
12 changes: 7 additions & 5 deletions Build/toolchain/terapines.mk
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Required Version: ZCC Toolchain Version >= 4.1.2
# If the zcc toolchain version is less than 4.1.2, use nuclei-sdk v0.8.0
CC := zcc
CXX := z++
OBJDUMP := llvm-objdump
Expand All @@ -18,18 +20,18 @@ ifneq ($(findstring newlib,$(STDCLIB)),)
ifeq ($(STDCLIB),newlib_full)
LDLIBS += -lc -lclang_rt.builtins
Comment thread
kaishaoshao marked this conversation as resolved.
else ifeq ($(STDCLIB),newlib_fast)
LDLIBS += -lc_nano -lclang_rt.builtins
Comment thread
kaishaoshao marked this conversation as resolved.
LDLIBS += -lc_small -lclang_rt.builtins_small
STDCLIB_LDFLAGS += -u _printf_float -u _scanf_float
else ifeq ($(STDCLIB),newlib_small)
LDLIBS += -lc_nano -lclang_rt.builtins
Comment thread
kaishaoshao marked this conversation as resolved.
LDLIBS += -lc_small -lclang_rt.builtins_small
STDCLIB_LDFLAGS += -u _printf_float
else ifeq ($(STDCLIB),newlib_nano)
LDLIBS += -lc_nano -lclang_rt.builtins
Comment thread
fanghuaqi marked this conversation as resolved.
LDLIBS += -lc_nano -lclang_rt.builtins_nano
# work around for relocation R_RISCV_PCREL_HI20 out of range: -524289 is not in [-524288, 524287]; references _printf_float when compile with rv64
# If it report above error, you can add -u _printf_float
STDCLIB_LDFLAGS += #-u _printf_float
else
LDLIBS += -lc_nano -lclang_rt.builtins
Comment thread
fanghuaqi marked this conversation as resolved.
LDLIBS += -lc_small -lclang_rt.builtins_small
STDCLIB_LDFLAGS += #-u _printf_float
endif
###
Expand All @@ -47,7 +49,7 @@ else ifeq ($(STDCLIB),nospec)
COMMON_FLAGS +=
###
else
LDLIBS += -lc_nano -lclang_rt.builtins
LDLIBS += -lc_small -lclang_rt.builtins_small
STDCLIB_LDFLAGS += -u _printf_float
###
endif
Expand Down
10 changes: 5 additions & 5 deletions SoC/evalsoc/Common/npk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ buildconfig:
condition: $( startswith(${stdclib}, "newlib") && ${semihost} == 1 )

- type: zcc
description: Terapines ZCC Toolchain
description: Terapines ZCC Toolchain # Required Version: ZCC Toolchain Version >= 4.1.2
toolchain_name: Terapines ZCC
common_flags: # flags need to be combined together across all packages
# Enable experimental extensions for zcc
Expand All @@ -580,16 +580,16 @@ buildconfig:
condition: $( startswith(${stdclib}, "newlib") )
- flags: -lc -lclang_rt.builtins
condition: $( ${stdclib} == "newlib_full" )
- flags: -lc_nano -lclang_rt.builtins -u _printf_float -u _scanf_float
- flags: -lc_small -lclang_rt.builtins_small
condition: $( ${stdclib} == "newlib_fast" )
- flags: -lc_nano -lclang_rt.builtins -u _printf_float
- flags: -lc_small -lclang_rt.builtins_small
condition: $( ${stdclib} == "newlib_small" )
- flags: -lc_nano -lclang_rt.builtins -u _printf_float
- flags: -lc_small -lclang_rt.builtins_small
condition: $( startswith(${stdclib}, "libncrt") )
- flags: -fuse-ld=lld
- flags: -u __on_exit_args
condition: $( startswith(${stdclib}, "newlib") )
- flags: -lc_nano -lclang_rt.builtins
- flags: -lc_nano -lclang_rt.builtins_nano
condition: $( ${stdclib} == "newlib_nano" )
- flags: -lsemihost
condition: $( ${semihost} == 1 )
2 changes: 1 addition & 1 deletion application/baremetal/benchmark/coremark/npk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,5 @@ buildconfig:
common_flags: # flags need to be combined together across all packages
- flags: -O3 -flto -falign-functions=4 -falign-loops=4 -flate-loop-unroll -malign-branch
ldflags:
- flags: -Wl,-mllvm,--align-all-nofallthru-blocks=2 -fuse-size-lib
- flags: -Wl,-mllvm,--align-all-nofallthru-blocks=2

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
BENCH_FLAGS ?= -O3 -flto -falign-functions=4 -falign-loops=4 -flate-loop-unroll -malign-branch
LDFLAGS += -Wl,-mllvm,--align-all-nofallthru-blocks=2 -fuse-size-lib
LDFLAGS += -Wl,-mllvm,--align-all-nofallthru-blocks=2
2 changes: 1 addition & 1 deletion application/baremetal/benchmark/dhrystone/npk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ buildconfig:

condition: $( ${dhry_mode} == 'best' )
ldflags:
- flags: -Wl,-mllvm,--align-all-nofallthru-blocks=2 -fuse-size-lib
- flags: -Wl,-mllvm,--align-all-nofallthru-blocks=2
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ BENCH_FLAGS ?= -O3 -ffast-math -flto -finline -fno-builtin-printf -funroll-loops
else ifeq ($(DHRY_MODE),inline)
BENCH_FLAGS ?= -O3 -flto -finline -fno-builtin-printf -funroll-loops -falign-functions=4 -falign-loops=4 -finline-functions -flate-loop-unroll -malign-branch
endif
LDFLAGS += -Wl,-mllvm,--align-all-nofallthru-blocks=2 -fuse-size-lib
LDFLAGS += -Wl,-mllvm,--align-all-nofallthru-blocks=2
2 changes: 1 addition & 1 deletion application/baremetal/benchmark/dhrystone_v2.2/npk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ buildconfig:
common_flags: # flags need to be combined together across all packages
- flags: -O3 -Wno-implicit-int -Wno-implicit-function-declaration
ldflags:
- flags: -Wl,-mllvm,--align-all-nofallthru-blocks=2 -fuse-size-lib
- flags: -Wl,-mllvm,--align-all-nofallthru-blocks=2
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
BENCH_FLAGS ?= -O3
LDFLAGS += -Wl,-mllvm,--align-all-nofallthru-blocks=2 -fuse-size-lib
LDFLAGS += -Wl,-mllvm,--align-all-nofallthru-blocks=2
5 changes: 5 additions & 0 deletions doc/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ This is release version of ``0.8.1`` of Nuclei SDK.

- Fix build system :ref:`develop_buildsystem_var_core` support table format error

* Build System

- Update to support Zcc version 4.1.2 and above as well as the new C library configuration


V0.8.0
------

Expand Down