From patchwork Mon Sep 16 10:54:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 173826 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp3337886ilq; Mon, 16 Sep 2019 03:55:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/GhS0qEjsaowKu6oNYMevUxoPmA1WuY6Up1XzehvnGwfPA5VKVzUDbCDA5d+vq8WgU57Z X-Received: by 2002:a50:e005:: with SMTP id e5mr60778943edl.279.1568631300566; Mon, 16 Sep 2019 03:55:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568631300; cv=none; d=google.com; s=arc-20160816; b=up5eTlGhZh4BIeQE8HcTon58y2Pm16YyGTa9dzSE1jzUQ1PHM/ikQ5QySYB5k4mBA+ p737yjdFk2FY7OtZlda7aY7zoScECNTpz/tzNWIBfAfmhZJYhl8wQBrRXkEG0BMzDx+I AiC5cmokrK6vkaAf9qFvdfBk34gNVsqKsAAeMpTv63ifhpUuCSMrRNx5GH7tNkxKaLXX 4zEDoxcTLvsadju+A/pdMBysgFgFptt2SfqUi6cxhjp4AdhTiyJXgWe6FNjLEBnFy2gS LlY1vq0h4xAGa+sSvQWj64aQiRP5N0XqlWUsvz2Sgk2ikNKLytMbac9mQM+9FPROLZGz cxPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=9NLfs5AbYJF7ESK5xuIslXoD/IqVsX2Fckqfe1g6VEo=; b=oUbSssBhZfYbYLn4d+kXSMlPEVpDcEv/0hPt9UYRCnVcA7efWmr/Ku5u9PhqL86B62 6mqFIu1k75kttqElyJoZz228Iahxr+JCK7FR3LBj+6TATf3PgEUlHqk6XkyNBw1UeMDs InSolV71034jOYGURHHrtqGU/aU0IrEbWTOZcQjlokUzaX3u3D+YazxcsXhRFtkUYuon jdw6kY+tk3+gblB/QEaASJqoMNKlffvnsPbb8Cu2QImiswNB/sPxP19Q5OaWRl1fN1dM qjku2rHNa5E1rvQjemPKd9jwbB+CQInpv1+iUu1cTf2o0Md6ioKQcqQvLFhIGnXCOlgA 2VFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cgMjU9Vg; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 i24si20524048edj.207.2019.09.16.03.55.00; Mon, 16 Sep 2019 03:55:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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=cgMjU9Vg; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 S1732502AbfIPKy4 (ORCPT + 8 others); Mon, 16 Sep 2019 06:54:56 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:37542 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732536AbfIPKyz (ORCPT ); Mon, 16 Sep 2019 06:54:55 -0400 Received: by mail-lf1-f68.google.com with SMTP id w67so27072530lff.4 for ; Mon, 16 Sep 2019 03:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9NLfs5AbYJF7ESK5xuIslXoD/IqVsX2Fckqfe1g6VEo=; b=cgMjU9VgF66MpK+7cYVgFwTXHUUXY3RP+fbPS5mQhKXJebmvwfYOjylIzcce/vVR2v S+Q2ARJDsEjUmMLBvWPgyIemeej5MAEsmwCTWAXgyiGhlec/IcmFIuHE2w4MGODPMnAL bgDdARhEqXqiXSVKGttt9Ic2kiDIxJTYWpr2QZ7eq3Kq+vb+xaaUiKWqbP9RCl+1FVGm wfSdI25syQcaHAndrFmcwKOMieb7zGLpuNLod/Jgak9EvgP2vCbT3KakYeCI222YAi3Q rIJRdyU1aAK7zl8igzE+e9wcGVBm2kmpvFM6x9RBSAu1gfp0/WZI11dbglu9eIbMMPe8 0n0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9NLfs5AbYJF7ESK5xuIslXoD/IqVsX2Fckqfe1g6VEo=; b=WKtMsMoQvv1Llp9uxNlHHKdgsGeapjLRtj6tK4oeGxjZHJudlomjo2HgbU4YGtfouz 7LF5ksyOW/fs3XpFjVT664dkK3cZWqQir/NGEHxkqtPEYwSEiiprRA+9urLJoeCSKQfB lZE8A9026k+n1e3bJ77kLuEGGOTyz13ZK1rSzArgetcQhWVAjyfTb1hCynLrAPoz3bLS kTCFePCJNiVXNjvHLOSx8JU6ZGoWavUx46ql4cooy4+D7hwktUJkpNNmM0q9JtZ5PCMX C1HuT/eXPU0vZ4vWcNKY0crvn1VTcfFfS2JueFjl7/MYoEyEHpeKGYARJh7MDyrYZdK8 W45A== X-Gm-Message-State: APjAAAXNDAvfdaA7YmOiFadMSkNropt0JXIFq+kAPA95z7wBccnu+jZW ZaeNtTu/hKtEbjvMMgeeSu4+mQ== X-Received: by 2002:ac2:5a19:: with SMTP id q25mr15112277lfn.178.1568631293376; Mon, 16 Sep 2019 03:54:53 -0700 (PDT) Received: from localhost.localdomain (168-200-94-178.pool.ukrtel.net. [178.94.200.168]) by smtp.gmail.com with ESMTPSA id v1sm8987737lfq.89.2019.09.16.03.54.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Sep 2019 03:54:52 -0700 (PDT) From: Ivan Khoronzhuk To: ast@kernel.org, daniel@iogearbox.net, yhs@fb.com, davem@davemloft.net, jakub.kicinski@netronome.com, hawk@kernel.org, john.fastabend@gmail.com Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, clang-built-linux@googlegroups.com, sergei.shtylyov@cogentembedded.com, Ivan Khoronzhuk Subject: [PATCH v3 bpf-next 10/14] samples: bpf: makefile: use target CC environment for HDR_PROBE Date: Mon, 16 Sep 2019 13:54:29 +0300 Message-Id: <20190916105433.11404-11-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190916105433.11404-1-ivan.khoronzhuk@linaro.org> References: <20190916105433.11404-1-ivan.khoronzhuk@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org No need in hacking HOSTCC to be cross-compiler any more, so drop this trick and use target CC for HDR_PROBE. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index b5c87a8b8b51..18ec22e7b444 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -214,15 +214,14 @@ 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=$(notdir $(CROSS_COMPILE:%-=%)) endif # Don't evaluate probes and warnings if we need to run make recursively ifneq ($(src),) HDR_PROBE := $(shell printf "\#include \n struct list_head { int a; }; int main() { return 0; }" | \ - $(HOSTCC) $(KBUILD_HOSTCFLAGS) -x c - -o /dev/null 2>/dev/null && \ - echo okay) + $(CC) $(TPROGS_CFLAGS) $(TPROGS_LDFLAGS) -x c - \ + -o /dev/null 2>/dev/null && echo okay) ifeq ($(HDR_PROBE),) $(warning WARNING: Detected possible issues with include path.)