Received: by 10.223.176.46 with SMTP id f43csp20366wra; Thu, 25 Jan 2018 16:41:09 -0800 (PST) X-Google-Smtp-Source: AH8x225doe08ydEchkC/FLgOEv8IBPz7dxDygmdkue5yZfnOnRalpZuvdTTdHpJDKLgUwSR01aaW X-Received: by 10.99.161.26 with SMTP id b26mr5414168pgf.322.1516927269719; Thu, 25 Jan 2018 16:41:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516927269; cv=none; d=google.com; s=arc-20160816; b=FObVS8b04G+VZdgoqVlxfX/hk8gVB8SASjUyfuDYDnFIwTGlxA6Z0E9Ii+SfTl3atK S7L+yUYS9wbSzLEKnJUqpahhtn1eeYvh/yr4+yMl4dA03D7HeEDI5ecXoaDxj79aUr1z usJNLcA4vN7OeY9FMUICvZculpOx3sXo1BVuKBgMYfj8qSGwXr12iodlhSi1/aeCRpN6 pIJIQBW1Ok7naXyJ/q7e7Z5K0lfqZ9LjxPGEuRvNZ9t20GPjlONKSvhERmnuWPByrOYi NMU3MM3NCFnqEQMOq93OVVrXl/2cX6hygKP5d5pMFjihp7cPEydJ+xvfjcqZLShbO4Pj At9A== 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 :message-id:date:subject:cc:to:from:arc-authentication-results; bh=U7RglF7dInB8aKpWxCqVVzEf5Qui7yfUujODQTlRhKU=; b=XmH0vvHhAhos9MlDxAhjKVDMGsSfAkWt9qPGK0IP2akQg4IJ8F4ZOrElMvE8+oT4K2 Fl88jnZUDw9lEULV+mzDt5pQgJjJUcw+I4ZGYsoKEcJvBLlaFQep9uYfEyazJ9PPbYes K44gl7annWnbT6ZKM72rUNUJxb+gp7D5ZNMd0LQlpDheSD3il9F4YW1TBL4CxtVmJ3ik Am4sBzTqWuAWUwCHRXW4Svz2S9/8F2Vdq77BSnuJ5Bbf7rh9T6tdP+x8JkvCfeFQWdC1 Q+uQ3lFkiv5D4N/okzNRs6Gfc2tuhhFAr84tyS7JnO2YFuWwRDFoGzjDanxDgyjvI6fu iBfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h10si2222506pgs.458.2018.01.25.16.40.54; Thu, 25 Jan 2018 16:41:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751906AbeAZAkA (ORCPT + 99 others); Thu, 25 Jan 2018 19:40:00 -0500 Received: from smtp-sh2.infomaniak.ch ([128.65.195.6]:48764 "EHLO smtp-sh2.infomaniak.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751547AbeAZAj5 (ORCPT ); Thu, 25 Jan 2018 19:39:57 -0500 Received: from smtp7.infomaniak.ch (smtp7.infomaniak.ch [83.166.132.30]) by smtp-sh.infomaniak.ch (8.14.5/8.14.5) with ESMTP id w0Q0dYBN022554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 26 Jan 2018 01:39:34 +0100 Received: from localhost (ns3096276.ip-94-23-54.eu [94.23.54.103]) (authenticated bits=0) by smtp7.infomaniak.ch (8.14.5/8.14.5) with ESMTP id w0Q0dWbE049963; Fri, 26 Jan 2018 01:39:33 +0100 From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Alexei Starovoitov , Daniel Borkmann , "David S . Miller" , netdev@vger.kernel.org Subject: [PATCH net-next v1] samples/bpf: Partially fixes the bpf.o build Date: Fri, 26 Jan 2018 01:39:30 +0100 Message-Id: <20180126003930.10573-1-mic@digikod.net> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Antivirus: Dr.Web (R) for Unix mail servers drweb plugin ver.6.0.2.8 X-Antivirus-Code: 0x100000 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Do not build lib/bpf/bpf.o with this Makefile but use the one from the library directory. This avoid making a buggy bpf.o file (e.g. missing symbols). This patch is useful if some code (e.g. Landlock tests) needs both the bpf.o (from tools/lib/bpf) and the bpf_load.o (from samples/bpf). Signed-off-by: Mickaël Salaün Cc: Alexei Starovoitov Cc: Daniel Borkmann --- This is not a complet fix because the call to multi_depend with $(host-cmulti) from scripts/Makefile.host force the build of bpf.o anyway. I'm not sure how to completely avoid this automatic build though. --- samples/bpf/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 7f61a3d57fa7..64335bb94f9f 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -201,13 +201,16 @@ CLANG_ARCH_ARGS = -target $(ARCH) endif # Trick to allow make to be run from this directory -all: +all: $(LIBBPF) $(MAKE) -C ../../ $(CURDIR)/ clean: $(MAKE) -C ../../ M=$(CURDIR) clean @rm -f *~ +$(LIBBPF): FORCE + $(MAKE) -C $(dir $@) $(notdir $@) + $(obj)/syscall_nrs.s: $(src)/syscall_nrs.c $(call if_changed_dep,cc_s_c) -- 2.15.1