Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4592637ybe; Mon, 16 Sep 2019 15:06:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzK+SynDqYERyh/Lup/4HJdd4XZOPyrwmx/U4JwtiRlDMrs5H0vHVYXX/rkWtiI8GCC9gWu X-Received: by 2002:aa7:c34b:: with SMTP id j11mr1514417edr.245.1568671596337; Mon, 16 Sep 2019 15:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568671596; cv=none; d=google.com; s=arc-20160816; b=OJKZdOF10gosytmGPzJuWSEx64I9qivpP20x7TRAw/+PiUU1pZOUbPqj+4RRPRAHoD SX6T/FNNCO5Qxrf/44Vb1R2x9PqMinAgN/X8JkrI5RMXKnuvqRbrlzyFLD6cI0MVq1rY 6nZkgkIjaehYTQW8GOihFkQjBSE/i2mK29Yqte3Frxnn0b1P16L2aPtPihBa6dTcwvxS XzrCF7CN/xEj7e7eJbMZCei5a0GyLvh8DSJXhRLoNiY5k4VDiiModYb8CBLVxUN0nok6 xWqfWmgrk9tfPiQJL4JDlWWvGIfNMf/H0JKdIrYNJj23baF+A1jtQQc7m8QwehsaQ42t 0aMQ== 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=C1t82i6X11aZoLXvnOKNwH+tVPB4SBAU5NMbxltAh8Q=; b=T9kkbS3YzI0HxMatWab3wrzl2qx4oSH1YPPr3jiHo3O8W+ViAOciukh6SH2BPJKC08 NSqoFOs1stszuEAPdHfanBJu+BB1kk8e0nyh3Jvd07werfbXovDE1NzJrtmU+3ghDYoq sCFMXd5PNxyYJlPNizLOY0IiG3Udx/FwaMcpQVCUcnX4y67usbIp39+MpPgtssooprN1 ep+OndqfeyT3tHVr7D4vXXcGt+/vmPkxL9tfJKMwUx2+bB35C8OJdMXiJDjJKk1wrtP4 WvRex6mYpAe3jf0HvFoDSgJcbF1LpKiOarovn5+OCpgIFv7v503QGcNH9/PfZlmRmWdA JUAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PPncx+oi; 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 s18si135133ejb.49.2019.09.16.15.06.12; Mon, 16 Sep 2019 15:06:36 -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=PPncx+oi; 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 S2391353AbfIPUZO (ORCPT + 99 others); Mon, 16 Sep 2019 16:25:14 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:41209 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730502AbfIPUZO (ORCPT ); Mon, 16 Sep 2019 16:25:14 -0400 Received: by mail-qt1-f193.google.com with SMTP id x4so1485377qtq.8; Mon, 16 Sep 2019 13:25:13 -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=C1t82i6X11aZoLXvnOKNwH+tVPB4SBAU5NMbxltAh8Q=; b=PPncx+oiRjtvht6VJEZH3QKIN/OO4JtQ0iaLZ7/FLKKvnaCK2XXBARhU6EUqnwXpWJ pkUcBZzvF21P7z5mT9fZ+dSnCZtu4VzJku/YhNjK3hh/9WTvXChJ2TIF7fZjLW3r41x4 gDjyByBCQUpg4XWLHzHn90TbxgFsWRCe1+9mc0Beo8mJjVyTLjpeQKCsg4gcucElWcex wLa4ojoRHLDp0+T4vOvYr1UTdmeal3wgfbziVl2q4OLODbKnzUi1k+geJsUJIZTtFsSn kQPsberfZ6o/yUzTMOF9PHD0cVEUiTZq4cRYiQUGHB9CxlfCJSD/rAfVNhjh2HTOGgPV KbaQ== 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=C1t82i6X11aZoLXvnOKNwH+tVPB4SBAU5NMbxltAh8Q=; b=aF+hC7AowtleHOQc5vTYSTgAfsZYxKFm263MZhdvTxR2gxdeCi0MC+jWOTTKRC19aZ z/R1wuuTjip7RD65ZJXNLGjX19qjvXtIUL0IAFWm1yYRtUSKdeh6SrCPRM20sL7WIa7n loMM1XAuSgfuzpQHpXC9grvMrQSmKpggWe/DBEKEZ+J7OfTLach4Aj1IbmcSa2WioYvJ sgjRggpcg3umYe9fxUf0NE100bvQ79RHCG7/9tllL45CsTChoGXKll0IIPB0EVGH3ElY 4Q0yQbHAWtWIYc5b5707kp5K4+wJrzpdnLqcNQqUgUHx1NRe6uvcmSKeBigXs64D//Ui 21QA== X-Gm-Message-State: APjAAAUHMNqVA0QiQ2CMoJ5Ym8f+LEU8r2ZzimPTOv9uVdzNoaUUzFxJ Bw4bjUB4JQ7R/uh7cwNT+aYgoVTewqW4baIfMwE= X-Received: by 2002:a0c:e48b:: with SMTP id n11mr166604qvl.38.1568665513084; Mon, 16 Sep 2019 13:25:13 -0700 (PDT) MIME-Version: 1.0 References: <20190916105433.11404-1-ivan.khoronzhuk@linaro.org> <20190916105433.11404-4-ivan.khoronzhuk@linaro.org> In-Reply-To: <20190916105433.11404-4-ivan.khoronzhuk@linaro.org> From: Andrii Nakryiko Date: Mon, 16 Sep 2019 13:25:02 -0700 Message-ID: Subject: Re: [PATCH v3 bpf-next 03/14] samples: bpf: makefile: use --target from cross-compile 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:01 AM Ivan Khoronzhuk wrote: > > For cross compiling the target triple can be inherited from > cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile. > So copy-paste this decision from kernel Makefile. > > Signed-off-by: Ivan Khoronzhuk > --- Acked-by: Andrii Nakryiko > samples/bpf/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile > index 43dee90dffa4..b59e77e2250e 100644 > --- a/samples/bpf/Makefile > +++ b/samples/bpf/Makefile > @@ -195,7 +195,7 @@ BTF_PAHOLE ?= pahole > # Detect that we're cross compiling and use the cross compiler > ifdef CROSS_COMPILE > HOSTCC = $(CROSS_COMPILE)gcc > -CLANG_ARCH_ARGS = -target $(ARCH) > +CLANG_ARCH_ARGS = --target=$(notdir $(CROSS_COMPILE:%-=%)) > endif > > # Don't evaluate probes and warnings if we need to run make recursively > -- > 2.17.1 >