From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 1FE89D80230 for ; Wed, 8 May 2024 09:39:28 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=qA1qDy4kX3PZ78metTihBs6oFfrq3LRLSeImhXrNEko=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Cc:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240206; t=1715161167; v=1; b=tThmifq3Xw0I0JK/yhhvFXyos12rhaU/5Y2UY+o7mII2GkSR5A8NnRgSwA10SHK6JoCy5ltJ OS/nEcoIV7t4Hb33eSE2zRoYvEoA9xSPrVk92vsfU0JlnhcCA9nJ+o6a4nq3s/VlyB8gugaHTr2 tAFPTaeZCzQIUe3rL2xkixtkvh0EtQAyNvci9Ipbd8ez2eEVZ8gt0G482tM+mobnI7NXO5G8Egy e2uW2Fa+7opetmWqpfZvPa9RoriH9rLRKf7RcEEemWSww/lLTIi5cToosTvPDbec1kryOidMtdF 8Q8CQcdX4V9tfukLMswnqFJggmKJoeB2rRupJndXUQ2yA== X-Received: by 127.0.0.2 with SMTP id AwTzYY7687511x1CLI1aXs2y; Wed, 08 May 2024 02:39:27 -0700 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.8029.1715161166743660717 for ; Wed, 08 May 2024 02:39:26 -0700 X-Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 25AA561B65 for ; Wed, 8 May 2024 09:39:26 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D212CC4AF17 for ; Wed, 8 May 2024 09:39:25 +0000 (UTC) X-Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-51f45104ef0so4514628e87.3 for ; Wed, 08 May 2024 02:39:25 -0700 (PDT) X-Gm-Message-State: 3NWmJJUSxItZIjriQSGOnIrPx7686176AA= X-Google-Smtp-Source: AGHT+IGB1SJmKr9106Xn6pEs+fj/rZ1fpoDZNiW+1rU8b3fEaH7vbNpT/SPiNYudAp85CZE3vfQgEqA5k25PGjMf6N8= X-Received: by 2002:a05:6512:12cf:b0:51b:d237:8053 with SMTP id 2adb3069b0e04-5217cd4a06emr1432334e87.57.1715161164164; Wed, 08 May 2024 02:39:24 -0700 (PDT) MIME-Version: 1.0 References: <20240508085148.1725-1-pete@akeo.ie> <20240508085148.1725-2-pete@akeo.ie> In-Reply-To: From: "Ard Biesheuvel" Date: Wed, 8 May 2024 11:39:12 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH 1/1] MdePkg/BaseLib: Fix undefined symbol when compiling with Visual Studio To: Pete Batard Cc: devel@edk2.groups.io, quic_llindhol@quicinc.com, michael.d.kinney@intel.com, gaoliming@byosoft.com.cn Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 08 May 2024 02:39:26 -0700 Resent-From: ardb@kernel.org Reply-To: devel@edk2.groups.io,ardb@kernel.org List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: text/plain; charset="UTF-8" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=tThmifq3; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=kernel.org (policy=none) On Wed, 8 May 2024 at 11:21, Pete Batard wrote: > > Hi Ard, > > Thanks for the quick review. > > Note that as opposed to the previous one you referenced, that patches > both the .S and the .asm, my submission only patches the .asm, so it's > probably better to use Adam Liu's for integration (who was the first to > propose a fix anyway). > Yeah, we'll end up merging the other patch, most likely. But thanks for reminding us of this issue - it does need fixing. > As to your other question, see inline: > > On 2024.05.08 10:08, Ard Biesheuvel wrote: > > On Wed, 8 May 2024 at 11:07, Ard Biesheuvel wrote: > >> > >> On Wed, 8 May 2024 at 10:52, Pete Batard wrote: > >>> > >>> Commit 80bbea192aa44ab664ba8be29ac06c83f246e99c introduced a regression > >>> resulting in 'error A2023: undefined symbol: InternalAssertJumpBuffer' > >>> when compling MdePkg for AARCH64 with Visual Studio. > >>> Fix this by adding the relevant EXTERN reference. > >>> > >>> Signed-off-by: Pete Batard > >>> Cc: Leif Lindholm > >>> Cc: Ard Biesheuvel > >> > >> Reviewed-by: Ard Biesheuvel > >> > >> Note that the same issue has been raised two months ago, and a similar > >> fix proposed > >> > >> https://openfw.io/edk2-devel/20240320025130.599086-1-adam.liu@tw.synaptics.com/ > >> > >> so IMHO this qualifies for inclusion in the stable tag. > >> > > > > BTW the existence of this issue appears to imply that the VS RELEASE > > build does not #define MDEPKG_NDEBUG. Is that an oversight? > > In my testing with VS2022 (with '-b RELEASE'), adding: > > #ifdef MDEPKG_NDEBUG > #error MDEPKG_NDEBUG is defined > #endif > > to SetJump.c does produce the expected: > > d:\edk2\MdePkg\Library\BaseLib\SetJump.c(12): fatal error C1189: #error: > MDEPKG_NDEBUG is defined > > So as far as I can tell, MDEPKG_NDEBUG is properly defined. > The reference to InternalAssertJumpBuffer was intended to only be emitted if MDEPKG_NDEBUG is not defined, but this appears to be broken too. MDEPKG_NDEBUG is added to the CC flags only, never to the PP flags - given that a #define is fundamentally a PP flag, it would be better if all -D flags were carried in a separate variable that gets added to both, but this is future refactoring that I won't get around to myself, most probably. Leif, any thoughts? -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118670): https://edk2.groups.io/g/devel/message/118670 Mute This Topic: https://groups.io/mt/105977470/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-