fixup softfloat handling
authorImre Kaloz <kaloz@openwrt.org>
Fri, 28 Dec 2007 18:06:47 +0000 (18:06 +0000)
committerImre Kaloz <kaloz@openwrt.org>
Fri, 28 Dec 2007 18:06:47 +0000 (18:06 +0000)
SVN-Revision: 10003

rules.mk
toolchain/binutils/Makefile
toolchain/gcc/Makefile
toolchain/uClibc/Makefile

index 2f528162f4ed13f04387a1716f19fa9096bcb18b..7ac39b123e7258572144465cc0a79ac87d64ac91 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -61,6 +61,13 @@ TARGET_CFLAGS:=$(TARGET_OPTIMIZATION) -fhonour-copts
 TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
 TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
 
+ifeq ($(CONFIG_SOFT_FLOAT),y)
+SOFT_FLOAT_CONFIG_OPTION:=--with-float=soft
+TARGET_CFLAGS+=-msoft-float
+else
+SOFT_FLOAT_CONFIG_OPTION:=
+endif
+
 export PATH:=$(TARGET_PATH)
 export STAGING_DIR
 export GCC_HONOUR_COPTS:=0
index 2ca79d3eaf9a93054fcb650c32c50fd666977f4f..d31742125e48f2b9339fa992a56dd2e1628d8491 100644 (file)
@@ -33,6 +33,7 @@ define Build/Configure
                --target=$(REAL_GNU_TARGET_NAME) \
                --disable-werror \
                --disable-nls \
+               $(SOFT_FLOAT_CONFIG_OPTION) \
                $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) \
        );
 endef
index 59f837270245c206464722f3879cc3123cbb58b8..a1d1baa4008455c6274148028d337008453f5465 100644 (file)
@@ -60,6 +60,7 @@ define Stage1/Configure
                --disable-nls \
                --disable-libmudflap \
                --disable-multilib \
+               $(SOFT_FLOAT_CONFIG_OPTION) \
                $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
        );
 endef
@@ -92,6 +93,7 @@ define Stage2/Configure
                --disable-nls \
                --disable-libmudflap \
                --disable-multilib \
+               $(SOFT_FLOAT_CONFIG_OPTION) \
                $(call qstrip,$(CONFIG_EXTRA_GCC_CONFIG_OPTIONS)) \
        );
 endef
index 08f267001be7c3096a8e33c237acbd38a09f0e7b..5774d245bfd46eed388c672be436ea1a739bf0e6 100644 (file)
@@ -44,7 +44,7 @@ define Build/Prepare
        $(call Build/Prepare/Default)
        $(CP) config/$(ARCH)$(if $(wildcard config/$(ARCH).$(BOARD)),$(BOARD)) $(PKG_BUILD_DIR)/.config
        $(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \
-               -e 's,.*HAS_FPU.*,HAS_FPU=$(if $(CONFIG_SOFT_FLOAT),n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,n),g' \
+               -e 's,.*HAS_FPU.*,HAS_FPU=$(if $(CONFIG_SOFT_FLOAT),n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,y),g' \
                -e 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=$(if $(CONFIG_LARGEFILE),y,n),g' \
                -e 's,.*DO_C99_MATH.*,DO_C99_MATH=$(if $(CONFIG_C99_MATH),y,n),g' \
                $(PKG_BUILD_DIR)/.config