From patchwork Sun Nov 12 06:51:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Elliott Mitchell X-Patchwork-Id: 1863978 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=2uHqL5/D; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SVQk05RCRz1yR8 for ; Wed, 15 Nov 2023 12:36:24 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:To:Subject:Date:From: References:In-Reply-To:Message-Id:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1LChQhuwB3SEocYYWZUUUqDjB58KZjSMuodtxgWW5As=; b=2uHqL5/DAp28Ei Y/fIH6kPycaJU6Z0AQVeM2d2Rwx8LIXf/CDtxGmiA87Nuzj248+5/75r4p8VgRjl+biYZpOhQeecd Ia/13GDiuUzRp2fBD8zNycfnWv2T6j6pS7rWAB1KncdfJLd1OOx9k/pUDWK9uPpyVN2nkAZ78MdmZ QB8EpDm9uczT0PZ6AbQuj5V1TFtuPQenlHmXwiCNCbAIBRouIoHB+zHFQ1fxbWGkRT521hvM+ixpp GSlYAowCMpOnbxp6L2Q7nCIAEvwkwBZUfV0SllNyd+97yJEfWZBaUx3BDflEP9sKAVJvFPet8GVS3 dGgwzhR+vY2a97A+nZlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r34o4-00H9qM-2i; Wed, 15 Nov 2023 01:35:04 +0000 Received: from mailhost.m5p.com ([74.104.188.4]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r34o2-00H9p4-0C for openwrt-devel@lists.openwrt.org; Wed, 15 Nov 2023 01:35:03 +0000 Received: from m5p.com (mailhost.m5p.com [IPv6:2001:470:1f07:15ff:0:0:0:f7]) by mailhost.m5p.com (8.17.1/8.15.2) with ESMTPS id 3AF1YseG088882 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Tue, 14 Nov 2023 20:35:00 -0500 (EST) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.17.1/8.15.2/Submit) id 3AF1Ysg9088881; Tue, 14 Nov 2023 17:34:54 -0800 (PST) (envelope-from ehem) Message-Id: <5dd3fcc01db31ad1f27f044551340dcb2e0de91e.1700010293.git.ehem+openwrt@m5p.com> In-Reply-To: References: From: Elliott Mitchell Date: Sat, 11 Nov 2023 22:51:08 -0800 Subject: [PATCH 13/20] [WIP] build: point user_headers at $(LINUX_OBJ_DIR) To: openwrt-devel@lists.openwrt.org X-Spam-Status: No, score=0.0 required=10.0 tests=KHOP_HELO_FCRDNS autolearn=unavailable autolearn_force=no version=4.0.0 X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-14) on mattapan.m5p.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231114_173502_256675_68702F73 X-CRM114-Status: UNSURE ( 8.92 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: These may be regenerated with every build. As such they seem appropriate for the object directory, rather than source. Signed-off-by: Elliott Mitchell --- include/kernel-defaults.mk | 6 +++--- package/devel/strace/Makefile | 2 +- package/network/config/swconfig/Makefile | 2 +- package/network/ut [...] Content analysis details: (-0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org These may be regenerated with every build. As such they seem appropriate for the object directory, rather than source. Signed-off-by: Elliott Mitchell --- include/kernel-defaults.mk | 6 +++--- package/devel/strace/Makefile | 2 +- package/network/config/swconfig/Makefile | 2 +- package/network/utils/iptables/Makefile | 8 ++++---- package/network/utils/linux-atm/Makefile | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 0b421d2cc3..10cd83712a 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -35,8 +35,8 @@ else rmdir $(LINUX_DIR); \ fi ln -s $(CONFIG_EXTERNAL_KERNEL_TREE) $(LINUX_DIR) - if [ -d $(LINUX_DIR)/user_headers ]; then \ - rm -rf $(LINUX_DIR)/user_headers; \ + if [ -d $(LINUX_OBJ_DIR)/user_headers ]; then \ + rm -rf $(LINUX_OBJ_DIR)/user_headers; \ fi endef endif @@ -111,7 +111,7 @@ define Kernel/Configure/Default cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \ cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \ } - $(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) $(if $(findstring uml,$(BOARD)),ARCH=$(ARCH)) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install + $(_SINGLE) [ -d $(LINUX_OBJ_DIR)/user_headers ] || $(KERNEL_MAKE) $(if $(findstring uml,$(BOARD)),ARCH=$(ARCH)) INSTALL_HDR_PATH=$(LINUX_OBJ_DIR)/user_headers headers_install grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | $(MKHASH) md5 > $(LINUX_DIR)/.vermagic endef diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile index 3343177c3e..fa5e5c0492 100644 --- a/package/devel/strace/Makefile +++ b/package/devel/strace/Makefile @@ -31,7 +31,7 @@ PKG_CONFIG_DEPENDS := \ include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk -HOST_CFLAGS += -I$(LINUX_DIR)/user_headers/include +HOST_CFLAGS += -I$(LINUX_OBJ_DIR)/user_headers/include CONFIGURE_VARS+= \ LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \ diff --git a/package/network/config/swconfig/Makefile b/package/network/config/swconfig/Makefile index 6549075e5c..69f795ce1e 100644 --- a/package/network/config/swconfig/Makefile +++ b/package/network/config/swconfig/Makefile @@ -30,7 +30,7 @@ TARGET_CPPFLAGS := \ -I$(STAGING_DIR)/usr/include/libnl-tiny \ -I$(PKG_BUILD_DIR) \ $(TARGET_CPPFLAGS) \ - -I$(LINUX_DIR)/user_headers/include + -I$(LINUX_OBJ_DIR)/user_headers/include define Build/Compile CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile index 45a2b49070..f9e8d619fa 100644 --- a/package/network/utils/iptables/Makefile +++ b/package/network/utils/iptables/Makefile @@ -586,19 +586,19 @@ endef TARGET_CPPFLAGS := \ -I$(PKG_BUILD_DIR)/include \ - -I$(LINUX_DIR)/user_headers/include \ + -I$(LINUX_OBJ_DIR)/user_headers/include \ $(TARGET_CPPFLAGS) TARGET_CFLAGS += \ -I$(PKG_BUILD_DIR)/include \ - -I$(LINUX_DIR)/user_headers/include \ + -I$(LINUX_OBJ_DIR)/user_headers/include \ -DNO_LEGACY CONFIGURE_ARGS += \ --enable-shared \ --enable-static \ --enable-devel \ - --with-kernel="$(LINUX_DIR)/user_headers" \ + --with-kernel="$(LINUX_OBJ_DIR)/user_headers" \ --with-xtlibdir=/usr/lib/iptables \ --with-xt-lock-name=/var/run/xtables.lock \ $(if $(CONFIG_IPTABLES_CONNLABEL),,--disable-connlabel) \ @@ -607,7 +607,7 @@ CONFIGURE_ARGS += \ MAKE_FLAGS := \ $(TARGET_CONFIGURE_OPTS) \ COPT_FLAGS="$(TARGET_CFLAGS)" \ - KERNEL_DIR="$(LINUX_DIR)/user_headers/" PREFIX=/usr \ + KERNEL_DIR="$(LINUX_OBJ_DIR)/user_headers/" PREFIX=/usr \ KBUILD_OUTPUT="$(LINUX_DIR)" \ BUILTIN_MODULES="$(patsubst ip6t_%,%,$(patsubst ipt_%,%,$(patsubst xt_%,%,$(IPT_BUILTIN) $(IPT_CONNTRACK-m) $(IPT_NAT-m))))" diff --git a/package/network/utils/linux-atm/Makefile b/package/network/utils/linux-atm/Makefile index 43f4b6556b..0bed1d6e6d 100644 --- a/package/network/utils/linux-atm/Makefile +++ b/package/network/utils/linux-atm/Makefile @@ -99,7 +99,7 @@ endef $(foreach t,$(ATM_DEBUG_TOOLS),$(eval $(call GenAtmPlugin,atm-$(t),$(t)))) -TARGET_CFLAGS += -I$(LINUX_DIR)/user_headers/include +TARGET_CFLAGS += -I$(LINUX_OBJ_DIR)/user_headers/include define Build/Configure $(call Build/Configure/Default)