Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6751631ybe; Wed, 18 Sep 2019 08:27:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKH27N7hlNn6dUMfzAPfePAA36hnCH1TQcUVTbnW9/HK5arMiweEjWOKTGqC1WSQr32KFd X-Received: by 2002:a17:907:20e4:: with SMTP id rh4mr9986261ejb.59.1568820478142; Wed, 18 Sep 2019 08:27:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568820478; cv=none; d=google.com; s=arc-20160816; b=BhgqPC68ar0fWXVYgrjmKuwD6I5PT4Wn3oZ+BYi/OA9tO757KE0QDd6bw93kh+WarQ 7aHEeBYpGyJaG8PWUmlHH/395v+2SCIo5a+rIyW64qOa9pUeuCAwYC1ie/PLr4NXXyxb Jpj3u5fJ5TU22MQHmJS31eCCezu6KEWtwo8G0VE9+GVrsnBEQn/b5sxsJbRqA5bn4Me2 H0diOrPCujGREjgPLW6fo2xOUJp15EWcmztHajV8vuSR2jnurap9wyK1lqLMmP+AW1R6 s4tCPp+3e1BNivQt2aKx3DvHutxWuwf2g5IJtTXLKcFUNhMgXBZXtDbWoPrvJ2ZqC4lY OgQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dkim-signature; bh=v6VDBivAx2Q88SjA44gfOPe9NoEO8jXXz9c7wXdVcf8=; b=kYixF5QoaiT4b9vj3IhMibkBit2xZyh4pmwjPAHrhdGMuFn942TbiFkFJyo7k6Em8i ZfA1fULl4pnsKLwJg44p1CQKFrnOqGfmtO8hr6X/1SEb9yVNXRWBxuIVlXXEYES8u3Ch V/30zKZWajH5RGwnSzIdePmVtQTdObMsh1LJ55hkxUEoeu63Yu7Wh6DSDZXVTAVw3Hx9 ujkbqyMO55Fw0n0qH927DeKWkuqEyvb1nWPBfG1vuwprTy1B+Gi76zze/hcJfQ8MPSeW /CPmN4V6mhfNoc9XuXdOSWPyLyu/Lfn92IEo6UWvjWES4Xq2Rz20/HQvLqeutVlkYoEV 9ttQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tCVX5aZD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f43si3916819edf.422.2019.09.18.08.27.34; Wed, 18 Sep 2019 08:27:58 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=tCVX5aZD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729833AbfIRLJR (ORCPT + 99 others); Wed, 18 Sep 2019 07:09:17 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:46508 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbfIRLJP (ORCPT ); Wed, 18 Sep 2019 07:09:15 -0400 Received: by mail-lj1-f196.google.com with SMTP id e17so6717509ljf.13 for ; Wed, 18 Sep 2019 04:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=v6VDBivAx2Q88SjA44gfOPe9NoEO8jXXz9c7wXdVcf8=; b=tCVX5aZD3vnvAHSrP6KOImKf10EnxZ5PUxXqH8CtrK+nKWLM/4ASeJiwnRor2JUp9M ordOe7ZTyDQo7RCvgs+2/YXL+8J8UxBvCuIFEzKmaMu45QayOHaqjSBF937/7ctpskSL SMgexpzILYXSH6sJwZ0wsBRDIDClNqbEZVpQFrWC05tHycojsHMNgegYYvPoUp4/2/ET 4kVne/wulUTxfVG8J+qaeGy0YYGDlnnDZiPhq0yWJfydeD4EamDvP6SGTvPM6JxyS0qo PeqxnWX2STWki4P7QYkPFYFd7wL2TtxhQVB621Ux3JL+vYqrOBlWnxkJztBZBXZPwgvq R4GQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=v6VDBivAx2Q88SjA44gfOPe9NoEO8jXXz9c7wXdVcf8=; b=UyBUyVd72iHVxgGmWz58+QjtVTFUfTpKy9v4TDqoUwCbL5ySMgCDAPZL6XhaB9Touk LC9UU8t4Bs0ryvKKd81YGBp2uhauLcmWm0w32ry/zbD73sRU7u5zI+SWIgTqF5q5hYEh cdWWmaqvjNDKDWvmVyr56DhHd9ExFozgGitsKS/aOgG//r39axQqqApWnQ3irXmFObQf 78PTbSvcvV3hsx+g5Srh+QWUttCg5x5ens4h9OhZac1bYF8l4kB6032O5dpe3/FxewBL JJEGdJL1663czUkz7qCS6ruApxQjZsHJL35wPylD+ENoKD0aixkZwTxgZeUjXm8RUg7n T85Q== X-Gm-Message-State: APjAAAXs6JvuHuhi97RWxMrWHaSWXd3btvVeUbVGfwR/SzMAa7Q0WLUB YoFq4PnCpuKH6QjFyFN/mTylrg== X-Received: by 2002:a2e:9241:: with SMTP id v1mr1903624ljg.148.1568804951532; Wed, 18 Sep 2019 04:09:11 -0700 (PDT) Received: from khorivan (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id y13sm970049ljd.51.2019.09.18.04.09.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Sep 2019 04:09:10 -0700 (PDT) Date: Wed, 18 Sep 2019 14:09:08 +0300 From: Ivan Khoronzhuk To: Andrii Nakryiko Cc: Alexei Starovoitov , Daniel Borkmann , Yonghong Song , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , john fastabend , open list , Networking , bpf , clang-built-linux@googlegroups.com, sergei.shtylyov@cogentembedded.com Subject: Re: [PATCH v3 bpf-next 13/14] samples: bpf: makefile: add sysroot support Message-ID: <20190918110907.GE2908@khorivan> Mail-Followup-To: Andrii Nakryiko , Alexei Starovoitov , Daniel Borkmann , Yonghong Song , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , john fastabend , open list , Networking , bpf , clang-built-linux@googlegroups.com, sergei.shtylyov@cogentembedded.com References: <20190916105433.11404-1-ivan.khoronzhuk@linaro.org> <20190916105433.11404-14-ivan.khoronzhuk@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 17, 2019 at 10:23:57PM -0700, Andrii Nakryiko wrote: >On Mon, Sep 16, 2019 at 4:00 AM Ivan Khoronzhuk > wrote: >> >> Basically it only enables that was added by previous couple fixes. >> Sysroot contains correct libs installed and its headers ofc. Useful > >Please, let's not use unnecessary abbreviations/slang. "Of course" is >not too long and is a proper English, let's stick to it. > >> when working with NFC or virtual machine. >> >> Usage: >> >> 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 >> --- >> samples/bpf/Makefile | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile >> index 133123d4c7d7..57ddf055d6c3 100644 >> --- a/samples/bpf/Makefile >> +++ b/samples/bpf/Makefile >> @@ -194,6 +194,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 > >Please stay consistent: $() instead of ${}? Yes, thanks. > >> +endif >> + >> EXTRA_CXXFLAGS := $(TPROGS_CFLAGS) >> >> # options not valid for C++ >> -- >> 2.17.1 >> -- Regards, Ivan Khoronzhuk