aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPieter du Preez <pdupreez@gmail.com>2018-09-29 23:58:07 +0200
committerPieter du Preez <pdupreez@gmail.com>2018-09-30 00:27:18 +0200
commitddf7210407b8716973b9890cf7b59561af641b96 (patch)
tree8fcb7bdf4509a55c879e6e01130e824e050799ab
parent22ca63614d05c8b8037cb037279ee666b5ede8c2 (diff)
Moved CORE_LIB to the last position of the defined linked objects.
The linking order was changed from: $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) $(OTHER_LIBS) to: $(LOCAL_OBJS) $(OTHER_OBJS) $(OTHER_LIBS) $(CORE_LIB) This makes more sense, as OTHER_OBJS would rather depend on CORE_LIB, than the other way around. Apart from libc and libm, CORE_LIB should conceptually _always_ be the last lib in the link list, as it is the core (base of everything). BTW, this was implemented correctly for the 'sam' architecture.
-rw-r--r--Arduino.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/Arduino.mk b/Arduino.mk
index fa82b0e..521a747 100644
--- a/Arduino.mk
+++ b/Arduino.mk
@@ -1555,7 +1555,7 @@ ifeq ($(findstring sam, $(strip $(ARCHITECTURE))), sam)
$(CC) $(LINKER_SCRIPTS) -Wl,-Map=$(OBJDIR)/$(TARGET).map -o $@ $(LOCAL_OBJS) $(OTHER_OBJS) $(OTHER_LIBS) $(LDFLAGS) $(CORE_LIB) -Wl,--end-group
# otherwise traditional
else
- $(CC) $(LDFLAGS) -o $@ $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) $(OTHER_LIBS) -lc -lm $(LINKER_SCRIPTS)
+ $(CC) $(LDFLAGS) -o $@ $(LOCAL_OBJS) $(OTHER_OBJS) $(OTHER_LIBS) $(CORE_LIB) -lc -lm $(LINKER_SCRIPTS)
endif
$(CORE_LIB): $(CORE_OBJS) $(LIB_OBJS) $(PLATFORM_LIB_OBJS) $(USER_LIB_OBJS)