Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make: fix linking #5757

Closed
wants to merge 12 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ LINKFLAGPREFIX ?= -Wl,

DIRS += $(EXTERNAL_MODULE_DIRS)

_LINK = $(if $(CPPMIX),$(LINKXX),$(LINK)) $(UNDEF) $(LINKFLAGPREFIX)--start-group $(BASELIBS) -lm $(LINKFLAGPREFIX)--end-group $(LINKFLAGPREFIX)-Map=$(BINDIR)/$(APPLICATION).map $(LINKFLAGS)
_LINK = $(if $(CPPMIX),$(LINKXX),$(LINK)) $(UNDEF) $(LINKFLAGPREFIX)--whole-archive $(LINKFLAGPREFIX)--start-group $(filter-out $(EXTRA_LIBS),$(BASELIBS)) -lm $(LINKFLAGPREFIX)--end-group $(LINKFLAGPREFIX)--no-whole-archive $(LINKFLAGPREFIX)-Map=$(BINDIR)/$(APPLICATION).map $(EXTRA_LIBS) $(LINKFLAGS)

ifeq ($(BUILD_IN_DOCKER),1)
link: ..in-docker-container
Expand Down
2 changes: 0 additions & 2 deletions boards/common/msba2/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,4 @@ INCLUDES += -I$(RIOTBOARD)/common/msba2/drivers/include

export OFLAGS = -O ihex

export UNDEF += $(BINDIR)/cpu/startup.o

USEMODULE += boards_common_msba2-drivers
2 changes: 0 additions & 2 deletions boards/native/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -185,5 +185,3 @@ eval-gprof:

eval-cachegrind:
$(CGANNOTATE) $(shell ls -rt cachegrind.out* | tail -1)

export UNDEF += $(BINDIR)/cpu/startup.o
4 changes: 0 additions & 4 deletions cpu/atmega1281/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@ USEMODULE += atmega_common
# define path to atmega common module, which is needed for this CPU
export ATMEGA_COMMON = $(RIOTCPU)/atmega_common/

# explicitly tell the linker to link the syscalls and startup code.
# Without this the interrupt vectors will not be linked correctly!
export UNDEF += $(BINDIR)/cpu/startup.o

# CPU depends on the atmega common module, so include it
include $(ATMEGA_COMMON)Makefile.include
4 changes: 0 additions & 4 deletions cpu/atmega2560/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@ USEMODULE += atmega_common
# define path to atmega common module, which is needed for this CPU
export ATMEGA_COMMON = $(RIOTCPU)/atmega_common/

# explicitly tell the linker to link the syscalls and startup code.
# Without this the interrupt vectors will not be linked correctly!
export UNDEF += $(BINDIR)/cpu/startup.o

# CPU depends on the atmega common module, so include it
include $(ATMEGA_COMMON)Makefile.include
2 changes: 2 additions & 0 deletions cpu/efm32/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,8 @@ typedef struct {
timer_dev_t timer; /**< the higher numbered timer */
IRQn_Type irq; /**< number of the higher timer IRQ channel */
} timer_conf_t;

#define PERIPH_TIMER_PROVIDES_SET
/** @} */

/**
Expand Down
3 changes: 0 additions & 3 deletions cpu/kinetis/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ LINKFLAGS += $(LINKFLAGPREFIX)--defsym=_ram_start_addr=$(RAM_START_ADDR)
LINKFLAGS += $(LINKFLAGPREFIX)--defsym=_rom_length=$(ROM_LEN)
LINKFLAGS += $(LINKFLAGPREFIX)--defsym=_ram_length=$(RAM_LEN)

# add the CPU specific flash configuration field for the linker
export UNDEF += $(BINDIR)/cpu/fcfield.o

# include common periph drivers
USEMODULE += periph_common

Expand Down
1 change: 1 addition & 0 deletions cpu/mips32r2_common/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ ifeq ($(USE_UHI_SYSCALLS),1)
#Use UHI to handle syscalls
export LINKFLAGS += -luhi
export USEMODULE += newlib_syscalls_mips_uhi
EXTRA_LIBS += $(BINDIR)/newlib_syscalls_mips_uhi.a
else
#Use RIOT to handle syscalls (default)
export USEMODULE += newlib_syscalls_default
Expand Down
7 changes: 7 additions & 0 deletions cpu/mips32r2_generic/include/periph_cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ extern "C" {
#define PROVIDES_PM_SET_LOWEST
/** @} */

/**
* @name timer configuration
* @{
*/
#define PERIPH_TIMER_PROVIDES_SET
/** @} */

#ifdef __cplusplus
}
#endif
Expand Down
1 change: 0 additions & 1 deletion cpu/msp430_common/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ INCLUDES += -I$(RIOTCPU)/msp430_common/include/
MODEL = $(shell echo $(CPU_MODEL) | tr 'a-z' 'A-Z')
export CFLAGS += -DCPU_MODEL_$(MODEL)

