Skip to content

Commit

Permalink
treewide: make use of new toolchain define
Browse files Browse the repository at this point in the history
Make use of new toolchain define. TOOLCHAIN_DIR should be used only for
toolchain related packages and for everything else TOOLCHAIN_ROOT_DIR
and other define should be used instead.

Switch to new entry where possible.

Signed-off-by: Christian Marangi <[email protected]>
  • Loading branch information
Ansuel committed Oct 20, 2023
1 parent 987458c commit d82c588
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion include/bpf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ BPF_TARGET:=bpf$(if $(CONFIG_BIG_ENDIAN),eb,el)
BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers

BPF_KERNEL_INCLUDE := \
-nostdinc -isystem $(TOOLCHAIN_DIR)/include \
-nostdinc -isystem $(TOOLCHAIN_INC_DIRS) \
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include \
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/asm/mach-generic \
-I$(BPF_HEADERS_DIR)/arch/$(BPF_KARCH)/include/generated \
Expand Down
4 changes: 2 additions & 2 deletions include/cmake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ HOST_CMAKE_BINARY_DIR = $(HOST_BUILD_DIR)$(if $(CMAKE_BINARY_SUBDIR),/$(CMAKE_BI
MAKE_PATH = $(firstword $(CMAKE_BINARY_SUBDIR) .)

ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
cmake_tool=$(TOOLCHAIN_DIR)/bin/$(1)
cmake_tool=$(firstword $(TOOLCHAIN_BIN_DIRS))/$(1)
else
cmake_tool=$(shell command -v $(1))
endif
Expand All @@ -49,7 +49,7 @@ CMAKE_AR:=$(call cmake_tool,$(TARGET_AR))
CMAKE_NM:=$(call cmake_tool,$(TARGET_NM))
CMAKE_RANLIB:=$(call cmake_tool,$(TARGET_RANLIB))

CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_TOOLCHAIN),;$(CONFIG_TOOLCHAIN_ROOT))
CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_ROOT_DIR)
CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR)/host;$(STAGING_DIR_HOSTPKG);$(STAGING_DIR_HOST)
CMAKE_SHARED_LDFLAGS:=-Wl,-Bsymbolic-functions
CMAKE_HOST_INSTALL_PREFIX = $(HOST_BUILD_PREFIX)
Expand Down
2 changes: 1 addition & 1 deletion package/devel/kselftests-bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ MAKE_VARS = \
CROSS_COMPILE="$(TARGET_CROSS)" \
SAN_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
LDLIBS="$(TARGET_LDFLAGS)" \
TOOLCHAIN_INCLUDE="$(TOOLCHAIN_DIR)/include" \
TOOLCHAIN_INCLUDE="$(TOOLCHAIN_INC_DIRS)" \
VMLINUX_BTF="$(LINUX_DIR)/vmlinux"

MAKE_FLAGS = \
Expand Down
8 changes: 1 addition & 7 deletions package/kernel/qca-ssdk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,11 @@ endef

GCC_VERSION=$(shell echo "$(CONFIG_GCC_VERSION)" | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')

ifdef CONFIG_TOOLCHAIN_BIN_PATH
TOOLCHAIN_BIN_PATH=$(CONFIG_TOOLCHAIN_BIN_PATH)
else
TOOLCHAIN_BIN_PATH=$(TOOLCHAIN_DIR)/bin
endif

LNX_CONFIG_OPTS = LNX_MAKEOPTS='$(KERNEL_MAKEOPTS)' MODULE_TYPE=KSLIB modules

MAKE_FLAGS+= \
TARGET_NAME=$(CONFIG_TARGET_NAME) \
TOOL_PATH=$(TOOLCHAIN_BIN_PATH) \
TOOL_PATH=$(firstword $(TOOLCHAIN_BIN_DIRS)) \
SYS_PATH=$(LINUX_DIR) \
TOOLPREFIX=$(TARGET_CROSS) \
KVER=$(LINUX_VERSION) \
Expand Down

0 comments on commit d82c588

Please sign in to comment.