diff options
| author | Pieter du Preez <pdupreez@gmail.com> | 2018-09-29 23:58:07 +0200 |
|---|---|---|
| committer | Pieter du Preez <pdupreez@gmail.com> | 2018-09-30 00:27:18 +0200 |
| commit | ddf7210407b8716973b9890cf7b59561af641b96 (patch) | |
| tree | 8fcb7bdf4509a55c879e6e01130e824e050799ab | |
| parent | 22ca63614d05c8b8037cb037279ee666b5ede8c2 (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.mk | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |
