Ask Your Question

arm-none-eabi-gcc cannot find -lgcc

asked 2015-01-26 16:31:05 -0600

Tick gravatar image


I installed a ARM toolchain with :

yum install arm-none-eabi-gcc-cs 
yum install arm-none-eabi-binutils-cs
yum install arm-none-eabi-newlib

But I have a problem when I compile :

arm-none-eabi-gcc -mcpu=cortex-m4 -mlittle-endian -mthumb -DSTM32F401xC -T ld/STM32F401CC_FLASH.ld  *.o -o main.elf
/usr/lib64/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld: skipping incompatible /usr/lib64/gcc/arm-none-eabi/4.8.1/thumb/libgcc.a when searching for -lgcc
/usr/lib64/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld: skipping incompatible /usr/lib64/gcc/arm-none-eabi/4.8.1/libgcc.a when searching for -lgcc
/usr/lib64/gcc/arm-none-eabi/4.8.1/../../../../arm-none-eabi/bin/ld: cannot find -lgcc
collect2: error: ld returned 1 exit status

It looks that libgcc is not present for ARMs Architecture

arm-none-eabi-gcc -print-multi-lib

Can someone help me ? Thx :)

edit retag flag offensive close merge delete


yum install gcc-arm-linux-gnu

ILMostro gravatar imageILMostro ( 2015-01-26 21:21:17 -0600 )edit

take a look at this question on stackoverflow for a possible resolution.

ILMostro gravatar imageILMostro ( 2015-01-26 21:35:31 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-02-28 11:44:52 -0600

hedayat gravatar image
edit flag offensive delete link more

Question Tools


Asked: 2015-01-26 16:31:05 -0600

Seen: 1,608 times

Last updated: Feb 28 '15