Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1341686pxf; Fri, 26 Mar 2021 06:15:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsJuHcasYt2Zkp76vxNGzV+GvzJr0QfVQHSreu1njI7p7dtETsgAOlU/wYz5YMb0QELD89 X-Received: by 2002:a17:906:4117:: with SMTP id j23mr15590832ejk.10.1616764559112; Fri, 26 Mar 2021 06:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616764559; cv=none; d=google.com; s=arc-20160816; b=ZN82udQZiyuERYyWUR1BXF0s6woemp2ieoi8o03IRP87AiUV+GsscW28MV/U7Us2hN kBlCpzVNCgl7a4rryu1yWR3DPgtDVMWgo3KWkeB8kYx46DDo64HctuGfJUyUeAXSOW54 Rah1fft25BOUVXMPsCqrj4ecZjBeZEkb+c7HV6bginmsmA0q8tZc3Df07fR+9UzwkAuK 4ytmsFoLAplTdru9N/9ax4lYzlbEGfyjbFBYRBNLsfARQh0hYACR66QSZlfWNDfj9jwk kvF2TPeDovCH3p1KEHNUtbIWyn9kac8WjBPmMlrG7+DRgLxcXHuffaoTkNrVRoowXYpa qMmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=PlR1tpuRhM8dVRnfgL93cqZK0Z1CqVDXXnxeP0qLgmU=; b=yM25qTRP0/hzOcbEMshHT+E6qjoKpuZKPW0bTvjmIJaeYSXCU9lYzmk0CS/lrvCDL9 JYSsmeaaGMZ2ikfHpzWXw26VNsW9OvWlKqZdesPTVtSSlmS7Lu1K6tREN7U3dQ/0Ml89 8iZ8DjQM//TPlFjZ3+kpCGCVa3X6vxt2ivo6ryFeENAKcvjDhE/6SSWA6YwtVX2YOGqB RmsnfGhcONaGp+zpm+Hb1fY2WC2tp+YSpUx9Jdn/B3eYLzK7tZguOtR5j4+jDJWPuHvo Y21XBszIqhvBLWJ11L6Q4emRaTMOyh8CNcvXSvSPt2tucUX68/74RjJy21x5flS1aN5M i+GQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=qHchOfXB; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=WcqJQUX4; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si6722985eju.321.2021.03.26.06.15.36; Fri, 26 Mar 2021 06:15: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=@linutronix.de header.s=2020 header.b=qHchOfXB; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=WcqJQUX4; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230113AbhCZNOL (ORCPT + 99 others); Fri, 26 Mar 2021 09:14:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229779AbhCZNNf (ORCPT ); Fri, 26 Mar 2021 09:13:35 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3E67C0613AA; Fri, 26 Mar 2021 06:13:34 -0700 (PDT) Date: Fri, 26 Mar 2021 13:13:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1616764411; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PlR1tpuRhM8dVRnfgL93cqZK0Z1CqVDXXnxeP0qLgmU=; b=qHchOfXBeos+rMcSpWWC51x5Tw5LTJxUV8pEsyMATl/+3XAySdsY+9ZQ4/60AV89GDcYhq Hu+mRPEohpbvSHC1VKdpUMIDsioeJmAB4uRJSExqGYfu2+cflxtjQBL+pDejqRZ4u1Rfxy asdKqJbRDCSp2OnwMTdJg8wqGqPcR8A/offpSHLU3g+Oa/0YdQ4CAkUh6NuE+lnfhWDyEM bLuQ0oS0F/BeHDB+n0bKD2+LEh30opfeSrGeqQJG45loE+myB+egKQdIzQ5tINI+bKPToG dgi9fS1mGE2+1qC9gMeNouO6FEnIWa3JOEQ5CkutJJgj78qnEiTGxbl38rVycA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1616764411; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PlR1tpuRhM8dVRnfgL93cqZK0Z1CqVDXXnxeP0qLgmU=; b=WcqJQUX4+uVeRgi1ZOHRxGTEnIWRIJpgAtqQn9a85VoYWR5ZKFdSkaI7QNhFuE4DBjKUhC IsWT0B0196v8LUCA== From: "tip-bot2 for Nathan Chancellor" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/build] x86/boot: Add $(CLANG_FLAGS) to compressed KBUILD_CFLAGS Cc: Nathan Chancellor , Borislav Petkov , Ard Biesheuvel , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210326000435.4785-3-nathan@kernel.org> References: <20210326000435.4785-3-nathan@kernel.org> MIME-Version: 1.0 Message-ID: <161676441048.398.6354341807267354566.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/build branch of tip: Commit-ID: d5cbd80e302dfea59726c44c56ab7957f822409f Gitweb: https://git.kernel.org/tip/d5cbd80e302dfea59726c44c56ab7957f822409f Author: Nathan Chancellor AuthorDate: Thu, 25 Mar 2021 17:04:34 -07:00 Committer: Borislav Petkov CommitterDate: Fri, 26 Mar 2021 11:32:55 +01:00 x86/boot: Add $(CLANG_FLAGS) to compressed KBUILD_CFLAGS When cross compiling x86 on an ARM machine with clang, there are several errors along the lines of: arch/x86/include/asm/string_64.h:27:10: error: invalid output constraint '=&c' in asm This happens because the compressed boot Makefile reassigns KBUILD_CFLAGS and drops the clang flags that set the target architecture ('--target=') and the path to the GNU cross tools ('--prefix='), meaning that the host architecture is targeted. These flags are available as $(CLANG_FLAGS) from the main Makefile so add them to the compressed boot folder's KBUILD_CFLAGS so that cross compiling works as expected. Signed-off-by: Nathan Chancellor Signed-off-by: Borislav Petkov Acked-by: Ard Biesheuvel Link: https://lkml.kernel.org/r/20210326000435.4785-3-nathan@kernel.org --- arch/x86/boot/compressed/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index e0bc398..6e5522a 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -46,6 +46,7 @@ KBUILD_CFLAGS += -D__DISABLE_EXPORTS # Disable relocation relaxation in case the link is not PIE. KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mrelax-relocations=no) KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h +KBUILD_CFLAGS += $(CLANG_FLAGS) # sev-es.c indirectly inludes inat-table.h which is generated during # compilation and stored in $(objtree). Add the directory to the includes so