From d82c5884c6164856e830894d9bfacd218d430ba4 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Thu, 19 Oct 2023 18:16:25 +0200 Subject: [PATCH] treewide: make use of new toolchain define 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 --- include/bpf.mk | 2 +- include/cmake.mk | 4 ++-- package/devel/kselftests-bpf/Makefile | 2 +- package/kernel/qca-ssdk/Makefile | 8 +------- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/include/bpf.mk b/include/bpf.mk index ec3f04e1e9..a3357f0e29 100644 --- a/include/bpf.mk +++ b/include/bpf.mk @@ -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 \ diff --git a/include/cmake.mk b/include/cmake.mk index 95870ffdb0..c82ba5f809 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -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) diff --git a/package/devel/kselftests-bpf/Makefile b/package/devel/kselftests-bpf/Makefile index ae845486bd..0a5b874e04 100644 --- a/package/devel/kselftests-bpf/Makefile +++ b/package/devel/kselftests-bpf/Makefile @@ -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 = \ diff --git a/package/kernel/qca-ssdk/Makefile b/package/kernel/qca-ssdk/Makefile index 7420b03803..f8359a98c5 100644 --- a/package/kernel/qca-ssdk/Makefile +++ b/package/kernel/qca-ssdk/Makefile @@ -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) \