Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp979193pxb; Wed, 3 Mar 2021 23:18:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzlGfUXC/hHA0Y7tZYtThpvIKvmLWL1QTzgtrhQRcsv9+3Wizob58+qfin/wcGEF3sAmjeJ X-Received: by 2002:a17:906:cecc:: with SMTP id si12mr2710953ejb.461.1614842317463; Wed, 03 Mar 2021 23:18:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614842317; cv=none; d=google.com; s=arc-20160816; b=Y3/WraUNathOTZdt7Sw9HgFzOJjAhx8ocJH2oHQskqVtvI2m4El5GDXB1IAaolHg37 qm4h/Tqk66quxLAo3WztYUwhUIxICcaLRAkD4n+k/+UEGFmsyDbkjWJpENLJwPb0jLk7 AiNphbpGqsKQ/TeddO1HWUfgN3l7Tu05KyNtSCcbvU+p0XFP/76vBJ51Qh2a/AM0fzEe SH9N39fyp+21oS+/Puhx06uM5Tk0s8Hlai1ozSMrvzYuy3+zrpno5Uj/HKr0SJ1YUI2i Ujl0heBILeKjHUB+HdFuPe1TTdZGcVyRTE7laY8DrfhX8c228fXySK+frdqdeY9PV/Jh ywng== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=evWSKmygKMqPj4lgidbiqq2oDqOuEpss9eTZ53glFjs=; b=BTHvnOJ87ttEuaX8siia1YWjyo1gOU3m7oodK74tQD9tJWmz4AG4ST8JuS6uO9opgr xoQ54mHyY+HQJsoG0E/U4E90YfHUeN6K0Bfb1myPbx+NDM2DoKATbHUe2XDnepg1XYfD VR53YudsfkM3LEIJsEH2nQ0FMvFqlXVBpRNPfWR8/vz2EPsHJ5a6fQ7DGcZfGLDZC8J3 B4g0lg+4/e7NEsdFJW3h7LQyf7CDYcps2lkNF+4sYluPtV2eluMonkEriQaVVyG5LWzt 9LsguAJmNsGyvhMg/A4YaJJBIYZ9rDzzaBOLsr4XvsXXmKeCgbD8LwYs+QPWOat7JRJv 09WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aSncCNNa; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jg13si17189330ejc.616.2021.03.03.23.18.13; Wed, 03 Mar 2021 23:18:37 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=aSncCNNa; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2360402AbhCBWUG (ORCPT + 99 others); Tue, 2 Mar 2021 17:20:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:36554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1448121AbhCBVHt (ORCPT ); Tue, 2 Mar 2021 16:07:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0078F64F21; Tue, 2 Mar 2021 21:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614719228; bh=kO8DfkWWn8yJyBWkrJ8uGc4QnsuaOIDHHPdOvD5JeW4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aSncCNNaLdk307eMDzS91kz/dO8BB50d+1ffmwITyoSBQOgxtYbGPkxPHi8o+O/W3 09QiRD0vjRa8NNXVGdZdrZ7PDLsUQR+m5Aw8w9I+ynfIR7ErnwzkmG6wLrYrIF88Oc wDCvTd4uFXCbd8j8m4iZQ+SZHf/nYbpIVx3wW1Xq7MWVWlPLq750+ukhdTndRAvAfH ZFYLhBv/4NRNehjYEqFPvSYe6A81OLbXwihh7MYxWY4BBTQgfTjSoetlVQ+Kiq3ctZ s1APws0lg2lBVOeKKctgV8B+FBipATUzkqGO2BQCV72sv3XO4wF40bCbAHzQ63vDyE 6+rNEfLNqkUFA== From: Nathan Chancellor To: Masahiro Yamada , Michal Marek , Nick Desaulniers Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH 2/2] Makefile: Only specify '--prefix=' when building with clang + GNU as Date: Tue, 2 Mar 2021 14:06:46 -0700 Message-Id: <20210302210646.3044738-2-nathan@kernel.org> X-Mailer: git-send-email 2.31.0.rc0.75.gec125d1bc1 In-Reply-To: <20210302210646.3044738-1-nathan@kernel.org> References: <20210302210646.3044738-1-nathan@kernel.org> MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building with LLVM_IAS=1, there is no point to specifying '--prefix=' because that flag is only used to find the cross assembler, which is clang itself when building with LLVM_IAS=1. All of the other tools are invoked directly from PATH or a full path specified via the command line, which does not depend on the value of '--prefix='. Sharing commands to reproduce issues becomes a little bit easier without a '--prefix=' value because that '--prefix=' value is specific to a user's machine due to it being an absolute path. Signed-off-by: Nathan Chancellor --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c20f0ad8be73..0413b8c594cd 100644 --- a/Makefile +++ b/Makefile @@ -566,12 +566,12 @@ CC_VERSION_TEXT = $(shell $(CC) --version 2>/dev/null | head -n 1 | sed 's/\#//g ifneq ($(findstring clang,$(CC_VERSION_TEXT)),) ifneq ($(CROSS_COMPILE),) CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) +ifneq ($(LLVM_IAS),1) GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE)) -endif -ifneq ($(LLVM_IAS),1) CLANG_FLAGS += -no-integrated-as endif +endif CLANG_FLAGS += -Werror=unknown-warning-option KBUILD_CFLAGS += $(CLANG_FLAGS) KBUILD_AFLAGS += $(CLANG_FLAGS) -- 2.31.0.rc0.75.gec125d1bc1