Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp310196pxj; Tue, 18 May 2021 04:04:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmQnUPl3K3zp137xBX4D817/qd0thJ0fTKdVRjja2vCfGTHRwC+ygc9ToAi2nShBjszuAU X-Received: by 2002:a17:906:1305:: with SMTP id w5mr5362861ejb.404.1621335851148; Tue, 18 May 2021 04:04:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621335851; cv=none; d=google.com; s=arc-20160816; b=I9Emk6Une3Ytu/nj7jU4G9nD+3JXebx6AygLCu1Lrf24ZQ57Uuu7OcL0FbjEGryAI+ 2xcsXdoE/lMzbO4DDtSPuHFcphYzJ9Zr9LWjM+cwtg9MMJH4vfUvK8pxgCJi3/L40d7i z37TrsYgpXPEzbyxWh0u6m5ibXzQKvCNGMrWbXV7V11t30rQLVa3nSC3GYlJZ+qNWl49 wt/iTr4wgJKiTxmvRnFI9Qfa3g4hDOss4ISVtS5GA95Kajf1cIBIjUdcpbdGs/eO0Sr0 Xb45EwRyQdChYosPoSaWWifNWfSaY+X7AQAwQf3smapDpNe95bViwHISYRxcjMgiW2/Q jz4g== 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=B+VsfG3eGrXUN+sJ2j/1fQg50OTna/88orkuT/jNdg0=; b=dJo1ZdZ6r9RY2CZi0rSsUJWtVx6j+YotiERzaaqOQzYACaw+gbATVm2GdFkVAIB9Cr H3Ugs14z84G5nw1FGo3jJZFCYe84sMq2keeNAIWEmdiRx6JNFFNq43ydTrwD7YHkQTIA 6OB0i2rKsgW6FLtLk0XO0VEbltS94Q+PX9AlIB0S0TjbGpH4mdCDwwKISrLtagHgCv1A WwkDji8Nm1LwGX1b+0xrs6exr1GxAHFGAnKrTuFemZ5aL4JZ/NaOaFyZudWTRCac0Xcu vHk244+rymfkMgbdeb99GfPdkl5hs/kHx/wkQ/+BXaygS8cuKiCETOy6B7Mn6bvYLrZC TT9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oqXWu5Sk; 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 b13si10475822edt.321.2021.05.18.04.03.47; Tue, 18 May 2021 04:04:11 -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=oqXWu5Sk; 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 S243214AbhEQPQd (ORCPT + 99 others); Mon, 17 May 2021 11:16:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:46480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242175AbhEQPG3 (ORCPT ); Mon, 17 May 2021 11:06:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7609F61C1E; Mon, 17 May 2021 14:29:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621261745; bh=9wFV1yLqUD2lVj7naTAbKoTxesfC7PP0RjjNEj9qpS4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oqXWu5Skulqx57AFx2scviWm2QcOeHz2/c1LTZQdHFXLywJ1aYCZqnJFs1MNLK6n+ EVwPwvvpfSsXvDH1KeJRJNxypxwvlRFYbMWRSvSOQAE1xq7lQplVnVqeE6N6dUaY0S AavR1xneQiX0TLmbTGtvWlCKXgoMISFlgznKlMYg= 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 5.10 060/289] selftests: Set CC to clang in lib.mk if LLVM is set Date: Mon, 17 May 2021 15:59:45 +0200 Message-Id: <20210517140307.221168554@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210517140305.140529752@linuxfoundation.org> References: <20210517140305.140529752@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 be17462fe146..0af84ad48aa7 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 ifeq (0,$(MAKELEVEL)) ifeq ($(OUTPUT),) -- 2.30.2