Floating point 如何在cygwin中构建软浮动newlib?
对于newlib,我无法将-mfloat abi的默认值从Floating point 如何在cygwin中构建软浮动newlib?,floating-point,arm,embedded,elf,toolchain,Floating Point,Arm,Embedded,Elf,Toolchain,对于newlib,我无法将-mfloat abi的默认值从hard更改为soft 下面是如何配置bintutils ../configure --target=$ARMTARGET --prefix=$TOOLPATH --enable-interwork --enable-multilib --with-gnu-as --with-gnu-ld --disable-nls --disable-werror --with-float=soft --enable-soft-float
hard
更改为soft
下面是如何配置bintutils
../configure --target=$ARMTARGET --prefix=$TOOLPATH
--enable-interwork --enable-multilib --with-gnu-as
--with-gnu-ld --disable-nls --disable-werror --with-float=soft
--enable-soft-float
gcc
../configure --target=$ARMTARGET --prefix=$TOOLPATH
--enable-interwork --enable-multilib --enable-languages="c,c++"
--with-newlib --without-headers --disable-shared
--with-gnu-as --with-gnu-ld --with-float=soft --enable-soft-float
--disable-nls --with-gmp=$TOOLPATH --with-mpfr=$TOOLPATH
--with-mpc=$TOOLPATH --enable-obsolete
和newlib
../configure --target=$ARMTARGET --prefix=$TOOLPATH
--enable-interwork --disable-newlib-supplied-syscalls
--with-gnu-ld --with-gnu-as --disable-shared
--with-float=soft --enable-soft-float --disable-nls
--enable-newlib-io-long-long --enable-newlib-io-long-double
--enable-newlib-io-c99-formats
错误日志
..........
arm-softfloat-elf-gcc -B/home/Shadmanov_D/newlib-1.20.0/build/arm-softfloat- elf/fpu/newlib/
-isystem /home/Shadmanov_D/newlib-1.20.0/build/arm-softfloat-elf/fpu/newlib/targ-include -isystem /home/Shadmanov_D/newlib-1.20.0/newlib/libc/include
-B/home/Shadmanov_D/newlib-1.20.0/build/arm-softfloat-elf/fpu/libgloss/arm
-L/home/Shadmanov_D/newlib-1.20.0/build/arm-softfloat-elf/fpu/libgloss/libnosys -L/home/Shadmanov_D/newlib-1.20.0/libgloss/arm
-mfloat-abi=hard -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.20.0\" -DPACKAGE_STRING=\"newlib\ 1.20.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I.
-I../../../../../../newlib/libc/argz -D__NO_SYSCALLS__
-fno-builtin -g -O2 -mfloat-abi=hard -c -o lib_a-dummy.o
`test -f 'dummy.c' || echo '../../../../../../newlib/libc/argz/'`dummy.c
Assembler messages:
Error: hard-float conflicts with specified fpu
谢谢你的帮助 检查arm elf目标的多库配置文件,该文件位于
${GCC_SRC_DIR}/GCC/config/arm/t-arm-elf
更改以下行(它们从GCC版本4.6.4的第56行开始):
致:
更改后,重新配置并重新编译gcc
如果此过程无法解决问题,请提供
- 您正在使用的GCC版本
- 你的t-arm-elf文件
- 命令的输出
arm softfloat elf gcc-print multi-lib
MULTILIB_OPTIONS += mfloat-abi=hard
MULTILIB_DIRNAMES += fpu
MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
MULTILIB_OPTIONS += mfloat-abi=soft
MULTILIB_DIRNAMES += soft