Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2908605ybe; Sun, 8 Sep 2019 03:18:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZOa0TjlaBr6Y821eWtpJQKI8QC0+vIN+2NRfPjMMw396s2oz5hQlk714iyOupIkUzfN+2 X-Received: by 2002:a17:90a:617:: with SMTP id j23mr1913515pjj.130.1567937898200; Sun, 08 Sep 2019 03:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567937898; cv=none; d=google.com; s=arc-20160816; b=vWgIaOKBu0SCiYngs3A7HA/UX6NJ+TIdi2Hr1n+Of4guu712ax7Y64rp4YaZhSVLJg RalMCQEMLhPtoZgWU2ce8Hwz7H5J0e6ngoXjAIK/0uRk9CgFOU4j+jXFoKlRndKWkvoI R4lf1GfmftfsweIiXekWD4NsXpYYnP7NouSP8m/YB+NlGKFRBeYBuDGREazpgAmb8YfR PXrxQ4cRV8360xxWsuJsa3zNoJw0D9oLRZoEJcnrS5S+m2yT9BtghypsaXdRL0Xs3tsf yFMLqa2jRi7t7Y+MrFSR3D/4/DQrUbhDdbnRR2QN3LQPR6dtnT/E8NuTe9TwfuFbsQRH fE1Q== 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=LMaOt4FuyGYZ6GmxTEoNOWFTUVjVfbek7WmSRfSN6/o=; b=rge+/MGBFGr2kIAyPzBWjo5nAbfrLjvt8Do71vJ8E1GtY3/gTXSLQqdHAfj8nrd+oq hez7zowYfqmj2Y9Y2ia+3gJqF803y5ex+A+q4rTirQ0t0ek+jif88Kl0J8tboMQi/5vS hSPDbDWJdS6Ebd+wb05uLjgmhQLZhpaM2pMXnahVaaw2wIldft46Z+edMV8HgrJrNkmy FaNd8AWs0TeemPNEhGWd+q3IDguVkFwgirL5RxuDcKJMTGBr8YIj/YF2vJ7WerR/aw8x FK9OSix7WOxPFj0zgU6CWHiByMFCBdz4hhM4ENmEhi7jnO5ti2USDmhZC6AmDe3aU6Ar WXsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K0DVaUnO; 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 bc10si8955898plb.171.2019.09.08.03.18.03; Sun, 08 Sep 2019 03:18:18 -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=K0DVaUnO; 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 S2391398AbfIGATQ (ORCPT + 99 others); Fri, 6 Sep 2019 20:19:16 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:35113 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729121AbfIGATP (ORCPT ); Fri, 6 Sep 2019 20:19:15 -0400 Received: by mail-lf1-f68.google.com with SMTP id w6so6434498lfl.2 for ; Fri, 06 Sep 2019 17:19:14 -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=LMaOt4FuyGYZ6GmxTEoNOWFTUVjVfbek7WmSRfSN6/o=; b=K0DVaUnOkxgz+BKGM7Jmk5fFVihMqVmZ8hXXahLcWXcTRqMO4z4Fisuh4jSp+34lCI q3BxgPAm8qSgHy06TwfpR6TuhCPUBUgumdtMFFCzQC4Izg0n3WRU6McD42+kqdaiJhcM oUEZQcFUUG+F4oQWXMZh1jwL2SJ57qEaMSNjtH07rVPPJxrM3Bf0BSm4BoCGo5ooz3fw hGEMjhXT2x5q7uWChN33cEQR0+0IkbQFCW18gDg81qIQikzQjr+WASiocZ9cVeMnUhq1 lwKjnr6PATu0XJ4NFeiYu0LBkXAuzLU3bKsd1fz7cwguDepfSUXPTtnuWQmpxHLiYTGO xWYA== 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=LMaOt4FuyGYZ6GmxTEoNOWFTUVjVfbek7WmSRfSN6/o=; b=tnq8oRs9TYC/lfG57e4XsMKUB0yQrAW9OwmzaQYryS8Tbp8c4zIiP+9yIj142NQnm2 2YQ7LgWH1u2mphXiPZa/7HNCOxHfggrvVb3AyBzYs+oAzdVZ0lenIljD3TzDp6+/2bpg GlZzX2bCI6Gghq24FYbEP70o3ZeHSJALODr7vakdrsNSxWrr5F3tcf5CsOYSdS4Mex9Z 6+hPkpR4t5I/anVNGzeHjWLEniLnk2qMGgm7QgbiEcuItAYVG2fYdfnyeos0CXJ1Vl6f SezneONhOGRdmz0vwh1Cd4v8cE+fiUSsIA19LuLCNNvQ3cWZZFm9XACDRr9QgZnX0KiH 7DLA== X-Gm-Message-State: APjAAAV7kp8AJ70RxuWcs1HPr8IPilmwlyb3WydoJroRtkRd3OVtKwwb jiY0eo7oJAr5BQMG1G2OtHiB5Q== X-Received: by 2002:a19:117:: with SMTP id 23mr8278563lfb.115.1567815553302; Fri, 06 Sep 2019 17:19:13 -0700 (PDT) Received: from khorivan (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id i65sm1138129lji.16.2019.09.06.17.19.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Sep 2019 17:19:12 -0700 (PDT) Date: Sat, 7 Sep 2019 03:19:10 +0300 From: Ivan Khoronzhuk To: Alexei Starovoitov Cc: Alexei Starovoitov , Daniel Borkmann , Yonghong Song , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , LKML , Network Development , bpf , Clang-Built-Linux ML Subject: Re: [PATCH bpf-next 2/8] samples: bpf: Makefile: remove target for native build Message-ID: <20190907001909.GB3053@khorivan> Mail-Followup-To: Alexei Starovoitov , Alexei Starovoitov , Daniel Borkmann , Yonghong Song , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , LKML , Network Development , bpf , Clang-Built-Linux ML References: <20190904212212.13052-1-ivan.khoronzhuk@linaro.org> <20190904212212.13052-3-ivan.khoronzhuk@linaro.org> <20190906233138.4d4fqdnlbikemhau@ast-mbp.dhcp.thefacebook.com> <20190906235207.GA3053@khorivan> 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 Fri, Sep 06, 2019 at 05:04:08PM -0700, Alexei Starovoitov wrote: >On Fri, Sep 6, 2019 at 4:52 PM Ivan Khoronzhuk > wrote: >> >> On Fri, Sep 06, 2019 at 04:31:39PM -0700, Alexei Starovoitov wrote: >> >On Thu, Sep 05, 2019 at 12:22:06AM +0300, Ivan Khoronzhuk wrote: >> >> No need to set --target for native build, at least for arm, the >> >> default target will be used anyway. In case of arm, for at least >> >> clang 5 - 10 it causes error like: >> >> >> >> clang: warning: unknown platform, assuming -mfloat-abi=soft >> >> LLVM ERROR: Unsupported calling convention >> >> make[2]: *** [/home/root/snapshot/samples/bpf/Makefile:299: >> >> /home/root/snapshot/samples/bpf/sockex1_kern.o] Error 1 >> >> >> >> Only set to real triple helps: --target=arm-linux-gnueabihf >> >> or just drop the target key to use default one. Decision to just >> >> drop it and thus default target will be used (wich is native), >> >> looks better. >> >> >> >> Signed-off-by: Ivan Khoronzhuk >> >> --- >> >> samples/bpf/Makefile | 2 -- >> >> 1 file changed, 2 deletions(-) >> >> >> >> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile >> >> index 61b7394b811e..a2953357927e 100644 >> >> --- a/samples/bpf/Makefile >> >> +++ b/samples/bpf/Makefile >> >> @@ -197,8 +197,6 @@ BTF_PAHOLE ?= pahole >> >> ifdef CROSS_COMPILE >> >> HOSTCC = $(CROSS_COMPILE)gcc >> >> CLANG_ARCH_ARGS = --target=$(notdir $(CROSS_COMPILE:%-=%)) >> >> -else >> >> -CLANG_ARCH_ARGS = -target $(ARCH) >> >> endif >> > >> >I don't follow here. >> >Didn't you introduce this bug in patch 1 and now fixing it in patch 2? >> > >> >> It looks like but that's not true. >> Previous patch adds target only for cross compiling, >> before the patch the target was used for both, cross compiling and w/o cc. >> >> This patch removes target only for native build (it's not cross compiling). >> >> By fact, it's two separate significant changes. > >How so? >before first patch CLANG_ARCH_ARGS is only used under CROSS_COMPILE. >After the first patch CLANG_ARCH_ARGS is now suddenly defined w/o CROSS_COMPILE >and second patch brings it to the state before first patch. Oh sorry ), messed with my local exp with target bpf, after rebase, even forgot that's mine. Will drop it, with removing "else" for previous patch. -- Regards, Ivan Khoronzhuk