From 1893e5ab2e8ecf2a60782af0ea77d5c4aeb91dcc Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Wed, 17 Aug 2016 09:47:36 +0200 Subject: [PATCH] make: remove use of UNDEF --- boards/msba2-common/Makefile.include | 2 -- boards/native/Makefile.include | 2 -- boards/x86-multiboot-common/Makefile.include | 2 -- cpu/Makefile.include.cortexm_common | 6 ------ cpu/atmega1281/Makefile.include | 4 ---- cpu/atmega2560/Makefile.include | 4 ---- cpu/k60/Makefile.include | 7 ------- cpu/k64f/Makefile.include | 6 ------ cpu/kinetis_common/Makefile.include | 3 --- cpu/kw2x/Makefile.include | 6 ------ cpu/msp430-common/Makefile.include | 1 - sys/Makefile.include | 3 --- sys/newlib/Makefile.include | 2 -- 13 files changed, 48 deletions(-) diff --git a/boards/msba2-common/Makefile.include b/boards/msba2-common/Makefile.include index 7f29043611855..94feb7d400c29 100644 --- a/boards/msba2-common/Makefile.include +++ b/boards/msba2-common/Makefile.include @@ -29,6 +29,4 @@ export INCLUDES += -I$(RIOTBOARD)/msba2-common/include -I$(RIOTBOARD)/msba2-comm export OFLAGS = -O ihex -export UNDEF += $(BINDIR)cpu/startup.o - USEMODULE += msba2-common-drivers diff --git a/boards/native/Makefile.include b/boards/native/Makefile.include index 2d6ac38eb0727..e514bc55d0852 100644 --- a/boards/native/Makefile.include +++ b/boards/native/Makefile.include @@ -173,5 +173,3 @@ eval-gprof: eval-cachegrind: $(CGANNOTATE) $(shell ls -rt cachegrind.out* | tail -1) - -export UNDEF += $(BINDIR)cpu/startup.o diff --git a/boards/x86-multiboot-common/Makefile.include b/boards/x86-multiboot-common/Makefile.include index f10ff1c741da3..4628f453ee0c4 100644 --- a/boards/x86-multiboot-common/Makefile.include +++ b/boards/x86-multiboot-common/Makefile.include @@ -55,8 +55,6 @@ LINKFLAGS += -m32 -nostdlib -nostdinc -nostartfiles -nodefaultlibs \ export CFLAGS += -ffunction-sections -fdata-sections export LINKFLAGS += -Wl,--gc-sections -UNDEF += $(BINDIR)x86-multiboot-common/startup.o - BASELIBS += $(NEWLIB_BASE)/lib/libc.a \ $(NEWLIB_BASE)/lib/libm.a diff --git a/cpu/Makefile.include.cortexm_common b/cpu/Makefile.include.cortexm_common index 828c932e74d09..a5f70d14cac79 100644 --- a/cpu/Makefile.include.cortexm_common +++ b/cpu/Makefile.include.cortexm_common @@ -82,12 +82,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! -ifeq ($(COMMON_STARTUP),) -export UNDEF += $(BINDIR)cpu/vectors.o -endif - # CPU depends on the cortex-m common module, so include it: include $(RIOTCPU)/cortexm_common/Makefile.include diff --git a/cpu/atmega1281/Makefile.include b/cpu/atmega1281/Makefile.include index dfbc4bc326ca6..a952b7caeff17 100644 --- a/cpu/atmega1281/Makefile.include +++ b/cpu/atmega1281/Makefile.include @@ -7,9 +7,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 diff --git a/cpu/atmega2560/Makefile.include b/cpu/atmega2560/Makefile.include index dfbc4bc326ca6..a952b7caeff17 100644 --- a/cpu/atmega2560/Makefile.include +++ b/cpu/atmega2560/Makefile.include @@ -7,9 +7,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 diff --git a/cpu/k60/Makefile.include b/cpu/k60/Makefile.include index a76b56d466f00..e5430b6fb46ab 100644 --- a/cpu/k60/Makefile.include +++ b/cpu/k60/Makefile.include @@ -15,11 +15,4 @@ export CFLAGS += -DCPU_MODEL_$(MODEL) ARCH = $(shell echo $(CPU_ARCH) | tr 'a-z-' 'A-Z_') export CFLAGS += -DCPU_ARCH_$(ARCH) -# this CPU implementation is using kinetis common startup -export COMMON_STARTUP = $(KINETIS_COMMON) - -# add the CPU specific system calls implementations for the linker -export UNDEF += $(BINDIR)cpu/vectors.o -export UNDEF += $(BINDIR)cpu/ssp.o - include $(RIOTCPU)/Makefile.include.cortexm_common diff --git a/cpu/k64f/Makefile.include b/cpu/k64f/Makefile.include index 82db239f31c19..ffca2bf06fd04 100644 --- a/cpu/k64f/Makefile.include +++ b/cpu/k64f/Makefile.include @@ -15,10 +15,4 @@ export CFLAGS += -DCPU_MODEL_$(MODEL) ARCH = $(shell echo $(CPU_ARCH) | tr 'a-z-' 'A-Z_') export CFLAGS += -DCPU_ARCH_$(ARCH) -# this CPU implementation is using kinetis common startup -export COMMON_STARTUP = $(KINETIS_COMMON) - -# add the CPU specific system calls implementations for the linker -export UNDEF += $(BINDIR)cpu/vectors.o - include $(RIOTCPU)/Makefile.include.cortexm_common diff --git a/cpu/kinetis_common/Makefile.include b/cpu/kinetis_common/Makefile.include index dd53307fbf121..f7d5dbc9cbc2e 100644 --- a/cpu/kinetis_common/Makefile.include +++ b/cpu/kinetis_common/Makefile.include @@ -4,9 +4,6 @@ export INCLUDES += -I$(RIOTCPU)/kinetis_common/include # Add search path for linker scripts export LINKFLAGS += -L$(RIOTCPU)/kinetis_common/ldscripts -# add the CPU specific code for the linker -export UNDEF += $(BINDIR)kinetis_common/fcfield.o - # include kinetis common periph drivers export USEMODULE += kinetis_common_periph diff --git a/cpu/kw2x/Makefile.include b/cpu/kw2x/Makefile.include index 14bbd8edfff1a..b6d79aa9e9edf 100644 --- a/cpu/kw2x/Makefile.include +++ b/cpu/kw2x/Makefile.include @@ -15,10 +15,4 @@ export CFLAGS += -DCPU_MODEL_$(MODEL) ARCH = $(shell echo $(CPU_ARCH) | tr 'a-z-' 'A-Z_') export CFLAGS += -DCPU_ARCH_$(ARCH) -# this CPU implementation is using kinetis common startup -export COMMON_STARTUP = $(KINETIS_COMMON) - -# add the CPU specific system calls implementations for the linker -export UNDEF += $(BINDIR)cpu/vectors.o - include $(RIOTCPU)/Makefile.include.cortexm_common diff --git a/cpu/msp430-common/Makefile.include b/cpu/msp430-common/Makefile.include index c82d22e33173c..04b460008f8f6 100644 --- a/cpu/msp430-common/Makefile.include +++ b/cpu/msp430-common/Makefile.include @@ -1,6 +1,5 @@ INCLUDES += -I$(RIOTCPU)/msp430-common/include/ -export UNDEF += $(BINDIR)msp430_common/startup.o export USEMODULE += msp430_common DEFAULT_MODULE += oneway_malloc diff --git a/sys/Makefile.include b/sys/Makefile.include index ae1b736b2d9f8..de29bf986b621 100644 --- a/sys/Makefile.include +++ b/sys/Makefile.include @@ -28,9 +28,6 @@ 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))) diff --git a/sys/newlib/Makefile.include b/sys/newlib/Makefile.include index c4b59f757a040..de7b6e8e9bbf3 100644 --- a/sys/newlib/Makefile.include +++ b/sys/newlib/Makefile.include @@ -1,5 +1,3 @@ -UNDEF := $(BINDIR)newlib_syscalls_default/syscalls.o $(UNDEF) - ifneq (,$(filter newlib_nano,$(USEMODULE))) # Test if nano.specs is available ifeq ($(shell $(LINK) -specs=nano.specs -E - 2>/dev/null >/dev/null