how to disable link the libc.a library

Asked by blackrose

Hi, i use arm gcc to compile my project for MCU Freescale K60 on debian. On this project, i use uart as printf, so i write custom printf function. When i compile these code, the libc was linked.Here is my compile options:

DEVICE = ' -mcpu=cortex-m4 -mthumb -ffunction-sections -fdata-sections '
CFLAGS = DEVICE + ' -g -Wall -v -nostdinc -mthumb-interwork -D__ASSEMBLY__ -D__FPU_USED -DMK60D10 -DDEBUG '
LFLAGS = DEVICE + ' -nostdlib -nodefaultlibs -nostartfiles ' + ' -Wl,--gc-sections,-Map=rtthread-k60.map,-cref,-u,Reset_Handler -T gcc_arm_ram.ld'

I found the libc.a through rtthread-k60.map file, and the option "-imultilib armv7e-m/fpu" was added on compile option.I wan't known how to disable the option imultilib.Could you have some suggests for me?

Tks.

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
blackrose
Solved:
Last query:
Last reply:
Revision history for this message
blackrose (chenxlbr) said :
#1

This problem solved by myself.My link script default add libc.a library. And add "-specs=nosys.specs" is good for me.