treewide: make use of new toolchain define
authorChristian Marangi <ansuelsmth@gmail.com>
Thu, 19 Oct 2023 16:16:25 +0000 (18:16 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Fri, 20 Oct 2023 14:13:56 +0000 (16:13 +0200)
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 <ansuelsmth@gmail.com>
include/bpf.mk
include/cmake.mk
package/devel/kselftests-bpf/Makefile
package/kernel/qca-ssdk/Makefile

index ec3f04e1e9e16994df99738751d84ec21ad64868..a3357f0e297f08b88b54c120d7f8298c731ac82c 100644 (file)
@@ -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 \
index 95870ffdb0f7058c3ca8599831278ae2a563df1c..c82ba5f8099c2987f996cfdfc0d18695724e0cb7 100644 (file)
@@ -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
@@ -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)
index ae845486bd45d7bb1860e85f585f472ff6aee7f9..0a5b874e04db7d7d6b76d4b62d28b6b7b8407ce6 100644 (file)
@@ -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 = \
index 7420b0380373198a86b9ea709cde14550f802d7d..f8359a98c56bdf152a4e2b558806b0e03a5dd65b 100644 (file)
@@ -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) \