diff --git a/stmhal/Makefile b/stmhal/Makefile index a83f2c4957..edd5e06193 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -51,7 +51,7 @@ INC += -I../lib/mp-readline INC += -I../lib/netutils INC += -I../lib/timeutils -CFLAGS_CORTEX_M = -mthumb -mabi=aapcs-linux -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion +CFLAGS_CORTEX_M = -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion CFLAGS_MCU_f4 = $(CFLAGS_CORTEX_M) -mtune=cortex-m4 -mcpu=cortex-m4 -DMCU_SERIES_F4 CFLAGS_MCU_f7 = $(CFLAGS_CORTEX_M) -mtune=cortex-m7 -mcpu=cortex-m7 -DMCU_SERIES_F7 CFLAGS_MCU_l4 = $(CFLAGS_CORTEX_M) -mtune=cortex-m4 -mcpu=cortex-m4 -DMCU_SERIES_L4 @@ -64,7 +64,7 @@ CFLAGS += -Iboards/$(BOARD) CFLAGS += -DSTM32_HAL_H='' LDFLAGS = -nostdlib -L $(LD_DIR) -T $(LD_FILE) -Map=$(@:.elf=.map) --cref -LIBS = +LIBS = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) # Remove uncalled code from the final image. CFLAGS += -fdata-sections -ffunction-sections @@ -78,9 +78,6 @@ else COPT += -Os -DNDEBUG endif -# uncomment this if you want libgcc -#LIBS += $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) - SRC_LIB = $(addprefix lib/,\ libc/string0.c \ libm/math.c \