diff options
-rw-r--r-- | Makefile.in | 27 | ||||
-rwxr-xr-x | configure | 12 | ||||
-rw-r--r-- | configure.ac | 10 |
3 files changed, 35 insertions, 14 deletions
diff --git a/Makefile.in b/Makefile.in index 6a5cfdd..5e8a01c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -41,7 +41,9 @@ MULTILIB_FLAGS := @multilib_flags@ ATOMIC_CFLAGS := @atomic_cflags@ FLOAT_CFLAGS := @float_cflags@ FLOAT_ASFLAGS := @float_asflags@ -GLIBC_CONFIGURE_FLAGS := @glibc_configure_flags@ +BINUTILS_FLOAT_FLAGS := @binutils_float_flags@ +GCC_FLOAT_FLAGS := @gcc_float_flags@ +GLIBC_FLOAT_FLAGS := @glibc_float_flags@ CFLAGS_FOR_TARGET := $(CFLAGS_FOR_TARGET_EXTRA) $(ATOMIC_CFLAGS) $(FLOAT_CFLAGS) ASFLAGS_FOR_TARGET := $(ASFLAGS_FOR_TARGET_EXTRA) $(FLOAT_ASFLAGS) @@ -57,17 +59,17 @@ linux: $(MAKE) stamps/build-gcc-linux-stage1 XLEN=64 $(MAKE) stamps/build-glibc-linux64 XLEN=64 $(MAKE) stamps/build-glibc-linux64-soft-float XLEN=64 MULTILIB=-soft-float \ - GLIBC_CONFIGURE_FLAGS="--without-fp --libdir=/usr/lib/soft-float libc_cv_slibdir=/lib/soft-float" + GLIBC_FLOAT_FLAGS="--without-fp --libdir=/usr/lib/soft-float libc_cv_slibdir=/lib/soft-float" $(MAKE) stamps/build-glibc-linux64-no-atomic XLEN=64 MULTILIB=-no-atomic \ CC="riscv64-unknown-linux-gnu-gcc -mno-atomic" \ CFLAGS_FOR_TARGET_EXTRA="-mno-atomic" \ ASFLAGS_FOR_TARGET_EXTRA="-mno-atomic" \ - GLIBC_CONFIGURE_FLAGS="--libdir=/usr/lib/no-atomic libc_cv_slibdir=/lib/no-atomic" + GLIBC_FLOAT_FLAGS="--libdir=/usr/lib/no-atomic libc_cv_slibdir=/lib/no-atomic" $(MAKE) stamps/build-glibc-linux64-soft-float-no-atomic XLEN=64 MULTILIB=-soft-float-no-atomic \ CC="riscv64-unknown-linux-gnu-gcc -mno-atomic" \ CFLAGS_FOR_TARGET_EXTRA="-mno-atomic" \ ASFLAGS_FOR_TARGET_EXTRA="-mno-atomic" \ - GLIBC_CONFIGURE_FLAGS="--without-fp --libdir=/usr/lib/soft-float/no-atomic libc_cv_slibdir=/lib/soft-float/no-atomic" + GLIBC_FLOAT_FLAGS="--without-fp --libdir=/usr/lib/soft-float/no-atomic libc_cv_slibdir=/lib/soft-float/no-atomic" $(MAKE) stamps/build-glibc-linux32 XLEN=32 \ CC="riscv64-unknown-linux-gnu-gcc -m32" \ READELF=riscv64-unknown-linux-gnu-readelf \ @@ -78,19 +80,19 @@ linux: READELF=riscv64-unknown-linux-gnu-readelf \ CFLAGS_FOR_TARGET_EXTRA="-m32" \ ASFLAGS_FOR_TARGET_EXTRA="-m32" \ - GLIBC_CONFIGURE_FLAGS="--without-fp --libdir=/usr/lib32/soft-float libc_cv_slibdir=/lib32/soft-float" + GLIBC_FLOAT_FLAGS="--without-fp --libdir=/usr/lib32/soft-float libc_cv_slibdir=/lib32/soft-float" $(MAKE) stamps/build-glibc-linux32-no-atomic XLEN=32 MULTILIB=-no-atomic \ CC="riscv64-unknown-linux-gnu-gcc -m32 -mno-atomic" \ READELF=riscv64-unknown-linux-gnu-readelf \ CFLAGS_FOR_TARGET_EXTRA="-m32 -mno-atomic" \ ASFLAGS_FOR_TARGET_EXTRA="-m32 -mno-atomic" \ - GLIBC_CONFIGURE_FLAGS="--libdir=/usr/lib32/no-atomic libc_cv_slibdir=/lib32/no-atomic" + GLIBC_FLOAT_FLAGS="--libdir=/usr/lib32/no-atomic libc_cv_slibdir=/lib32/no-atomic" $(MAKE) stamps/build-glibc-linux32-soft-float-no-atomic XLEN=32 MULTILIB=-soft-float-no-atomic \ CC="riscv64-unknown-linux-gnu-gcc -m32 -mno-atomic" \ READELF=riscv64-unknown-linux-gnu-readelf \ CFLAGS_FOR_TARGET_EXTRA="-m32 -mno-atomic" \ ASFLAGS_FOR_TARGET_EXTRA="-m32 -mno-atomic" \ - GLIBC_CONFIGURE_FLAGS="--without-fp --libdir=/usr/lib32/soft-float/no-atomic libc_cv_slibdir=/lib32/soft-float/no-atomic" + GLIBC_FLOAT_FLAGS="--without-fp --libdir=/usr/lib32/soft-float/no-atomic libc_cv_slibdir=/lib32/soft-float/no-atomic" $(MAKE) stamps/build-gcc-linux-stage2 XLEN=64 endif @@ -123,6 +125,7 @@ stamps/build-binutils-linux: src/binutils --target=riscv$(XLEN)-unknown-linux-gnu \ --prefix=$(INSTALL_DIR) \ --with-sysroot=$(SYSROOT) \ + $(BINUTILS_FLOAT_FLAGS) \ $(MULTILIB_FLAGS) \ --disable-nls $(MAKE) -C $(notdir $@) @@ -165,7 +168,7 @@ stamps/build-glibc-linux$(XLEN)$(MULTILIB): src/glibc stamps/build-gcc-linux-sta --enable-__thread \ $(MULTILIB_FLAGS) \ --enable-kernel=2.6.32 \ - $(GLIBC_CONFIGURE_FLAGS) + $(GLIBC_FLOAT_FLAGS) $(MAKE) -C $(notdir $@) $(MAKE) -C $(notdir $@) install install_root=$(SYSROOT) mkdir -p $(dir $@) && touch $@ @@ -191,6 +194,7 @@ stamps/build-gcc-linux-stage1: src/gcc stamps/build-binutils-linux \ --disable-libgomp \ --disable-nls \ --disable-bootstrap \ + $(GCC_FLOAT_FLAGS) \ $(MULTILIB_FLAGS) \ $(WITH_ARCH) $(MAKE) -C $(notdir $@) inhibit-libc=true all-gcc @@ -214,8 +218,9 @@ stamps/build-gcc-linux-stage2: src/gcc stamps/build-glibc-linux$(XLEN) \ --disable-libssp \ --disable-libquadmath \ --disable-nls \ - $(MULTILIB_FLAGS) \ --disable-bootstrap \ + $(GCC_FLOAT_FLAGS) \ + $(MULTILIB_FLAGS) \ $(WITH_ARCH) $(MAKE) -C $(notdir $@) $(MAKE) -C $(notdir $@) install @@ -228,7 +233,8 @@ stamps/build-binutils-newlib: src/binutils --target=riscv$(XLEN)-unknown-elf \ --prefix=$(INSTALL_DIR) \ --enable-tls \ - --disable-werror + --disable-werror \ + $(BINUTILS_FLOAT_FLAGS) $(MAKE) -C $(notdir $@) $(MAKE) -C $(notdir $@) install mkdir -p $(dir $@) && touch $@ @@ -257,6 +263,7 @@ stamps/build-gcc-newlib: src/newlib-gcc stamps/build-binutils-newlib --disable-libquadmath \ --disable-libgomp \ --disable-nls \ + $(GCC_FLOAT_FLAGS) \ $(MULTILIB_FLAGS) \ $(WITH_ARCH) $(MAKE) -C $(notdir $@) inhibit-libc=true @@ -585,7 +585,9 @@ PACKAGE_URL='' ac_subst_vars='LTLIBOBJS LIBOBJS multilib_flags -glibc_configure_flags +glibc_float_flags +gcc_float_flags +binutils_float_flags float_asflags float_cflags atomic_cflags @@ -3184,11 +3186,17 @@ fi if test "x$enable_float" != xno; then : + float_cflags=-mhard-float +float_asflags=-mhard-float +binutils_float_flags=--disable-soft-float +gcc_float_flags="--disable-soft-float --with-float=hard" else float_cflags=-msoft-float float_asflags=-msoft-float -glibc_configure_flags=--without-fp +binutils_float_flags=--enable-soft-float +gcc_float_flags="--enable-soft-float --with-float=soft" +glibc_float_flags=--without-fp fi diff --git a/configure.ac b/configure.ac index 6bec4fe..3baa839 100644 --- a/configure.ac +++ b/configure.ac @@ -82,10 +82,16 @@ AC_ARG_ENABLE(float, ) AS_IF([test "x$enable_float" != xno], - [], + [AC_SUBST(float_cflags,-mhard-float)dnl +AC_SUBST(float_asflags,-mhard-float)dnl +AC_SUBST(binutils_float_flags,--disable-soft-float)dnl +AC_SUBST(gcc_float_flags,"--disable-soft-float --with-float=hard")dnl +AC_SUBST(glibc_float_flags,)], [AC_SUBST(float_cflags,-msoft-float)dnl AC_SUBST(float_asflags,-msoft-float)dnl -AC_SUBST(glibc_configure_flags,--without-fp)]) +AC_SUBST(binutils_float_flags,--enable-soft-float)dnl +AC_SUBST(gcc_float_flags,"--enable-soft-float --with-float=soft")dnl +AC_SUBST(glibc_float_flags,--without-fp)]) AC_ARG_ENABLE(multilib, [AS_HELP_STRING([--enable-multilib], |