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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 B09E2EE49AB for ; Tue, 22 Aug 2023 19:35:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 496D060A82; Tue, 22 Aug 2023 19:35:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 496D060A82 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id un9eeEEdBYOM; Tue, 22 Aug 2023 19:35:46 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 8C35060A5F; Tue, 22 Aug 2023 19:35:45 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 8C35060A5F Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 81FCC1BF370 for ; Tue, 22 Aug 2023 19:35:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 2C705401D8 for ; Tue, 22 Aug 2023 19:35:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 2C705401D8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1uBZMI-czEAA for ; Tue, 22 Aug 2023 19:35:42 +0000 (UTC) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by smtp2.osuosl.org (Postfix) with ESMTPS id 127E6400D2 for ; Tue, 22 Aug 2023 19:35:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 127E6400D2 Received: by mail.gandi.net (Postfix) with ESMTPSA id 4D2631BF205; Tue, 22 Aug 2023 19:35:40 +0000 (UTC) Date: Tue, 22 Aug 2023 21:35:39 +0200 To: Julien Olivain Message-ID: <20230822213539.331878ec@windsurf> In-Reply-To: <20230822192315.8180-1-ju.o@free.fr> References: <20230822192315.8180-1-ju.o@free.fr> Organization: Bootlin X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-GND-Sasl: thomas.petazzoni@bootlin.com X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1692732940; h=from:from: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=owJ7mpTf5qgrB/FKIaoeraKIpQGh8lrlPS2NnF0MlR8=; b=cMXFMEh44rJGX+WS2VKlO8vqSED3s2LtTfCQ8+QMzMLVX7gzNYoTzMrlyaVWDJt6yHwm/r 9oZiS3h2AMSDZ0QIDGS9T4bcWFa3U5auqLU8yA4YIYGoVWmEhgQ7ve3RAkd4+803z9E24i N1f/ohGbyJa0Uw2Xq/NdgUw1kjoa2TEpT1sJhSJC8vxcTedFIl5PLIv9iHyu98v3faoMAA 5ur6xyROK5fHNT8gifSabAT2Po6eGgziNTW1lrpA6ur0ct8emKshwEbMhQlhjm9kxjKW3q Oma0sTJXfjTR1bsLhU0pD75A437sXtsXN0/Y18NkJiEg2UQlC/bs6T7AjacYqw== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=cMXFMEh4 Subject: Re: [Buildroot] [PATCH next 1/1] package/kexec: fix link error when BR2_OPTIMIZE_0=y X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Thomas Petazzoni via buildroot Reply-To: Thomas Petazzoni Cc: buildroot@buildroot.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" On Tue, 22 Aug 2023 21:23:14 +0200 Julien Olivain wrote: > When BR2_OPTIMIZE_0, -O0 is passed in compiler CFLAGS. This means no > code optimization will be performed. > > kexec code uses a trick to detect unaligned accesses at link time > which needs at least dead-code-removal to work. See > put/get_unaligned() macros in kexec/kexec.h. This code was re-enabled > in upstream commit [1]. > > This commit sets at least -O1 (which include the sufficient > dead-code-removal) when BR2_OPTIMIZE_0=y, to fix those issues. > > Fixes: > - http://autobuild.buildroot.org/results/8f8/8f8532f1dfbd71e52c51c00118934af9fa45e7cb > - http://autobuild.buildroot.org/results/528/528fd7baf9b0ad5549d22ec8e0623c5fa1f2d117 > - http://autobuild.buildroot.org/results/499/499115439680adfb4b40042468e5bbb65d91ce6c > - ...and many others > > [1] https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/?id=0723defb5308ac7fce296f8b596bff4df6803f01 > > Signed-off-by: Julien Olivain > --- > Patch tested on branch next at commit bfa4a7c with commands: Thanks for the research, but why is this tagged for next? You're saying the issue was introduced in kexec-tools commit 0723defb5308ac7fce296f8b596bff4df6803f01, and this commit was initially part of the 2.0.1 release of kexec-tools, which we have in Buildroot since February 2010. Based on that, I would have expected this patch to be relevant for our master branch, but you explicitly say it should be merged in next, which to me doesn't make sense. Could you clarify? Thanks a lot! Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot