toolchain/uClibc: Disable mips16 for uClibc for now
authorFlorian Fainelli <florian@openwrt.org>
Fri, 5 Apr 2013 12:36:00 +0000 (12:36 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Fri, 5 Apr 2013 12:36:00 +0000 (12:36 +0000)
For now, build uclibc without -mips16. There's no mips16 syscall
support AFAIK and uclibc uses inline assembly syscalls a lot.

In addition, touching errno means touching a TLS model symbol, and
that's not supported in gcc 4.6.

The __set_errno macro can be put back to calling
errno_location(). This allows much of the library to be built in
mips16 mode. I don't understand the implications to the thread library
of doing this.

A list of "build as -mno-mips16" C source files can be placed in the
mips architecture-dependent build files. Maintaining the list would be
no fun.

Signed-off-by: Jay Carlson <nop@nop.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 36199

toolchain/uClibc/common.mk

index f32ed9872924502f46b9683e585a6171fd548d56..e84c02a1623a7e9b138ffd80b58dddd5969e2275 100644 (file)
@@ -44,6 +44,8 @@ GEN_CONFIG=$(SCRIPT_DIR)/kconfig.pl -n \
                $(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),.$(BOARD), \
                        $(if $(CONFIG_HAS_SPE_FPU),$(if $(wildcard $(CONFIG_DIR)/$(ARCH).e500),.e500))))
 
                $(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),.$(BOARD), \
                        $(if $(CONFIG_HAS_SPE_FPU),$(if $(wildcard $(CONFIG_DIR)/$(ARCH).e500),.e500))))
 
+TARGET_CFLAGS := $(filter-out -mips16,$(TARGET_CFLAGS))
+
 CPU_CFLAGS = \
        -funsigned-char -fno-builtin -fno-asm \
        --std=gnu99 -ffunction-sections -fdata-sections \
 CPU_CFLAGS = \
        -funsigned-char -fno-builtin -fno-asm \
        --std=gnu99 -ffunction-sections -fdata-sections \