diff mbox series

[15/20,WIP] package: update packages with explicit make flags

Message ID f5cd6591cf56383bde0abecd19f502b86ffa9639.1700010293.git.ehem+openwrt@m5p.com
State Not Applicable
Delegated to: Petr Štetiar
Headers show
Series Kernel build fixups, split object directory off (partial WIP) | expand

Commit Message

Elliott Mitchell Nov. 12, 2023, 6:51 a.m. UTC
Identifying which variable to substitute in appropriate places is a
bit interesting here.  Since these set their own make flags, they
need to reference both.

Signed-off-by: Elliott Mitchell <ehem+openwrt@m5p.com>
---
I'm less than certain about perf.  I *hope* this matches the
requirements, but I'm worried about the comment.
---
 package/devel/perf/Makefile      | 4 ++--
 package/kernel/mac80211/Makefile | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile
index 31881c0136..f5290805fc 100644
--- a/package/devel/perf/Makefile
+++ b/package/devel/perf/Makefile
@@ -19,7 +19,7 @@  PKG_FLAGS:=nonshared
 
 # Perf's makefile and headers are not relocatable and must be built from the
 # Linux sources directory
-PKG_BUILD_DIR:=$(LINUX_DIR)/tools/perf-$(TARGET_DIR_NAME)
+PKG_BUILD_DIR:=$(LINUX_OBJ_DIR)/tools/perf-$(TARGET_DIR_NAME)
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/nls.mk
@@ -70,7 +70,7 @@  MAKE_FLAGS = \
 define Build/Compile
 	+$(MAKE_FLAGS) $(MAKE) $(PKG_JOBS) \
 		--no-print-directory \
-		-C $(LINUX_DIR)/tools/perf
+		-C $(LINUX_SRC_DIR)/tools/perf
 endef
 
 define Package/perf/install
diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index d5e3171f94..e735040530 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -274,9 +274,9 @@  ifeq ($(BUILD_VARIANT),smallbuffers)
 endif
 
 MAKE_OPTS:= \
-	$(subst -C $(LINUX_DIR),-C "$(PKG_BUILD_DIR)",$(KERNEL_MAKEOPTS)) \
+	$(subst -C $(LINUX_SRC_DIR),-C "$(PKG_BUILD_DIR)",$(KERNEL_MAKEOPTS)) \
 	EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS) $(C_DEFINES)" \
-	KLIB_BUILD="$(LINUX_DIR)" \
+	KLIB_BUILD="$(LINUX_OBJ_DIR)" \
 	MODPROBE=true \
 	KLIB=$(TARGET_MODULES_DIR) \
 	KERNEL_SUBLEVEL=$(lastword $(subst ., ,$(KERNEL_PATCHVER))) \