This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

please help building proper libgcc


i'm writing program for STM32L4 series MCU. It's cortex M4F

I don't use any "industry standard" software layers, want my program to run from first instruction.

For now i compile programs with
arm-none-eabi-gcc -mfloat-abi=soft -mno-long-calls -mno-apcs-frame -ffreestanding -mcpu=cortex-m4 -mthumb -Os -Wno-multichar

And it works fine.when gcc needs it's own libraries (eg. handling long long types) it needs thumb2 libraries

i link it with

arm-none-eabi-ld -L/usr/local/arm-gcc/lib/gcc/arm-none-eabi/4.9.0/thumb/thumb2 -nostdlib

with -lgcc after object files.

Links fine, works fine.

BUT this MCU have FPU. when i enable using it by

gcc -mfloat-abi=hard -mfpu=fpv4-sp-d16 -mno-long-calls -mno-apcs-frame -ffreestanding -mcpu=cortex-m4 -mthumb -Os -Wno-multichar

program don't link as there is incompatible ABI between objects and library.

when i tried /usr/local/arm-gcc/lib/gcc/arm-none-eabi/4.9.0/fpu directory program links but doesn't work because this libgcc using 32-bit arm, not thumb2 code.


There is no libgcc with thumb2 and hard float.

How to compile libgcc. Preferably with same compile options as my program.

Sorry i have no knowledge about building libgcc. please help

gcc 6.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]