export UNDEF += $(BINDIR)/msp430_common/startup.o
export USEMODULE += msp430_common msp430_common_periph periph_common

DEFAULT_MODULE += oneway_malloc
Expand Down
7 changes: 0 additions & 7 deletions makefiles/arch/cortexm.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@ export CFLAGS += -DARM_MATH_CM7
endif
endif

# Explicitly tell the linker to link the startup code.
# Without this the interrupt vectors will not be linked correctly!
VECTORS_O ?= $(BINDIR)/cpu/vectors.o
ifeq ($(COMMON_STARTUP),)
export UNDEF += $(VECTORS_O)
endif

# CPU depends on the cortex-m common module, so include it:
include $(RIOTCPU)/cortexm_common/Makefile.include

Expand Down
2 changes: 1 addition & 1 deletion makefiles/bindist.inc.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
USEMODULE += $(BIN_USEMODULE)
USEMODULE += $(filter-out $(APPLICATION),$(BIN_USEMODULE))

DIST_FILES += $(BIN_USEMODULE:%=bin/$(BOARD)/%.a)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 8f2cb10afd5636aeaea7e89c7acd221cecfb4ce8 Mon Sep 17 00:00:00 2001
From: Kaspar Schleiser <kaspar@schleiser.de>
Date: Thu, 22 Feb 2018 23:04:08 +0100
Subject: [PATCH] ccnl-riot: remove riot specific ccnl_buf_new()

---
src/ccnl-riot/src/ccn-lite-riot.c | 15 ---------------
1 file changed, 15 deletions(-)

diff --git a/src/ccnl-riot/src/ccn-lite-riot.c b/src/ccnl-riot/src/ccn-lite-riot.c
index 6f978d15f1..65d749ec97 100644
--- a/src/ccnl-riot/src/ccn-lite-riot.c
+++ b/src/ccnl-riot/src/ccn-lite-riot.c
@@ -183,21 +183,6 @@ extern int ccnl_isContent(unsigned char *buf, int len, int suite);
* @}
*/

-// ----------------------------------------------------------------------
-struct ccnl_buf_s*
-ccnl_buf_new(void *data, int len)
-{
- struct ccnl_buf_s *b = ccnl_malloc(sizeof(struct ccnl_buf_s) + len);
-
- if (!b)
- return NULL;
- b->next = NULL;
- b->datalen = len;
- if (data)
- memcpy(b->data, data, len);
- return b;
-}
-
/* add a netif to CCN-lite's interfaces, set the nettype, and register a receiver */
int
ccnl_open_netif(kernel_pid_t if_pid, gnrc_nettype_t netreg_type)
--
2.16.1

2 changes: 2 additions & 0 deletions pkg/oonf_api/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ INCLUDES += -I$(PKGDIRBASE)/oonf_api/src-api
ifeq ($(TOOLCHAIN), llvm)
CFLAGS += -Wno-keyword-macro -Wno-parentheses-equality
endif

EXTRA_LIBS += $(BINDIR)/oonf_api.a
4 changes: 4 additions & 0 deletions pkg/openthread/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ ifneq (,$(filter openthread_contrib,$(USEMODULE)))
DIRS += $(OPENTHREAD_DIR)/contrib
DIRS += $(OPENTHREAD_DIR)/contrib/netdev
endif

EXTRA_LIBS += ${BINDIR}/libmbedcrypto.a
EXTRA_LIBS += ${BINDIR}/libopenthread.a
EXTRA_LIBS += ${BINDIR}/libopenthread-cli.a
11 changes: 4 additions & 7 deletions sys/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ endif

ifneq (,$(filter cpp11-compat,$(USEMODULE)))
USEMODULE_INCLUDES += $(RIOTBASE)/sys/cpp11-compat/include
# make sure cppsupport.o is linked explicitly because __dso_handle is not
# found if it is hidden away inside a static object.
export UNDEF += $(BINDIR)/cpp11-compat/cppsupport.o
endif

ifneq (,$(filter gnrc_slip,$(USEMODULE)))
FEATURES_REQUIRED += periph_uart
endif

ifneq (,$(filter embunit,$(USEMODULE)))
Expand All @@ -65,10 +66,6 @@ ifneq (,$(filter newlib,$(USEMODULE)))
include $(RIOTMAKE)/libc/newlib.mk
endif

ifneq (,$(filter newlib_syscalls_default,$(USEMODULE)))
include $(RIOTBASE)/sys/newlib_syscalls_default/Makefile.include
endif

ifneq (,$(filter arduino,$(USEMODULE)))
include $(RIOTBASE)/sys/arduino/Makefile.include
endif
Expand Down
1 change: 0 additions & 1 deletion sys/newlib_syscalls_default/Makefile.include

This file was deleted.

1 change: 0 additions & 1 deletion tests/can_trx/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export APPLICATION = can_trx
include ../Makefile.tests_common

USEMODULE += shell
Expand Down