Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp6225089ybe; Tue, 17 Sep 2019 23:18:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxb5T/m7CZamMhC43BKz8NJ0HX2NSn0BCyPldcM5TXkv7iuY5pWcICdS0uomkBWnyLJqImK X-Received: by 2002:a50:d090:: with SMTP id v16mr8646374edd.176.1568787500864; Tue, 17 Sep 2019 23:18:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568787500; cv=none; d=google.com; s=arc-20160816; b=mBiWk5cgV9d759Co2plBooTai9LlP20hdG+PU8azJWTU7q5rGrYbrnPDE+fxP8BW1n ajgrT4TrRK1Yehx3PhmauG/naXP/oQieR/9f3Oe5Lqe/Da7REn/LS+qLbAZ/DBtlJL6Q fbyCuwvmakgL95lEKx2xrdPDIeG0zYDaJHAPgeiX/cFempbKIwtHOKU+QoISJ4v9sotA IDyFkDGugQWsWYyvp4VPBnxdOTzU5a5rlZrxucev/iQ6jX2Ma5iAZiI41jR9eoKQPcPJ tlhljcG97H9TFGadZMdK9gg0fjuebNbKDumJpJ+DvcCcDGndWxteubfggOUT7ntvCtYH AwLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=0D/XAt0W45n0d0sCLH4jOu6TgQPDUKf8Gz3W2ap8Xqk=; b=kC2XLBRZ5KQqsjAFhHjdnFDK65VpPL/PHm0hbTRC+A1wGl9KbDTOO3YQex20b3FqyE 9eHUHOO+LMPBi/aYYkNmncQhwxpxfP6gt5+lC8/NcwpqhDolGQ+5Pq7eG86W0SgwinTs cah5FCYjZZRJB3sDDoSPHUWGjPoYtv04BKK9XBd6dqaxGx2pyjGJkiGzk4Y5t2FVpGnH S3IZcvIeGu+VcqSQ8Cfezu7f3tDAAK/jT2LcKgZ+8stZ8HHzvAAg3hY6W9Cfhb+IWqt2 /OProdwfx+HVhUr821Sg9OwazcpYPNEoNhVIwaUxI95g4gC3Hynkskqs5pO2hcDKmFHE OWNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=md5DyGBY; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h28si2598153edh.278.2019.09.17.23.17.58; Tue, 17 Sep 2019 23:18:20 -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=@gmail.com header.s=20161025 header.b=md5DyGBY; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727716AbfIRFYK (ORCPT + 99 others); Wed, 18 Sep 2019 01:24:10 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:42601 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727469AbfIRFYJ (ORCPT ); Wed, 18 Sep 2019 01:24:09 -0400 Received: by mail-qt1-f193.google.com with SMTP id g16so7382286qto.9; Tue, 17 Sep 2019 22:24:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0D/XAt0W45n0d0sCLH4jOu6TgQPDUKf8Gz3W2ap8Xqk=; b=md5DyGBYmsmccsOBew/l2Q6acRjFLttTAQalCrDkukcNbMLj9Q/vIMluOb5/NRlZFk mqLG76KH79oR6AH1QaC9NtvOJYZioaELf6BotJHC/Jq+TeCgm+WeniHWRNUGJ1naEr1y 4g3aYvkpzMhb87MNSyAEb2w3arblB9eVpCyDuB/cbESykNrm/ydYYagmBqZdhRvLo0S6 RNrTeDH2+WrmST7Qpq1iLvnumewLdetuldzvVXd4kAaFJrIK20JZnjk1DfTsNdwafwP3 4cFuXMr8spo9fEAmKDt/tZgpKgVedF9pPTUHQ4z5X3ohki1AwL6kpCYDCsODLE2zFgcU Tv4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0D/XAt0W45n0d0sCLH4jOu6TgQPDUKf8Gz3W2ap8Xqk=; b=CVPGek5XeB2LhCrtMt1TKE9DjlLli5L7ilNs8zfuE5sSks3fCjjyJuKIBogPRvB8/l pCISGyuRukGyt07xcHhI9Rs/E5/GfrgPKnxMnaBJMgaisKbeLUs/UkiNbwMFqA/4j7Z5 eIYwsJ4815ixCC4zD9u0Js3RO5LPUBnuR3OYPVaQ+eRC18yL/r1M+8JCgtSKvohQMOWL GP0Tqz8V6rHXxspnBMLGHtUatbyF6wmt37a1WbldJ8C31KoMJtXMgGctNOWTqytRl58b ZMN9yyHcOSaP59LXX88ZDErceaBeILI6IvhYH9o0OKGboNZ3wgauyBcUEnxL/wqO8Xf5 s8TQ== X-Gm-Message-State: APjAAAW4sMiD5UlyZXCl2SWN+KV5CQrGpNDOSNIippuGrqrcxY+IPDNZ sZyHhArOMmunSOLB+IxYOqfrqeHCW7owrVl9cUI= X-Received: by 2002:a0c:e48b:: with SMTP id n11mr1873130qvl.38.1568784248547; Tue, 17 Sep 2019 22:24:08 -0700 (PDT) MIME-Version: 1.0 References: <20190916105433.11404-1-ivan.khoronzhuk@linaro.org> <20190916105433.11404-14-ivan.khoronzhuk@linaro.org> In-Reply-To: <20190916105433.11404-14-ivan.khoronzhuk@linaro.org> From: Andrii Nakryiko Date: Tue, 17 Sep 2019 22:23:57 -0700 Message-ID: Subject: Re: [PATCH v3 bpf-next 13/14] samples: bpf: makefile: add sysroot support To: Ivan Khoronzhuk 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ${}? > +endif > + > EXTRA_CXXFLAGS := $(TPROGS_CFLAGS) > > # options not valid for C++ > -- > 2.17.1 >