1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2026-01-01 01:41:18 +01:00

Merge pull request #13018 from aabadie/pr/make/linkflags_remove_exports

make: remove use of export with LINKFLAGS variable
This commit is contained in:
Francisco 2020-01-02 16:37:04 +01:00 committed by GitHub
commit 45b2cca14f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 34 additions and 34 deletions

View File

@ -48,25 +48,25 @@ CXXUWFLAGS +=
CXXEXFLAGS +=
ifeq ($(OS_ARCH),x86_64)
export LINKFLAGS += -m32
LINKFLAGS += -m32
endif
ifeq ($(OS),FreeBSD)
ifeq ($(OS_ARCH),amd64)
export LINKFLAGS += -m32 -DCOMPAT_32BIT -L/usr/lib32 -B/usr/lib32
LINKFLAGS += -m32 -DCOMPAT_32BIT -L/usr/lib32 -B/usr/lib32
endif
export LINKFLAGS += -L $(BINDIR)
LINKFLAGS += -L $(BINDIR)
else
export LINKFLAGS += -ldl
LINKFLAGS += -ldl
endif
# clean up unused functions
CFLAGS += -ffunction-sections -fdata-sections
ifeq ($(OS),Darwin)
export LINKFLAGS += -Wl,-dead_strip
LINKFLAGS += -Wl,-dead_strip
else
export LINKFLAGS += -Wl,--gc-sections
LINKFLAGS += -Wl,--gc-sections
endif
export LINKFLAGS += -ffunction-sections
LINKFLAGS += -ffunction-sections
# set the tap interface for term/valgrind
ifneq (,$(filter netdev_default gnrc_netdev_default,$(USEMODULE)))
@ -96,10 +96,10 @@ all-valgrind: export NATIVEINCLUDES += $(shell pkg-config valgrind --cflags)
all-debug: CFLAGS += -g3
all-cachegrind: CFLAGS += -g3
all-gprof: CFLAGS += -pg
all-gprof: export LINKFLAGS += -pg
all-gprof: LINKFLAGS += -pg
all-asan: CFLAGS += -fsanitize=address -fno-omit-frame-pointer -g3
all-asan: CFLAGS += -DNATIVE_IN_CALLOC
all-asan: export LINKFLAGS += -fsanitize=address -fno-omit-frame-pointer -g3
all-asan: LINKFLAGS += -fsanitize=address -fno-omit-frame-pointer -g3
INCLUDES += $(NATIVEINCLUDES)

View File

@ -19,8 +19,8 @@ CFLAGS_OPT ?= -Os
CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG)
export LINKFLAGS += -T$(RIOTCPU)/$(CPU)/ldscripts/$(CPU).ld
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc -nostartfiles
export LINKFLAGS += -Wl,--gc-sections
LINKFLAGS += -T$(RIOTCPU)/$(CPU)/ldscripts/$(CPU).ld
LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -static -lgcc -nostartfiles
LINKFLAGS += -Wl,--gc-sections
export UNDEF += $(BINDIR)/cpu/startup.o

View File

@ -9,7 +9,7 @@ export USEMODULE += periph_timer
ifeq ($(USE_UHI_SYSCALLS),1)
#Use UHI to handle syscalls
export LINKFLAGS += -luhi
LINKFLAGS += -luhi
export USEMODULE += newlib_syscalls_mips_uhi
CFLAGS += -DHAVE_HEAP_STATS
else

View File

@ -6,8 +6,8 @@ include $(RIOTMAKE)/arch/mips.inc.mk
# define build specific options
CFLAGS += -march=m4k -DSKIP_COPY_TO_RAM
export LINKFLAGS += -Wl,--defsym,__use_excpt_boot=0 $(CFLAGS)
export LINKFLAGS += -Tpic32mx512_12_128_uhi.ld
LINKFLAGS += -Wl,--defsym,__use_excpt_boot=0 $(CFLAGS)
LINKFLAGS += -Tpic32mx512_12_128_uhi.ld
# the pickit programmer (MPLAB-IPE) wants physical addresses in the hex file!!
OBJCOPY = objcopy #use system objcopy as toolchain one is broken.

View File

@ -7,8 +7,8 @@ include $(RIOTMAKE)/arch/mips.inc.mk
CFLAGS += -march=m5101 -mmicromips -DSKIP_COPY_TO_RAM
CFLAGS += -DMIPS_MICROMIPS
export LINKFLAGS += -Wl,--defsym,__use_excpt_boot=0 $(CFLAGS)
export LINKFLAGS += -Tpic32mz2048_uhi.ld
LINKFLAGS += -Wl,--defsym,__use_excpt_boot=0 $(CFLAGS)
LINKFLAGS += -Tpic32mz2048_uhi.ld
# the pickit programmer (MPLAB-IPE) wants physical addresses in the hex file!!
OBJCOPY = objcopy #use system objcopy as toolchain one is broken.

