summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-02-13 14:39:49 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2015-02-14 11:47:20 +0100
commit176ed2d7b246a39cb0b9bc3f6cc3bfe3335b250f (patch)
tree6ff5622c20c6cfb10e52f60072e51a239f92cb20
parent5dce6450cf93bde8816892db3f67d74b9947b209 (diff)
fix glibc build of mips32 soft-float toolchain
-rw-r--r--target/config/Config.in.target6
-rw-r--r--toolchain/gcc/Makefile2
-rw-r--r--toolchain/glibc/Makefile.inc6
3 files changed, 11 insertions, 3 deletions
diff --git a/target/config/Config.in.target b/target/config/Config.in.target
index 34039cc80..ed3e7107f 100644
--- a/target/config/Config.in.target
+++ b/target/config/Config.in.target
@@ -24,8 +24,10 @@ config ADK_TARGET_CFLAGS
default "-mcpu=v8" if ADK_CPU_SPARC_V8
default "-mcpu=ultrasparc -m64" if ADK_CPU_SPARC_V9
default "-march=loongson2f -Wa,-mfix-loongson2f-nop" if ADK_CPU_LOONGSON2F
- default "-march=mips32" if ADK_CPU_MIPS32
- default "-march=mips32r2" if ADK_CPU_MIPS32R2
+ default "-march=mips32" if ADK_CPU_MIPS32 && ADK_hard_float
+ default "-march=mips32r2" if ADK_CPU_MIPS32R2 && ADK_hard_float
+ default "-march=mips32 -msoft-float" if ADK_CPU_MIPS32 && ADK_soft_float
+ default "-march=mips32r2 -msoft-float" if ADK_CPU_MIPS32R2 && ADK_soft_float
default "-march=mips64" if ADK_CPU_MIPS64
default "-march=armv8-a" if ADK_CPU_ARMV8
default "-march=armv5te -mtune=iwmmxt" if ADK_CPU_XSCALE
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 122e2aef4..eb36c49b6 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -44,7 +44,6 @@ GCC_CONFOPTS:= --prefix=$(TOOLCHAIN_DIR)/usr \
--disable-libstdcxx-pch \
--disable-ppl-version-check \
--disable-cloog-version-check \
- --disable-target-optspace \
--with-system-zlib \
--without-ppl \
--without-cloog \
@@ -252,6 +251,7 @@ $(GCC_BUILD_DIR_FINAL)/.configured:
$(WRKBUILD)/configure \
${GCC_CONFOPTS} \
${GCC_FINAL_CONFOPTS} \
+ --enable-cxx-flags='-fPIC' \
--enable-languages=$(LANGUAGES) \
--with-build-sysroot='$${prefix}/${STAGING_HOST2TARGET}' \
--with-sysroot='$${prefix}/${STAGING_HOST2TARGET}'
diff --git a/toolchain/glibc/Makefile.inc b/toolchain/glibc/Makefile.inc
index 2b6bdcef0..035d43236 100644
--- a/toolchain/glibc/Makefile.inc
+++ b/toolchain/glibc/Makefile.inc
@@ -33,6 +33,12 @@ GLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \
--with-tls \
--enable-kernel="2.6.32" \
--enable-add-ons
+ifeq ($(ADK_TARGET_FLOAT),soft)
+GLIBC_CONFOPTS+= --without-fp
+endif
+ifeq ($(ADK_TARGET_FLOAT),hard)
+GLIBC_CONFOPTS+= --with-fp
+endif
TARGET_CFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_CFLAGS))
TARGET_LDFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_LDFLAGS))
GLIBC_ENV:= PATH='${TARGET_PATH}' \