Trying to compile gcc 5.2.0 for ARM Cortex-M4

Simon Wright simon@pushface.org
Fri Nov 13 15:13:00 GMT 2015


On 13 Nov 2015, at 13:07, Johannes Bauer <dfnsonfsduifb@gmx.de> wrote:
> 
> Hi list,
> 
> I'm trying to compile gcc 5.2.0 for a ARM Cortex-M4 target (on top of
> binutils-2.25.1). This is the configure command I use to configure gcc:
> 
> ../configure --prefix=/home/joe/bin/gcc/arm-cm4-bare/ --without-headers
> --with-gnu-ld --with-gnu-as --with-dwarf2 --disable-werror
> --disable-threads --disable-nls --disable-shared --disable-libssp
> --disable-libmudflap --disable-libgomp --target=arm-none-eabi
> --with-newlib --with-tune=cortex-m4 --disable-interwork
> --disable-multilib --with-fpu=fpv4-sp-d16 --with-float=hard
> --with-mode=thumb --enable-languages=c --with-system-zlib
> --enable-target-optspace
> 
> Unfortunately, the build fails:
> 
> checking for suffix of object files... configure: error: in
> `/home/joe/work/gcc/gcc/gcc-5.2.0/build/arm-none-eabi/libgcc':
> configure: error: cannot compute suffix of object files: cannot compile
> See `config.log' for more details.
> make[1]: *** [configure-target-libgcc] Error 1
> 
> This message is a bit misleading. config.log has the reason:
> 
> configure:3464: /home/joe/work/gcc/gcc/gcc-5.2.0/build/./gcc/xgcc
> -B/home/joe/work/gcc/gcc/gcc-5.2.0/build/./gcc/
> -B/home/joe/bin/gcc/arm-cm4-bare/arm-none-eabi/bin/
> -B/home/joe/bin/gcc/arm-cm4-bare/arm-none-eabi/lib/ -isystem
> /home/joe/bin/gcc/arm-cm4-bare/arm-none-eabi/include -isystem
> /home/joe/bin/gcc/arm-cm4-bare/arm-none-eabi/sys-include    -o conftest
> -g -O2 -g -Os   conftest.c  >&5
> conftest.c: In function 'main':
> conftest.c:12:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI
> 
> I only care about Cortex-M4, which exclusively uses Thumb-2. How can I
> completely disable Thumb-1 so I can successfully build gcc?

My equivalent for 4.9.1 had —with-cpu=cortex-m4 (and not —with-tune=cortex-m4)




More information about the Gcc-help mailing list