Support nds32 pre-build toolchain
cover Support nds32 pre-build toolchain
From: Rick Chen <[email protected]>
1. Support nds32 pre-build toolcahin for buildman.
2. Fix some bugs about fpu and toolchain issues.
Rick Chen (4):
.travis.yml: Support nds32 prebuilt toolchain
nds32: Remove gcc unused option
nds32: Generate SW fpu instruction.
nds32: Fix boot fail issue when build with elf-mculib.
.travis.yml | 9 +++++++++ arch/nds32/config.mk | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/4 .travis.yml: Support nds32 prebuilt toolchain
From: Rick Chen <[email protected]>
Download nds32 prebuild toolchain from github which is base on gcc 8.0.1 version for regression.
--- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+)
.travis.yml +9 -0
@@ -78,6 +78,11 @@ before_script: wget https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2018.09-release/arc_gnu_2018.09_prebuilt_uclibc_le_archs_linux_install.tar.gz && tar -C /tmp -xf arc_gnu_2018.09_prebuilt_uclibc_le_archs_linux_install.tar.gz; fi + - if [[ "${TOOLCHAIN}" == "nds32" ]]; then + wget https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz && + tar -C /tmp -xf nds32le-linux-glibc-v3-upstream.tar.gz && + echo -e "\n[toolchain-prefix]\nnds32 = /tmp/nds32le-linux-glibc-v3-upstream/bin/nds32le-linux-" >> ~/.buildman; + fi - if [[ "${TOOLCHAIN}" == *xtensa* ]]; then wget https://github.com/foss-xtensa/toolchain/releases/download/2018.02/x86_64-2018.02-${TOOLCHAIN}.tar.gz && tar -C /tmp -xf x86_64-2018.02-${TOOLCHAIN}.tar.gz &&
@@ -311,6 +316,10 @@ matrix: env: - BUILDMAN="riscv" TOOLCHAIN="riscv" + - name: "buildman nds32" + env: + - BUILDMAN="nds32" + TOOLCHAIN="nds32" # QA jobs for code analytics # static code analysis with cppcheck (we can add --enable=all later)
Signature · 1 line
2.7.4
PATCH 2/4 nds32: Remove gcc unused option
In reply to AndesFrom: Rick Chen <[email protected]>
-G0 is an old option, not support now,
So remove it.
It can help to fix compile error when
build with nds32 pre-build toolchain.
--- arch/nds32/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/nds32/config.mk +1 -1
@@ -17,6 +17,6 @@ LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/nds32.lds PLATFORM_RELFLAGS += -fno-common -mrelax PLATFORM_RELFLAGS += -gdwarf-2 -PLATFORM_CPPFLAGS += -D__nds32__ -G0 -ffixed-10 -fpie +PLATFORM_CPPFLAGS += -D__nds32__ -ffixed-10 -fpie LDFLAGS_u-boot = --gc-sections --relax -pie
Signature · 1 line
2.7.4
PATCH 3/4 nds32: Generate SW fpu instruction.
In reply to AndesFrom: Rick Chen <[email protected]>
Force it to generate SW fup instruction.
It help to avoid bugs when running on no-HW-fpu board, but compile with v3f which support HW fpu instruction.
--- arch/nds32/config.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/nds32/config.mk +2 -2
@@ -15,8 +15,8 @@ endif CONFIG_STANDALONE_LOAD_ADDR = 0x300000 LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/nds32.lds -PLATFORM_RELFLAGS += -fno-common -mrelax +PLATFORM_RELFLAGS += -fno-common -mrelax -mno-ext-fpu-dp -mfloat-abi=soft PLATFORM_RELFLAGS += -gdwarf-2 PLATFORM_CPPFLAGS += -D__nds32__ -ffixed-10 -fpie -LDFLAGS_u-boot = --gc-sections --relax -pie +LDFLAGS_u-boot = --gc-sections --relax -pie --mabi=AABI
Signature · 1 line
2.7.4
PATCH 4/4 nds32: Fix boot fail issue when build with elf-mculib.
In reply to AndesFrom: Rick Chen <[email protected]>
Add -mcmodel=large can let elf-mculib have the same default behavior just like linux-glibc. And it help to pass U-Boot booting sequence.
--- arch/nds32/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/nds32/config.mk +1 -1
@@ -17,6 +17,6 @@ LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/nds32.lds PLATFORM_RELFLAGS += -fno-common -mrelax -mno-ext-fpu-dp -mfloat-abi=soft PLATFORM_RELFLAGS += -gdwarf-2 -PLATFORM_CPPFLAGS += -D__nds32__ -ffixed-10 -fpie +PLATFORM_CPPFLAGS += -D__nds32__ -ffixed-10 -fpie -mcmodel=large LDFLAGS_u-boot = --gc-sections --relax -pie --mabi=AABI
Signature · 1 line
2.7.4