From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EC634C433EF for ; Mon, 17 Jan 2022 18:06:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=whXvB8w5Zk/LJuG7xAI9eL8dKsm3OOybr4+3fDlLl0c=; b=tJPTBrP7PxwKzi Ecs/zYh1p4bj3uljG5UAN9gBCw+7pJp5PAgkuwLnV0q1UPld6rGqPW9usqzJhS1SRrApj2VJDs13k mbXf3gj+gad1xVJp6dgHUW53kF2Dnf59Pr0FQ/tgpSiKdU2nBYEtlhBOvOexHnzhAk++Vyr0JMCfc HZ6/jLQs8kIySB+cjqtgTGf1eQ5D3DUXwFXqrxD0zYCBqnsvzWS8CSSdPlTwar7lhTipH0dRuDqkl kGKr8UJyVkXI2PZ5mt9aqTUdDis6qqjWMzanMidPYo2NPfisTAtnXOqrkupjEnpqnjM2lGdJgRLPu Q7neRFirfIUvtUOVy8/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9WNJ-00G2nh-Fm; Mon, 17 Jan 2022 18:05:01 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n9WNF-00G2nF-RV for linux-arm-kernel@lists.infradead.org; Mon, 17 Jan 2022 18:04:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SXBFfgJ6I5nqz/i/bd0oVULxmcE8bOVfwTkWMsjjifI=; b=ikJ0LiYOSb97xwpBSWZuGoD2Tz msuygM59g7HoNV2xbhgZ64T45McwkReIWOFVSD8WKZqJsVv9Byt4IFX2Dr91otzc5W9C1AzYWKJH1 7tffsixH0LKbqmuLpynWgcx3CAMPfoTKEDvoUq2C+l34CIdmPHlkMkabxRnvP6dscA4x+/xVkWac6 mO9H4FVKjfBYfsT7swduTmsM7u2qQSne70zFzc6P/DustBW96Wcz5Q8aTM0QWkxkPxIuf/RHGaWXu dIyrKYpOXESQKNAeycsUZPHgi+ZdxCABCg7XKIAMTByn/yLeSyVvUFDGGPP0iGSzWCzAsX3UeszEh 5DRZVnsw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56744) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1n9WND-0002xh-BV; Mon, 17 Jan 2022 18:04:55 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1n9WNC-0003Wv-L8; Mon, 17 Jan 2022 18:04:54 +0000 Date: Mon, 17 Jan 2022 18:04:54 +0000 From: "Russell King (Oracle)" To: Andre Przywara Cc: Mark Rutland , Jaxson Han , linux-arm-kernel@lists.infradead.org, Robin Murphy Subject: Re: [PATCH v3] Makefile: Tell compiler to generate bare-metal code Message-ID: References: <20220117153348.2513798-1-andre.przywara@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220117_100457_917448_6D857E67 X-CRM114-Status: GOOD ( 20.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jan 17, 2022 at 05:49:43PM +0000, Russell King (Oracle) wrote: > On Mon, Jan 17, 2022 at 03:33:48PM +0000, Andre Przywara wrote: > > Our GCC invocation does not provide many parameters, which lets the > > toolchain fill in its own default setup. > > In case of a native build or when using a full-featured cross-compiler, > > this probably means Linux userland, which is not what we want for a > > bare-metal application like boot-wrapper. > > > > Tell the compiler to forget about those standard settings, and only use > > what we explicitly ask for. In particular that means to not use toolchain > > provided libraries, since they might pull in more code than we want, and > > might not run well in the boot-wrapper environment. > > > > Disable the stack protector, as this adds code that relies on userland: > > "If a guard check fails, an error message is printed and the program > > exits." (from the gcc manpage). > > > > Signed-off-by: Andre Przywara > > --- > > Hi, > > > > compared to [PATCH v2 3/9] this drops the more contentious options (for > > now, at least), and focuses on what's really needed. Including > > -fno-stack-protector, as the need for this showed up in the cleanup series > > already. > > There is history here. -ffreestanding has been tried before. See: > > https://patchwork.kernel.org/project/linux-kbuild/patch/20200817220212.338670-5-ndesaulniers@google.com/ > > Have the issues in that thread been addressed? > > If not, -ffreestanding does not belong in the top-level makefile. Oh, this is not the kernel. Please make it clear as you're posting to the linux-arm-kernel mailing list... -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel