diff --git a/arch/risc-v/src/Makefile b/arch/risc-v/src/Makefile index 495f5d7113..e7078985bf 100644 --- a/arch/risc-v/src/Makefile +++ b/arch/risc-v/src/Makefile @@ -109,6 +109,9 @@ BIN = libarch$(LIBEXT) LDFLAGS += $(ARCHSCRIPT) +LDSTARTGROUP ?= --start-group +LDENDGROUP ?= --end-group + EXTRA_LIBS ?= EXTRA_LIBPATHS ?= LINKLIBS ?= @@ -176,7 +179,7 @@ nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) $(Q) echo "LD: nuttx" $(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \ -o $(NUTTX) $(HEAD_OBJ) $(EXTRA_OBJS) \ - --start-group $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) --end-group + $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LIBGCC) $(LDENDGROUP) ifneq ($(CONFIG_WINDOWS_NATIVE),y) $(Q) $(NM) $(NUTTX) | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \