Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp625753pxj; Thu, 20 May 2021 18:17:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFHHGo8lzpZ3djoL8qfm7SmI5YJb1qZLDfj1x6xjGsKGf9OORjgmBWVJZJ6SaW1RpwuZnx X-Received: by 2002:a05:6402:883:: with SMTP id e3mr7864965edy.1.1621559827150; Thu, 20 May 2021 18:17:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621559827; cv=none; d=google.com; s=arc-20160816; b=rt4pC4B/OLhHIF6mh0ZeJKEIO2sjrH1eVYqBTrqy+1X7EJDB1TlrsQGJR8GOM6m0rA FppLmbElhkIEkIkeGnMOqcgtyAXqQ/VPXEUIiOLEx3P1oxkLlr4tYwAt/r/fl7r5swcP WIrFcvxCVR/T6S5v2/ep+zxmPtHZzOecMrj8LgKbAej/AYqJXyOuD84eFN6f2sI/AI76 Jtah0fdgegcopCw3W0M8IxvrB/+mcA+knKKrOBQAcFAnnE+xyVblr7D76BtTdSk5p4D+ P0Uc+/ABu5NiyJVkEdIiyzxo7YSNcXBK0a0bAm7wYagoWTiCCYCwxaKxcQjM1AjceiT2 WJdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=M5GQ+h2+DlXOV3zEFFcOQesmJRDZC8wCph6xEvWcGz4=; b=fTDhKWs/gr7e6WX6CMJKY5DAqT6bA05PdPQlSMlDM24eOLQb1S+TdW16zZv0VDZQgW dWIzicxmyUvONbDaobTMXeW5VQWP9IavHRKAz1mxSoDuVr6y6PNF8Hj5UAqNjZwQNQgH 9CzfRqmDAX8z0CO1n9yziqe19kywiWpxPPCEbk5Pmv5cHDFOtiI1MmEq2v/QOlz/pZWn Z3TweiJqqG32ND7KT+ADYIXvHrTSfHWnPLjnozwTG7Dx5teE8FaSBBPOfzBrZL3dvRYY OD2GZU55tsJBmbrsO67BSPkI5hYbjYhktmmzwvIpz9yLmpx4EJa1aC5Qbs/7N6YD+a46 vcTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pFBUOTkI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j19si1284681edj.231.2021.05.20.18.16.40; Thu, 20 May 2021 18:17:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pFBUOTkI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241482AbhETLqE (ORCPT + 99 others); Thu, 20 May 2021 07:46:04 -0400 Received: from mail.kernel.org ([198.145.29.99]:43832 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241475AbhETLYj (ORCPT ); Thu, 20 May 2021 07:24:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 92F256196C; Thu, 20 May 2021 10:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505559; bh=dlOQSC78x4g5c0BLYLlpldav7b47UGfJuU1ricOzpn0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pFBUOTkIj/J3UG4ucpEVgozsfizUog3HwYszQLy0B0Xsexs4bPEqKxRcIrSqbbudw fDS+tdfyylVfLiGq9khP9ZWoDvExAZpRrnKIISFx1k0NHlt5b1EZRtY7KnBtPGpILa tB+unjkX/5yTaGTEOxXVgA0tAPXDEjnIae2skruE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yonghong Song , Alexei Starovoitov , Andrii Nakryiko , Sasha Levin Subject: [PATCH 4.4 146/190] selftests: Set CC to clang in lib.mk if LLVM is set Date: Thu, 20 May 2021 11:23:30 +0200 Message-Id: <20210520092107.011210226@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092102.149300807@linuxfoundation.org> References: <20210520092102.149300807@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yonghong Song [ Upstream commit 26e6dd1072763cd5696b75994c03982dde952ad9 ] selftests/bpf/Makefile includes lib.mk. With the following command make -j60 LLVM=1 LLVM_IAS=1 <=== compile kernel make -j60 -C tools/testing/selftests/bpf LLVM=1 LLVM_IAS=1 V=1 some files are still compiled with gcc. This patch fixed lib.mk issue which sets CC to gcc in all cases. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210413153413.3027426-1-yhs@fb.com Signed-off-by: Sasha Levin --- tools/testing/selftests/lib.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk index 50a93f5f13d6..d8fa6c72b7ca 100644 --- a/tools/testing/selftests/lib.mk +++ b/tools/testing/selftests/lib.mk @@ -1,6 +1,10 @@ # This mimics the top-level Makefile. We do it explicitly here so that this # Makefile can operate with or without the kbuild infrastructure. +ifneq ($(LLVM),) +CC := clang +else CC := $(CROSS_COMPILE)gcc +endif define RUN_TESTS @for TEST in $(TEST_PROGS); do \ -- 2.30.2