Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp423946pxj; Thu, 20 May 2021 12:30:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJGSSGSb4xxwQyhP1QWaKJUe3r7CM0PUCKCJhsNfxxzeDbajLKDVZ+6qWzxjaF0dbs9AyP X-Received: by 2002:a6b:f212:: with SMTP id q18mr7340817ioh.131.1621539059259; Thu, 20 May 2021 12:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621539059; cv=none; d=google.com; s=arc-20160816; b=uST6cmjTwp3f9UjZRVqAsQRLdlme9/HA7qyLHC+Kh+yOc2o5/tdEdg5OMDwjMQkGtS eZHFhNWGgbeIkCnaIHN4ju0WTR8sXpGKNqo5aVaqn7U1G4XBLeTlAlE0jCalKAQxI1V4 aCjd95dEmNJdeT1sAbhJE8buUO50dF0QK54LmHkRgZY5fLhUC0GF4yIoT4jewXrRXQBd FDLeLWajr8m1G3dXaQb18aRzHaP2EBx3UTBzIFOAh18X9kGH0V1G9b8jdcusjOSD1WoG 1et2XT9tg69IUchCBr2zm8GJKGziAaF3OCwpyvhN6egPEi+xcF9bcT9K2+JcyW6AB00X kqPg== 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=myjPHz1cIIAPLYU7kDpSVEjeLyTq60chzhAJ3DxkU6o=; b=w+lUmWgJDqgIIPXyI+Y3cpm69tVMOagTz+EimhDg/TgsD4GsoPdcPrgkZ34NDFw86u Wcm2dz2Etx5OS85DCQdAgoLZlYpLAUgNugLsgPZGOPX8glbDse9yVVBOBxnrsgsZyzQl ooiX0wInqfpPYh1R31/hSlsVoBy9J97pcpeZ/0vt4mzHsw+7n6OpFvfDwkhlbMLqlWI5 dZmA3hkyWpU6EzVmshXWUHM01bOVgCBC/BzeDWUThCDwMXJLx6NdzO8tcioXNGS1jv+v KzOfpINHAIcQZ4esc+8s+BFYjYylOd1hzCJ9Rl+Cg7kUi4fp5Aa42gflqGxmhG4+c0NP 0WIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PWtcatc4; 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 s18si2116254ilp.146.2021.05.20.12.30.46; Thu, 20 May 2021 12:30:59 -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=PWtcatc4; 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 S239456AbhETKzB (ORCPT + 99 others); Thu, 20 May 2021 06:55:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:39828 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238168AbhETKjh (ORCPT ); Thu, 20 May 2021 06:39:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 60DDC613B5; Thu, 20 May 2021 09:55:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504516; bh=QGMqD8dIv+f5R3J76pjOD8Uwh0xJEEeZcgaKVPRINyA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PWtcatc4yb09IgFMiMfbfGiBhrbFQ6hUUpbdXFr/HmEFOWyG+HiwBkJjCBvaqBc7B UsxqVe/ppaav6k8sCN13CwSyKJ9iEEY1IsvyZ8xLSvMCGXzKNo9RU5i9s2QcEqcUX1 Fk1Gnc1URMBsZh27bTgNBnf9g8SVc7HDNQhOwwL4= 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.14 247/323] selftests: Set CC to clang in lib.mk if LLVM is set Date: Thu, 20 May 2021 11:22:19 +0200 Message-Id: <20210520092128.655922806@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@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 c9be64dc681d..cd3034602ea5 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)) OUTPUT := $(shell pwd) -- 2.30.2