[PATCH] build: move -nostartfiles earlier

Bertrand Jacquin bertrand at jacquin.bzh
Sat Apr 25 16:15:02 CEST 2020


---
 rules.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rules.mk b/rules.mk
index c0f99a6c92e2..23d55f677f58 100644
--- a/rules.mk
+++ b/rules.mk
@@ -60,8 +60,11 @@ ifeq ($(EMULATION),)
 # Discard compiler default specs
 MCFLAGS   += -specs=nosys.specs
 
+# Do not use the standard system startup files when linking
+MCFLAGS   += -nostartfiles
+
 MCFLAGS   += -mcpu=$(MCU)
-LDFLAGS   += $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) \
+LDFLAGS   += $(MCFLAGS) -T$(LDSCRIPT) \
             -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch,--gc-sections
 else
 DEFS      += -D_GNU_SOURCE



More information about the Gnuk-users mailing list