Skip to content

Commit

Permalink
Revert "Removed -nostdlib from LDFLAGS"
Browse files Browse the repository at this point in the history
This reverts commit af0cbe5.

`-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!
  • Loading branch information
gemenerik committed Oct 15, 2024
1 parent 2cbf933 commit af6adcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit af6adcc

Please sign in to comment.