From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 537A9C4CECD for ; Mon, 16 Sep 2019 20:25:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 29FFB20830 for ; Mon, 16 Sep 2019 20:25:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="PPncx+oi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732735AbfIPUZO (ORCPT ); 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-Google-Smtp-Source: APXvYqxu+ci+i8bh13T9ReN3PfZ/8LKTC1ABrELo9BhvKuAV3JrhwLwUEB2Yv9J0BS4SaIcxktwx9mnyI3UZu7hmXz8= 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: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@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 >