View File

@ -5,6 +5,6 @@ CFLAGS += -DCPU_FAM_$(call uppercase_and_underscore,$(CPU_FAM))
CFLAGS += -DDONT_USE_CMSIS_INIT
# for the sam[drl] CPUs we hold all linkerscripts in the sam0 common folder
export LINKFLAGS += -L$(RIOTCPU)/sam_common/ldscripts
LINKFLAGS += -L$(RIOTCPU)/sam_common/ldscripts
INCLUDES += -I$(RIOTCPU)/sam_common/include

View File

@ -7,7 +7,7 @@ USEMODULE += pm_layered
USEMODULE += stm32_common stm32_common_periph
# For stm32 cpu's we use the stm32_common.ld linker script
export LINKFLAGS += -L$(RIOTCPU)/stm32_common/ldscripts
LINKFLAGS += -L$(RIOTCPU)/stm32_common/ldscripts
LINKER_SCRIPT ?= stm32_common.ld
INCLUDES += -I$(RIOTCPU)/stm32_common/include

View File

@ -45,7 +45,7 @@ ifeq ($(USE_HARD_FLOAT),1)
else
#hard-float is the default so we must set soft-float
CFLAGS += -msoft-float
export LINKFLAGS += -msoft-float
LINKFLAGS += -msoft-float
endif
ifeq ($(USE_DSP),1)
@ -60,10 +60,10 @@ endif
ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_OPT) $(CFLAGS_DBG)
export LINKFLAGS += $(MIPS_HAL_LDFLAGS)
export LINKFLAGS += -L$(RIOTCPU)/$(CPU)/ldscripts
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT)
export LINKFLAGS += -Wl,--gc-sections
LINKFLAGS += $(MIPS_HAL_LDFLAGS)
LINKFLAGS += -L$(RIOTCPU)/$(CPU)/ldscripts
LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT)
LINKFLAGS += -Wl,--gc-sections
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-overflow
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-truncation

View File

@ -13,7 +13,7 @@ CFLAGS_OPT ?= -Os
CFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
ASFLAGS += $(CFLAGS_CPU) --defsym $(CPU_MODEL)=1 $(CFLAGS_DBG)
# export linker flags
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -Wl,--gc-sections -static -lgcc
LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) -Wl,--gc-sections -static -lgcc
OPTIONAL_CFLAGS_BLACKLIST += -fdiagnostics-color
OPTIONAL_CFLAGS_BLACKLIST += -Wformat-overflow

View File

@ -7,11 +7,11 @@ CFLAGS_LINK = -nostartfiles -ffunction-sections -fdata-sections
CFLAGS_DBG ?= -g3
CFLAGS_OPT ?= -Os
export LINKFLAGS += -L$(RIOTCPU)/$(CPU)/ldscripts
export LINKER_SCRIPT ?= $(CPU_MODEL).ld
export LINKFLAGS += -T$(LINKER_SCRIPT)
LINKFLAGS += -L$(RIOTCPU)/$(CPU)/ldscripts
LINKER_SCRIPT ?= $(CPU_MODEL).ld
LINKFLAGS += -T$(LINKER_SCRIPT)
CFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG) $(CFLAGS_OPT) $(CFLAGS_LINK)
ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DBG)
# export linker flags
export LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT) -Wl,--gc-sections -static -lgcc
LINKFLAGS += $(CFLAGS_CPU) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT) -Wl,--gc-sections -static -lgcc

View File

@ -14,10 +14,10 @@ ifneq (,$(filter newlib_gnu_source,$(USEMODULE)))
endif
ifeq (1,$(USE_NEWLIB_NANO))
export LINKFLAGS += -specs=nano.specs
LINKFLAGS += -specs=nano.specs
endif
export LINKFLAGS += -lc
LINKFLAGS += -lc
# Note on `realpath` vs `abspath`
#

View File

@ -82,13 +82,13 @@ endif
ifneq (,$(filter printf_float,$(USEMODULE)))
ifneq (,$(filter newlib_nano,$(USEMODULE)))
export LINKFLAGS += -u _printf_float
LINKFLAGS += -u _printf_float
endif
endif
ifneq (,$(filter scanf_float,$(USEMODULE)))
ifneq (,$(filter newlib_nano,$(USEMODULE)))
export LINKFLAGS += -u _scanf_float
LINKFLAGS += -u _scanf_float
endif
endif

View File

@ -3,7 +3,7 @@ include ../Makefile.tests_common
USEMODULE += libfixmath-unittests
ifneq (,$(filter native,$(BOARD)))
export LINKFLAGS += -lm
LINKFLAGS += -lm
endif
USEMODULE += printf_float