From af6adcc61c6510c4e178be47c6ce7a9e46352580 Mon Sep 17 00:00:00 2001 From: Rik Bouwmeester Date: Tue, 15 Oct 2024 14:23:13 +0200 Subject: [PATCH] Revert "Removed -nostdlib from LDFLAGS" This reverts commit af0cbe50cc38dfeb0bc5f3c098b683e22614f05c. `-nostdlib` was added to LDFLAGS when we converted to kbuild. PR #1310 removed -nostdlib in order to make it possible to use the `atof()` function. However, this now causes similar linker warnings to those it was trying to solve (discussion 784). 420 days later, `atof()` is not being used anywhere internally. Discussion in #1299 is not very conclusive on why this is needed. The arguing mostly relies that the cost in flash and RAM is so low that there is no good reason not to do it. There is now! --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8b5ae0a04c..487801ab38 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ LIB = $(srctree)/src/lib PROCESSOR = -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 LINKER_DIR = $(srctree)/tools/make/F405/linker -LDFLAGS += --specs=nosys.specs --specs=nano.specs $(PROCESSOR) +LDFLAGS += --specs=nosys.specs --specs=nano.specs $(PROCESSOR) -nostdlib image_LDFLAGS += -Wl,-Map=$(PROG).map,--cref,--gc-sections,--undefined=uxTopUsedPriority image_LDFLAGS += -L$(srctree)/tools/make/F405/linker image_LDFLAGS += -T $(LINKER_DIR)/FLASH_CLOAD.ld