Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp558337pxj; Thu, 20 May 2021 16:11:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyrjGrlohLiWvlzOOB4+4sX1u0nuZe6gtDr5/FtxsPLka43nrbRX/k/hWCrpufRWI8ZEZZF X-Received: by 2002:a17:906:54f:: with SMTP id k15mr7237075eja.239.1621552299567; Thu, 20 May 2021 16:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621552299; cv=none; d=google.com; s=arc-20160816; b=BRh2klr7+Ov7ekZmXShaQMtuqfgUNVKjYPCNjMVYduLzqziHuoF3rKlfrLbh94aKF9 PrTLOTZh1UGmHNP7hqCNn5nPNRC3crwXPoeH4WQRDV8h1uNzPKAHJ1Dx3JGqGmzmFJN7 KlOQJIVlY972QUFX5eqiTislguHWiXl5HIG8yTP989QOQNCyGmJrmpZ2K2E+vfoTdE5z I3/XwXPARgZH3A27+YaoWr2wV0fetM3tvfgxho3rdO/8+izw73mhH8Z8OW5zfJoudxVK MJCahy4P8ZxWO4BsF2UHhDhf3DI7xtrqlKEiTsrAFcp+5aVbhAbdALSHGTvKnNxYOin/ a1EQ== 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=pGlHfpF63BiWFJeLYw/qKOGCKlq/gt0JG1faB1kyEqpxlS97ys514dnvEfpcJPDdGS TecXgghezY6Or3w8fZRJDyVNGCPSrj2sfDHpTF6m7Of5ApRoMG6IRmn0h1rKKVjEVnOh 7ToxNRPpB7L9aFYXN+whwU1hrnI+p1joMxriJN4Zcmh43kLhSFFF1OxfZKvSEob3g/u7 5DoPoDUXFJDrYWmYcmepE751mo0ukCHmiI3G6rlKSj5aBXGQL+6BkHkiA8xMCFBsLQ8G sn9xgAZNt4YBiazFGusIvvv3CaWW+d/krOTy/vm27kp/WriinI4C6Goy+W5evOZdoBEU 9azQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yOhiehat; 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 19si3604015ejx.529.2021.05.20.16.11.16; Thu, 20 May 2021 16:11:39 -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=yOhiehat; 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 S240782AbhETLXX (ORCPT + 99 others); Thu, 20 May 2021 07:23:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:58014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239209AbhETLC3 (ORCPT ); Thu, 20 May 2021 07:02:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9CD9361921; Thu, 20 May 2021 10:04:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505047; bh=dlOQSC78x4g5c0BLYLlpldav7b47UGfJuU1ricOzpn0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yOhiehatl6LT1EmdmAf1nodHbhsyVox4VbQ9miIGTJe/ONdr+s9DuVKcdln5E+hWd usX/+yatURw/CLWb++VFmyxEdaZQgiQsHT/Wy75UxM+TPv1zi7GQt5O9bkn2NWqpE9 KZRF69fQBxUS4zv9ol56R4czXkbwdCPsfgiK8ky4= 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.9 181/240] selftests: Set CC to clang in lib.mk if LLVM is set Date: Thu, 20 May 2021 11:22:53 +0200 Message-Id: <20210520092114.739311943@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092108.587553970@linuxfoundation.org> References: <20210520092108.587553970@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