toolchain/gcc: pass proper flags for arm hard float build
[openwrt.git] / toolchain / gcc / common.mk
index 446e993..e8ca778 100644 (file)
@@ -34,10 +34,10 @@ ifeq ($(findstring linaro, $(CONFIG_GCC_VERSION)),linaro)
       PKG_COMP:=bz2
     endif
     ifeq ($(CONFIG_GCC_VERSION),"4.8-linaro")
-      PKG_REV:=4.8-2014.01
+      PKG_REV:=4.8-2014.04
       PKG_VERSION:=4.8.3
       PKG_VERSION_MAJOR:=4.8
-      PKG_MD5SUM:=b8bc08b05ff079dcdc020336a67ca4e1
+      PKG_MD5SUM:=5ba2f3a449b1658ccc09d27cc7ab3c03
       PKG_COMP:=xz
     endif
     PKG_SOURCE_URL:=http://launchpad.net/gcc-linaro/$(PKG_VERSION_MAJOR)/$(PKG_REV)/+download/
@@ -95,6 +95,10 @@ endif
 
 GCC_CONFIGURE:= \
        SHELL="$(BASH)" \
+       $(if $(shell gcc --version 2>&1 | grep LLVM), \
+               CFLAGS="-O2 -fbracket-depth=512 -pipe" \
+               CXXFLAGS="-O2 -fbracket-depth=512 -pipe" \
+       ) \
        $(HOST_SOURCE_DIR)/configure \
                --with-bugurl=$(BUGURL) \
                --with-pkgversion="$(PKGVERSION)" \
@@ -158,6 +162,13 @@ ifneq ($(GCC_ARCH),)
   GCC_CONFIGURE+= --with-arch=$(GCC_ARCH)
 endif
 
+ifneq ($(CONFIG_SOFT_FLOAT),y)
+  ifeq ($(CONFIG_arm),y)
+    GCC_CONFIGURE+= \
+               --with-float=hard
+  endif
+endif
+
 GCC_MAKE:= \
        export SHELL="$(BASH)"; \
        $(MAKE) \