Skip to content

Commit

Permalink
List linker scripts at end of LD to make sure dependencies are in order.
Browse files Browse the repository at this point in the history
  • Loading branch information
peplin committed Sep 6, 2014
1 parent 321430b commit 6f9e04c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Arduino.mk
Expand Up @@ -1120,7 +1120,7 @@ pre-build:
$(call runscript_if_exists,$(PRE_BUILD_HOOK))

$(TARGET_ELF): $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS)
$(CC) $(LDFLAGS) -o $@ $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) -lc -lm
$(CC) $(LDFLAGS) -o $@ $(LOCAL_OBJS) $(CORE_LIB) $(OTHER_OBJS) -lc -lm $(LINKER_SCRIPTS)

$(CORE_LIB): $(CORE_OBJS) $(LIB_OBJS) $(USER_LIB_OBJS)
$(AR) rcs $@ $(CORE_OBJS) $(LIB_OBJS) $(USER_LIB_OBJS)
Expand Down
8 changes: 4 additions & 4 deletions chipKIT.mk
Expand Up @@ -102,11 +102,11 @@ LDSCRIPT = $(call PARSE_BOARD,$(BOARD_TAG),ldscript)
LDSCRIPT_FILE = $(ARDUINO_CORE_PATH)/$(LDSCRIPT)

MCU_FLAG_NAME=mprocessor
LDFLAGS += -T$(ARDUINO_CORE_PATH)/$(LDSCRIPT)
LDFLAGS += -T$(ARDUINO_CORE_PATH)/chipKIT-application-COMMON.ld
LDFLAGS += -mno-peripheral-libs -nostartfiles -Wl,--gc-sections
LDFLAGS += -mdebugger -mno-peripheral-libs -nostartfiles -Wl,--gc-sections
LINKER_SCRIPTS += -T $(ARDUINO_CORE_PATH)/$(LDSCRIPT)
LINKER_SCRIPTS += -T $(ARDUINO_CORE_PATH)/chipKIT-application-COMMON.ld
CPPFLAGS += -mno-smart-io -fno-short-double -fframe-base-loclist \
-g3 -Wcast-align -D__PROG_TYPES_COMPAT__
-g3 -Wcast-align -D_BOARD_MEGA_
CFLAGS_STD =

include $(ARDMK_DIR)/Arduino.mk

0 comments on commit 6f9e04c

Please sign in to comment.