From ee92c0fe5c1b9d59508273916e2c9a75b68dbc13 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 21 Apr 2016 01:25:29 +0200 Subject: nds32: add support for new architecture Add support for Andes Technology NDS32 architecture. See here http://www.andestech.com/en/index/index.htm for more informaton. Verification of the port from an older uClibc port was done on a sponsored AG101p board. The testsuite only has 5 errors, three are related to an existing bug in dlclose() with LT.old, also happening on cris32 and m68k. Failures to fallocate/posix_fallocate are unresolved. Thanks to Andes Technology sponsoring the hardware and being very helpful while doing the uClibc-ng porting. Signed-off-by: Waldemar Brodkorb --- Rules.mak | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Rules.mak') diff --git a/Rules.mak b/Rules.mak index 3e4e6c03c..894d4dc28 100644 --- a/Rules.mak +++ b/Rules.mak @@ -104,6 +104,7 @@ ifeq ($(TARGET_ARCH),) ARCH ?= $(shell uname -m | $(SED) -e s/i.86/i386/ \ -e s/sun.*/sparc/ -e s/sparc.*/sparc/ \ -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/nds32.*/nds32/ \ -e s/sh.*/sh/ \ -e s/s390x/s390/ -e s/parisc.*/hppa/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ @@ -300,6 +301,7 @@ ifeq ($(UCLIBC_HAS_SOFT_FLOAT),y) ifneq ($(TARGET_ARCH),bfin) ifneq ($(TARGET_ARCH),lm32) ifneq ($(TARGET_ARCH),nios2) +ifneq ($(TARGET_ARCH),nds32) ifneq ($(TARGET_ARCH),sh) ifneq ($(TARGET_ARCH),c6x) ifneq ($(TARGET_ARCH),h8300) @@ -313,6 +315,7 @@ endif endif endif endif +endif $(eval $(call check-gcc-var,-std=gnu99)) CPU_CFLAGS-y += $(CFLAG_-std=gnu99) @@ -410,6 +413,12 @@ ifeq ($(TARGET_ARCH),mips) CPU_LDFLAGS-y += $(CPU_CFLAGS) endif +ifeq ($(TARGET_ARCH),nds32) + CPU_CFLAGS-$(CONFIG_NDS32_ISA)+=-march=nds32 + CFLAGS-.os+= -DPIC + CFLAGS-.oS+= -DPIC +endif + ifeq ($(TARGET_ARCH),sh) $(eval $(call check-gcc-var,-mprefergot)) OPTIMIZATION += $(CFLAG_-mprefergot) -- cgit v1.2.3