Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1341132pxf; Fri, 26 Mar 2021 06:15:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydCMSBJhEDEQZVQFCb18YXoI2fx51yL2q7OkoJuCmycuAVf+jqK/pgFzG/vFb2veAcK9cI X-Received: by 2002:a17:906:b752:: with SMTP id fx18mr15771724ejb.128.1616764529164; Fri, 26 Mar 2021 06:15:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616764529; cv=none; d=google.com; s=arc-20160816; b=oiG29N/IfLCRPTpVTTjsu/5Ov1sAXAewVK8mzVkXqXcIE99qbyWJK/YOzXsG4UxdZP 3y5oubOeIObaDp4BnjrHbRfRRnpOjsH1ipBFhYjNu/p2wnjHa4iV5Womfczfd2o5jITn zOWCGYEEdHyahvLkxCqmTTVHAVaqphuJ61timmsAjsWX2/+8MX5Rw3VNa7EemzmAlHTj dVIjGaY/hyWBsGAzk5oIWoZ3nJ5Mb1E4NaJ0NUaoxzv0noLmyXriM0pZaM+H28bMgXNw 5hfaybw/PR99706YBsprLNxota/4b9EcM4SDQpYnt+dJtESjtVl420KrTJ9yrLReI5tQ iojw== 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=63YzANuQRTf+cDDDZMxLNebYrOE9ADL/goF+NOFEpls=; b=qS0Uh6UCewFqSt+WRa79c/NqBg6Qz7Siq3+55WfDoNTSVksMN3JQpBCDxQZ+RJCVaw y9MZRFU2DoSH+0fhAWHzBD2IunMRc/sonCJ8SoFN9YsRgsSh7BeO9OA6Ej0BCsBWuBfu PgVn0Cv9smQeSl6GDXyEJIKiSKqRvcxzN8QGSi59aVNZwOilS0PEweif9lgXh5BUjVbJ kTsIBEv3yRtCrAwuqZlS2jw8BVD/Ur6ipcrIJrqT9kP8rSIx8rqOkHv4Tlva9N0gfs15 h1EFDIJ2sy4EW9gldb3inCpdTNxL0L7uTcF2ysApqLnSJG6aqyTJvPufJEDvsJGw/O1S It+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=KCf9EyNB; dkim=neutral (no key) header.i=@linutronix.de header.b=R23EtaFj; 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 e21si6408410edr.370.2021.03.26.06.15.05; Fri, 26 Mar 2021 06:15:29 -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=KCf9EyNB; dkim=neutral (no key) header.i=@linutronix.de header.b=R23EtaFj; 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 S229935AbhCZNOG (ORCPT + 99 others); Fri, 26 Mar 2021 09:14:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229882AbhCZNNf (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 E3172C0613B2; 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=1616764410; 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=63YzANuQRTf+cDDDZMxLNebYrOE9ADL/goF+NOFEpls=; b=KCf9EyNBzuUYA9vgQYLKNbUAsspR+a6seajAWfBPi01dyURxqIf/v5hYCgOHJJ1j0r7GRn H5HlLG03JRHjI4FVT3SMvR2Eoh02lbqyG0hOGvY4fmJ6EJWxHeZt7yM0324NaAnlij90NV 6wFMY4j1NagdKQVtU+9oGR5TgmYbNHARIrm7g6w/gpWBsGcmoeO4hB7+2T9WriKxtuiQr9 QSVMJ0T6ckaQRu9fMUYIfWbkZfsokif6uUJ9ZkqkZ+//AH2E44vFW3r7/C2SxKUJPoClr0 nCcAaY3MqJSfefEMDs6OzQP3RFsXhtbYcQOCjJo4K4Iyu/P6NPBtf7UK5iqj0Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1616764410; 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=63YzANuQRTf+cDDDZMxLNebYrOE9ADL/goF+NOFEpls=; b=R23EtaFjrj8H4IQG/Tx3QFmQ9kN5AF8tW7z2YRvA3zwDMxCVLMAuf8f7JWTTWkqwBKR1FK iC0zGNXsDWjY/xBg== 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] efi/libstub: Add $(CLANG_FLAGS) to x86 flags Cc: Nathan Chancellor , Borislav Petkov , Ard Biesheuvel , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20210326000435.4785-4-nathan@kernel.org> References: <20210326000435.4785-4-nathan@kernel.org> MIME-Version: 1.0 Message-ID: <161676441002.398.18130314069263758283.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: 58d746c119dfa28e72fc35aacaf3d2a3ac625cd0 Gitweb: https://git.kernel.org/tip/58d746c119dfa28e72fc35aacaf3d2a3ac625cd0 Author: Nathan Chancellor AuthorDate: Thu, 25 Mar 2021 17:04:35 -07:00 Committer: Borislav Petkov CommitterDate: Fri, 26 Mar 2021 11:34:58 +01:00 efi/libstub: Add $(CLANG_FLAGS) to x86 flags When cross compiling x86 on an ARM machine with clang, there are several errors along the lines of: arch/x86/include/asm/page_64.h:52:7: error: invalid output constraint '=D' in asm This happens because the x86 flags in the EFI stub are not derived from KBUILD_CFLAGS like the other architectures are and the clang flags that set the target architecture ('--target=') and the path to the GNU cross tools ('--prefix=') are not present, meaning that the host architecture is targeted. These flags are available as $(CLANG_FLAGS) from the main Makefile so add them to the cflags for x86 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-4-nathan@kernel.org --- drivers/firmware/efi/libstub/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index c23466e..d053757 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -13,7 +13,8 @@ cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ \ -Wno-pointer-sign \ $(call cc-disable-warning, address-of-packed-member) \ $(call cc-disable-warning, gnu) \ - -fno-asynchronous-unwind-tables + -fno-asynchronous-unwind-tables \ + $(CLANG_FLAGS) # arm64 uses the full KBUILD_CFLAGS so it's necessary to explicitly # disable the stackleak plugin