Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1553647ybz; Thu, 23 Apr 2020 00:44:00 -0700 (PDT) X-Google-Smtp-Source: APiQypLQxOhK4gBRwQXwLznkNWW9jZhtAplg9oF7xKLW3rC8HaVnx5OClBNnE705aK0Kk89U1JxG X-Received: by 2002:a17:906:5958:: with SMTP id g24mr1698372ejr.58.1587627840118; Thu, 23 Apr 2020 00:44:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587627840; cv=none; d=google.com; s=arc-20160816; b=uafd9nvqHapSuN86Pekxa2tABGxfRd7YXDOc2xhcDg5IuuzT72ayV2XP9CyRuFMu53 GzI6MZzzBRRa4A1CC27yYad3xRG6kN3QpKEh6WibatgVOAEgV7RcBeH8cjyfUcgB7uYc 2ymQW3UVH3zZDYiMuIBFY3gURLBbk+jUD/Qdsb9Nc7g5Hb0Ougbjo3B2rjfkZeKRqBnw aVbYbjOsMHEXtZ2hvN5ceOnnfpvHX2Yj5pheUqc7oAVg8zQ3BhMkeedArtnoV6PdDhqc Mt3g5AAHgf4+K3XmDPXwHPF+p/oM2C5mO95MD8CD4DTkr1lwpBKAo+hbOOel/D4PTfr4 0whQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=mNS7qQakks7vv7rluiZ6sy2TT3u/Yp/y0uXOfjW+ff0=; b=AZHKGQO7luCH3tg8OHQWrXNPyPml5CI8OEEGBBhOS4cQNZ/Wc8UjMjBRjQDv/7ZxwR Ql+RdFpHaojjl5DZFiy/ZmbREpUzzUN4MKTNcGOxd40/F2fjddCVYB4+2aPGo0v9Si+g 6KntHF4V/Ldov2CuUXRoViDAwcSIaeEZSJwOgOvWz90TG/1cEFXRIHG36BlmQs20IJcZ dJFIsvBT12ZUWq3NpQf9+GQB24wGkxAOstcd5HVOVA9+MrQtwCfxjU7KPuNIfwlElw0r eTYVu/EXWpg1R3XCsOFsi2kVqFlXF70biB1lipsHNQ9qdd5tIHRfVmcuH6gu3c2WiVRa YQ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=vgX24GzV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i14si802564ejh.494.2020.04.23.00.43.37; Thu, 23 Apr 2020 00:44:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=vgX24GzV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727776AbgDWHlk (ORCPT + 99 others); Thu, 23 Apr 2020 03:41:40 -0400 Received: from conuserg-10.nifty.com ([210.131.2.77]:33701 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726790AbgDWHlh (ORCPT ); Thu, 23 Apr 2020 03:41:37 -0400 Received: from oscar.flets-west.jp (softbank126090202047.bbtec.net [126.90.202.47]) (authenticated) by conuserg-10.nifty.com with ESMTP id 03N7dV9P000368; Thu, 23 Apr 2020 16:39:36 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com 03N7dV9P000368 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1587627577; bh=mNS7qQakks7vv7rluiZ6sy2TT3u/Yp/y0uXOfjW+ff0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vgX24GzV3a5gSzU8pqBzK0uUPmBoq73gXEZoV5t08/+yMcChrq6uP7MLHhdRwGGPc UWKvR0/hvVQCXVFtYvZMmDoPZQ/cwJ9mDXpvEU300Nv0iI9sU5civP4dV2/hkMVLAd FK3BuYRHjhBFQa1B+oUmnNtjb8ARPuZe15DK2bHR9pfUVqUOIyrDpfQwSS0YaEk3Us q6/fi3DlDwocFmaIOowfh119DbojAG/bzBarEoAk6yIvb/41VnjUiic1yir+KsK4p0 yG0QRj3cc7yMSM3LycQICnWyH8UcXZJq1ixs6BeZA2jNqtJYewteyupK7yviIoCJZc GujOc7Bj6SMyA== X-Nifty-SrcIP: [126.90.202.47] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: bpf@vger.kernel.org, Sam Ravnborg , Masahiro Yamada , Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , "David S. Miller" , Jakub Kicinski , John Fastabend , KP Singh , Martin KaFai Lau , Song Liu , Yonghong Song , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 04/16] net: bpfilter: use 'userprogs' syntax to build bpfilter_umh Date: Thu, 23 Apr 2020 16:39:17 +0900 Message-Id: <20200423073929.127521-5-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200423073929.127521-1-masahiroy@kernel.org> References: <20200423073929.127521-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The user mode helper should be compiled for the same architecture as the kernel. This Makefile reuses the 'hostprogs' syntax by overriding HOSTCC with CC. Now that Kbuild provides the syntax 'userprogs', use it to fix the Makefile mess. Signed-off-by: Masahiro Yamada --- net/bpfilter/Makefile | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/net/bpfilter/Makefile b/net/bpfilter/Makefile index 36580301da70..6ee650c6badb 100644 --- a/net/bpfilter/Makefile +++ b/net/bpfilter/Makefile @@ -3,17 +3,14 @@ # Makefile for the Linux BPFILTER layer. # -hostprogs := bpfilter_umh +userprogs := bpfilter_umh bpfilter_umh-objs := main.o -KBUILD_HOSTCFLAGS += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi -HOSTCC := $(CC) +user-ccflags += -I $(srctree)/tools/include/ -I $(srctree)/tools/include/uapi -ifeq ($(CONFIG_BPFILTER_UMH), y) -# builtin bpfilter_umh should be compiled with -static +# builtin bpfilter_umh should be linked with -static # since rootfs isn't mounted at the time of __init # function is called and do_execv won't find elf interpreter -KBUILD_HOSTLDFLAGS += -static -endif +bpfilter_umh-ldflags += -static $(obj)/bpfilter_umh_blob.o: $(obj)/bpfilter_umh -- 2.25.1