Message ID | 20191011002808.28206-15-ivan.khoronzhuk@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp41651ill; Thu, 10 Oct 2019 17:28:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTgccLcxkKvkHvH+AF3u3L8URAql3ub9i/bX8AOVDlLTCVKw5tnJUzhr3qr80jGEdKVqVd X-Received: by 2002:a50:ed84:: with SMTP id h4mr10616621edr.124.1570753725482; Thu, 10 Oct 2019 17:28:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570753725; cv=none; d=google.com; s=arc-20160816; b=QdXWc64EYSHBPq6XIPA3sUJDSA2zXi3h+cpvZnQxkjjMrtZ3701JKWgjVXKoPz1x4/ RcucG1u8B506OIF0ypSgH3IRBXcIhPomleBoxl2GfkNSngzNS37GwxC8RtWCWt+iz9Hn E/9D9qg34rWzEYsjldxoKvC6veBtI5BQTO5wN9udWt9Se5/h8FJWzd+SzAlcR/wkXqIN WmgaXjDOvAVt5+YGoFyHbXIqrvyVOb3emoeQMCxA3f4Uh11uRvbvjWsJ/YVs7DLrfqQO os+eQlL5gPz2tjDs54GPsDVK0K6AgOJtvGO21K0wTrUCz2v+bSvBKBXBBD6RYI9qXXJX H3SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=ZSbYJ+tLtfDuMSVqb7LwJbRD3u314/MfD3p1keHf2Mw=; b=OpS2tV5f+v/wVr6CecLyi4YwlMHhoFQLfseJXn0bZ0Dl95+LAEDscotvY5w+LKUnKI +UHdmRnto2GnrV/6eR2sQCerjwqltIptq8yjcoe7fyXYYpV+8I2E6ibhlYHvkEJCPElw YGibDjE7WJ2a0HyMr8xUtw33naxV2o7KIi6PmTyeIFCW6dm9iW1ZrY+QHXhtr4pNt6qi he+Ob421DWjHozq0j6Nxl8zY3BEbulYgqcT+0gC4atyDaoB+uzXHehyTKyXhpmRLhNlz HHBR+pUKeRpcnNXXeiru97pW5eytG14ylGkVvpw6AT/mdk/31puJgLOdyGCqJRpQ7AuW sFzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YEWRAAeP; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <netdev-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y50si4737688edd.237.2019.10.10.17.28.45; Thu, 10 Oct 2019 17:28:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YEWRAAeP; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727833AbfJKA2o (ORCPT <rfc822;dan.rue@linaro.org> + 8 others); Thu, 10 Oct 2019 20:28:44 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:42486 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727810AbfJKA2n (ORCPT <rfc822;netdev@vger.kernel.org>); Thu, 10 Oct 2019 20:28:43 -0400 Received: by mail-lf1-f68.google.com with SMTP id c195so5710143lfg.9 for <netdev@vger.kernel.org>; Thu, 10 Oct 2019 17:28:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZSbYJ+tLtfDuMSVqb7LwJbRD3u314/MfD3p1keHf2Mw=; b=YEWRAAeP4o9HHLefGfaSlerG740LF6GtTrZy66djivNZSPXT2LBKGX5D/yhlmqrqM+ L34Z9JhgWajti0FN3n8kYiabDXezUUK4PqM1gd8sR+MKr0ChD9NupqJwZmQTj7twHTdF dHgGXTZ2cHg7b/c8pXz6c8Enr6iA/I+lnsC3C+lrCF+LHqDLQy7x2dRHtJsVOrbqDS3j daeTThbrpUYNT9YcwYABSYd1h1z/INp//Dh+VQW26ASB/eSFZvjaRl4W3m3yBL3cMnJp udb+u8gkI9g3tPg+Jv5fVOQHAUlMKfUTubwdRuExHcN3URxlHoKGRLzwD696KoEF6F1M 4HBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZSbYJ+tLtfDuMSVqb7LwJbRD3u314/MfD3p1keHf2Mw=; b=a/I22XVOK+UZ88CTDn1FLz7XPoHzLAZwHly9diqHlcMCCI6R8r7VxlNASZdHK2EMR9 cQyO4bmhRGSb6cyQrM8fumjKj94xx11Xn52sNqJmVsqbQBsZkvWxpY6UcPQVS4eeGkw6 LZPs3jlKy/rcCfmoH/xCYYeTB2Mkn1VP6ZXH5TrYq1qTp/T/oH/Np2Lju4FBaxpwZWBJ 3GLV8iD7VSwJ1LVXnATShWs/xY+lmsEoOgCp0OL6n9qWOTHJdVVAvcQiJRAj+o/V1h8K 4QdXFjsowsHbffdDklOXLYBvPVM78K+LphE3SVBSUIHXpX9aKTlKmwzpL4sv0CMB0/Kh TxOg== X-Gm-Message-State: APjAAAV+3/TpbAm5N+MFC8soFsnHlTeSOmn81f4ROwmlWlkdPRqiDeya SgPkNv86luX7LmvqoA++TrMQvw== X-Received: by 2002:ac2:5468:: with SMTP id e8mr7357520lfn.12.1570753719752; Thu, 10 Oct 2019 17:28:39 -0700 (PDT) Received: from localhost.localdomain (88-201-94-178.pool.ukrtel.net. [178.94.201.88]) by smtp.gmail.com with ESMTPSA id 126sm2367010lfh.45.2019.10.10.17.28.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 17:28:39 -0700 (PDT) From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> To: ast@kernel.org, daniel@iogearbox.net, yhs@fb.com, davem@davemloft.net, jakub.kicinski@netronome.com, hawk@kernel.org, john.fastabend@gmail.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, clang-built-linux@googlegroups.com, ilias.apalodimas@linaro.org, sergei.shtylyov@cogentembedded.com, Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Subject: [PATCH v5 bpf-next 14/15] samples/bpf: add sysroot support Date: Fri, 11 Oct 2019 03:28:07 +0300 Message-Id: <20191011002808.28206-15-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191011002808.28206-1-ivan.khoronzhuk@linaro.org> References: <20191011002808.28206-1-ivan.khoronzhuk@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@vger.kernel.org |
Series |
samples: bpf: improve/fix cross-compilation
|
expand
|
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 6b161326ac67..4df11ddb9c75 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -187,6 +187,11 @@ TPROGS_CFLAGS += -I$(srctree)/tools/lib/ TPROGS_CFLAGS += -I$(srctree)/tools/include TPROGS_CFLAGS += -I$(srctree)/tools/perf +ifdef SYSROOT +TPROGS_CFLAGS += --sysroot=$(SYSROOT) +TPROGS_LDFLAGS := -L$(SYSROOT)/usr/lib +endif + TPROGCFLAGS_bpf_load.o += -Wno-unused-variable TPROGS_LDLIBS += $(LIBBPF) -lelf
Basically it only enables that was added by previous couple fixes. Sysroot contains correct libs installed and its headers. Useful when working with NFC or virtual machine. Usage example: clean (on demand) make ARCH=arm -C samples/bpf clean make ARCH=arm -C tools clean make ARCH=arm clean configure and install headers: make ARCH=arm defconfig make ARCH=arm headers_install build samples/bpf: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- samples/bpf/ \ SYSROOT="path/to/sysroot" Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> --- samples/bpf/Makefile | 5 +++++ 1 file changed, 5 insertions(+) -- 2.17.1