From patchwork Fri Oct 11 00:28:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 175895 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp41951ill; Thu, 10 Oct 2019 17:29:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmlVAqlWVhkqllzDsd6griKY48eff6qLvz6kYntiLNWomgbcUD97jT+aLZhKKUPhvqm8XP X-Received: by 2002:a05:6402:12ca:: with SMTP id k10mr10871442edx.91.1570753750772; Thu, 10 Oct 2019 17:29:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570753750; cv=none; d=google.com; s=arc-20160816; b=CZA4KCc/xamvacJBn4YFm1VaFuPhAMe36gjAEH6bbXKl88uGjh5ySbDeYHu52hbTzh eXR9ksVDMU7Xdl6CvEv3CINMZnNQcQu0j+Xn37enp6UdfyWfT6yUBiDiMp1sqRM6sePt 4rTzLKMuQVSPfGYPIk64n8ptIqA1XxKfyWlxKR62rLqRquAU/ET0HjFiLbgVDTWCAfOK OYj7sc5UNIlvV8+iFpZLiG47sbYtWlgl6ULJfF1JtZDpi/Q8axMwRQnhApUtXPoL5VwM sW/vNuo3ghQ29IpuZzZ5x7vuRd1ZLg4Vpjb9mVRpLVVEQ+3DqNhpkmN0oa59M4UIPAhR eTzg== 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=wbL2nu6acnton90gIbsX5qxq9tLlNkmN4RUryN8fm7M=; b=SPSTjmmbrE0fi5o04kLFEHRiZ4AYHdET/n6s4jSW7RW6RoxFAR5mcPLyHOhR35xrcH 28HMhg3aWOmitlk0wPxPAi7SCTyLVrVnX5gWhxfANiXkD0d+1FRqLsfiREbHBUHWHfan mRdb9VhLkfT4Sr5jmp2sTu77h9IPFt0TpPXxQLaiJRUodvBHBxA+4w8oxO0QVfGgjI3m wQcDN3n0gMox3Gayfp4nDQR+QBU3CJdDgeKLRJRbCWCaiF22OAua0uhq9UwoKyD86EbV EUiJufWSeu7cfc+WIZIV25RLXDAKDK5VuD/14pqe2mUguxV762j+3S5o7rn0bd+2SHmC Ao5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KZ4g7bs4; 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 q13si4316695eju.46.2019.10.10.17.29.10; Thu, 10 Oct 2019 17:29:10 -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=KZ4g7bs4; 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 S1727913AbfJKA3G (ORCPT + 22 others); Thu, 10 Oct 2019 20:29:06 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:38076 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727731AbfJKA2h (ORCPT ); Thu, 10 Oct 2019 20:28:37 -0400 Received: by mail-lj1-f196.google.com with SMTP id b20so8033543ljj.5 for ; Thu, 10 Oct 2019 17:28:35 -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=wbL2nu6acnton90gIbsX5qxq9tLlNkmN4RUryN8fm7M=; b=KZ4g7bs4fOSGzk9FRyjF0hoqEh7hKsbUdY26yluEIfz8HrbcVogNxnuyoe/hxPcvfY TkU3hAUOhkLrtq5AzSARGyoZtpIAwa6YiJutpgj2IfhDFd7rccQbQb6TXAJO3UHkSoTS KVLv4z+Y+wn1/bGde0X3XLQCzqxwzgrKWEYXuOOv5w100VI2wuVg8Z1pJWKOOw2QGMIu xAD92jGqtR5FbkoIFvEdmTYUmuUV51K4APESpxgabNPn1RethPshg4jMreKr/ZBPFC6Z mKPdfQ4ukG2GmYFcT5pC+tXxG/DwLE1KaehHzD/wBCkNIFKCnOdDqIYiyjJkoVevysU6 FEtw== 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=wbL2nu6acnton90gIbsX5qxq9tLlNkmN4RUryN8fm7M=; b=Z9u/qxDhqulgJYEhEtLbx7KvmYuKqGcb6Qs2Kf3pAcusjexfFsuE4n1fjTbIQc8lWQ OG8dpu4fSjJJMeMLH2YAdTMN04H0B05kQ5HS/5gBM3NhOoUNYArLxQF2a1PZKGzzh38e SPuDizg4zsG8E3sL4R7AGjpp11yXYRWQT75IUuQbG7aBVDJs+CRTCqBBLm+KFU7eNiC2 qkLVqvks05fGL9am7SmyCYORHhw9MgjXUeJnf+AkS+XR2qEeZhBvc3PatzPdU4WS6HiL f8INVDR4y8ZTeyytoxYsLaOo8FnJji0OQ0xijWc1i8Qczu+PlePCoiz4F7PrtN77Ej4V z4cQ== X-Gm-Message-State: APjAAAVTZUapbbf+XRz8JKYMsRj3rpHUs/+7WHntbwqrsoBVdZjXvCUJ /9GGdsNNi4VVxZ9hx3YBNn/pDg== X-Received: by 2002:a2e:89c4:: with SMTP id c4mr7438097ljk.65.1570753714541; Thu, 10 Oct 2019 17:28:34 -0700 (PDT) Received: from localhost.localdomain (88-201-94-178.pool.ukrtel.net. [178.94.201.88]) by smtp.gmail.com with ESMTPSA id 126sm2367010lfh.45.2019.10.10.17.28.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2019 17:28:33 -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, ilias.apalodimas@linaro.org, sergei.shtylyov@cogentembedded.com, Ivan Khoronzhuk Subject: [PATCH v5 bpf-next 10/15] samples/bpf: use target CC environment for HDR_PROBE Date: Fri, 11 Oct 2019 03:28:03 +0300 Message-Id: <20191011002808.28206-11-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191011002808.28206-1-ivan.khoronzhuk@linaro.org> References: <20191011002808.28206-1-ivan.khoronzhuk@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. Acked-by: Andrii Nakryiko 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 57a15ff938a6..a6c33496e8ca 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -205,15 +205,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.)