1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

makefiles/toolchain: don't export all variables

There are already exported globally in vars.inc.mk
This commit is contained in:
Alexandre Abadie 2020-06-10 18:54:14 +02:00
parent cdacdd79e6
commit 080d5caa17
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
3 changed files with 39 additions and 39 deletions

View File

@ -1,6 +1,6 @@
include $(RIOTMAKE)/toolchain/gnu.inc.mk include $(RIOTMAKE)/toolchain/gnu.inc.mk
export CC = $(PREFIX)afl-gcc CC = $(PREFIX)afl-gcc
export CXX = $(PREFIX)afl-g++ CXX = $(PREFIX)afl-g++
export LINK = $(PREFIX)afl-gcc LINK = $(PREFIX)afl-gcc
export LINKXX = $(PREFIX)afl-g++ LINKXX = $(PREFIX)afl-g++

View File

@ -1,26 +1,26 @@
export CC = $(PREFIX)gcc CC = $(PREFIX)gcc
export CXX = $(PREFIX)g++ CXX = $(PREFIX)g++
export CCAS ?= $(CC) CCAS ?= $(CC)
ifeq ($(LTO),1) ifeq ($(LTO),1)
export AR = $(PREFIX)gcc-ar AR = $(PREFIX)gcc-ar
export RANLIB = $(PREFIX)gcc-ranlib RANLIB = $(PREFIX)gcc-ranlib
else else
export AR = $(PREFIX)ar AR = $(PREFIX)ar
export RANLIB = $(PREFIX)ranlib RANLIB = $(PREFIX)ranlib
endif endif
export AS = $(PREFIX)as AS = $(PREFIX)as
export NM = $(PREFIX)nm NM = $(PREFIX)nm
export LINK = $(PREFIX)gcc LINK = $(PREFIX)gcc
export LINKXX = $(PREFIX)g++ LINKXX = $(PREFIX)g++
export SIZE = $(PREFIX)size SIZE = $(PREFIX)size
_OBJCOPY := $(shell command -v $(PREFIX)objcopy || command -v gobjcopy || command -v objcopy) _OBJCOPY := $(shell command -v $(PREFIX)objcopy || command -v gobjcopy || command -v objcopy)
export OBJCOPY ?= $(_OBJCOPY) OBJCOPY ?= $(_OBJCOPY)
ifeq ($(OBJCOPY),) ifeq ($(OBJCOPY),)
$(warning objcopy not found. Hex file will not be created.) $(warning objcopy not found. Hex file will not be created.)
export OBJCOPY = true OBJCOPY = true
endif endif
# Default to the native (g)objdump, helps when using toolchain from docker # Default to the native (g)objdump, helps when using toolchain from docker
_OBJDUMP := $(or $(shell command -v $(PREFIX)objdump || command -v gobjdump),objdump) _OBJDUMP := $(or $(shell command -v $(PREFIX)objdump || command -v gobjdump),objdump)
export OBJDUMP ?= $(_OBJDUMP) OBJDUMP ?= $(_OBJDUMP)
# We use GDB for debugging # We use GDB for debugging
include $(RIOTMAKE)/tools/gdb.inc.mk include $(RIOTMAKE)/tools/gdb.inc.mk

View File

@ -1,35 +1,35 @@
export LLVMPREFIX ?= llvm- LLVMPREFIX ?= llvm-
# Apple XCode doesn't prefix its tools with llvm-, but manually installed LLVM # Apple XCode doesn't prefix its tools with llvm-, but manually installed LLVM
# on OSX might have the llvm- prefix, we can't simply test against uname -s. # on OSX might have the llvm- prefix, we can't simply test against uname -s.
# Test if llvm-ar exists # Test if llvm-ar exists
ifeq (,$(shell command -v $(LLVMPREFIX)ar 2>/dev/null)) ifeq (,$(shell command -v $(LLVMPREFIX)ar 2>/dev/null))
# fall back to system tools # fall back to system tools
export LLVMPREFIX := LLVMPREFIX :=
endif endif
export CC = clang CC = clang
export CXX = clang++ CXX = clang++
export CCAS ?= $(CC) CCAS ?= $(CC)
export AS = $(LLVMPREFIX)as AS = $(LLVMPREFIX)as
export AR = $(LLVMPREFIX)ar AR = $(LLVMPREFIX)ar
export NM = $(LLVMPREFIX)nm NM = $(LLVMPREFIX)nm
# LLVM does have a linker, however, it is not entirely # LLVM does have a linker, however, it is not entirely
# compatible with GCC. For instance spec files as used in # compatible with GCC. For instance spec files as used in
# `makefiles/libc/newlib.mk` are not supported. Therefore # `makefiles/libc/newlib.mk` are not supported. Therefore
# we just use GCC for now. # we just use GCC for now.
export LINK = $(PREFIX)gcc LINK = $(PREFIX)gcc
export LINKXX = $(PREFIX)g++ LINKXX = $(PREFIX)g++
# objcopy does not have a clear substitute in LLVM, use GNU binutils # objcopy does not have a clear substitute in LLVM, use GNU binutils
#export OBJCOPY = $(LLVMPREFIX)objcopy # OBJCOPY = $(LLVMPREFIX)objcopy
_OBJCOPY := $(shell command -v $(PREFIX)objcopy || command -v gobjcopy || command -v objcopy) _OBJCOPY := $(shell command -v $(PREFIX)objcopy || command -v gobjcopy || command -v objcopy)
export OBJCOPY ?= $(_OBJCOPY) OBJCOPY ?= $(_OBJCOPY)
ifeq ($(OBJCOPY),) ifeq ($(OBJCOPY),)
$(warning objcopy not found. Hex file will not be created.) $(warning objcopy not found. Hex file will not be created.)
export OBJCOPY = true OBJCOPY = true
endif endif
# Default to the native (g)objdump, helps when using toolchain from docker # Default to the native (g)objdump, helps when using toolchain from docker
_OBJDUMP := $(or $(shell command -v $(LLVMPREFIX)objdump || command -v gobjdump),objdump) _OBJDUMP := $(or $(shell command -v $(LLVMPREFIX)objdump || command -v gobjdump),objdump)
export OBJDUMP ?= $(_OBJDUMP) OBJDUMP ?= $(_OBJDUMP)
export SIZE = $(LLVMPREFIX)size SIZE = $(LLVMPREFIX)size
# LLVM lacks a binutils strip tool as well... # LLVM lacks a binutils strip tool as well...
#export STRIP = $(LLVMPREFIX)strip #export STRIP = $(LLVMPREFIX)strip
# We use GDB for debugging for now, maybe LLDB will be supported in the future. # We use GDB for debugging for now, maybe LLDB will be supported in the future.