From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by mx.groups.io with SMTP id smtpd.web12.4248.1585638852145391454 for ; Tue, 31 Mar 2020 00:14:12 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=mLc7o3bE; spf=pass (domain: linaro.org, ip: 209.85.128.67, mailfrom: ard.biesheuvel@linaro.org) Received: by mail-wm1-f67.google.com with SMTP id g62so1351841wme.1 for ; Tue, 31 Mar 2020 00:14:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xxA/j/SKL2sMBM6i84vWkfwhdQCr3g1gBe3L3/u0gPw=; b=mLc7o3bEsO1dVYC0ER187TAhdPOs5tKfqIJhO6z0oKJTEh5jexE8HIvNp+o5stSzTq s528r2+buZjTYw/elt0Ya4AjrFKZMEMvCpxRvzwVIQlngaADrxL/e93P3VEu/8B7QmxR NPtS6XykR1tm5TJUXmwFBTeTBKejP7s+FOO3FhaXHvMOe+cyH+axzn8nUYDiU8PxwWaP 6LnaIKKg8grS3bachx9qlNuyhrSH2mX1fCZBrMEx/hjzGZ1a1aBkL1HiYwD/T3IWnWl9 xyhWMaesONKvb75oaFiXbmIbBJd0+8O/szqn5snWc1+Mp+bJ/ZNExvW+DWogTjroYQTF gHAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xxA/j/SKL2sMBM6i84vWkfwhdQCr3g1gBe3L3/u0gPw=; b=rCvremC38V3HBoo4rHYiD59TOTphzaZj/KE2KZ/8HYlHjw3yrjWeofJ7sZUUxjL1sH W/zH6fXMm26HV4XydnN6RhwNx9a2IOICFZxBEfu70dy60yt4loH/Na7GzqjYOP3bQ01N rF0kZ5KPckB3KP3q6ORdsmAYslts6KorQgJyPQswhzorVJ1nNZ3aLdmXDU9ZyDT+A51N xMBltx2DpkP94sXyZte4kb9mG+Px5IXIVH1vJYWy6t+p1F5CwSFCcLVxgMoFqRqgZsa8 t7oqYCbc34n9iCJj9RQ8WOrz6Gph2anfaaGSKcyITsfOsnawLidKN4IeeuuVNzanpq8s /cQQ== X-Gm-Message-State: ANhLgQ0eT0Tv8dlHtabiR/O/lKZek7jfR8w+upXvCkF55zE4IHKAeAAe 3j+mgRfSlTrY1m3HdRaKum0peCAzr8A1JnaEyqiyag== X-Google-Smtp-Source: ADFU+vuwoThNndPYqsvR6dajeaFeCUYJa+sLQ0MLAZRyyLONHR9P4zVO+pJrXxqA1ybeJp9MJuSOWiZ8FID+4ZXhs54= X-Received: by 2002:a7b:c3cb:: with SMTP id t11mr1911488wmj.40.1585638850684; Tue, 31 Mar 2020 00:14:10 -0700 (PDT) MIME-Version: 1.0 References: <20200330085247.2415-1-guomin.jiang@intel.com> <03f18a49-6bd6-e753-e1bf-7e061d13f200@redhat.com> In-Reply-To: From: "Ard Biesheuvel" Date: Tue, 31 Mar 2020 09:13:59 +0200 Message-ID: Subject: Re: [edk2-devel] [PATCH] CryptoPkg/FltUsedLib: Add FltUsedLib for float. To: "Jiang, Guomin" Cc: Laszlo Ersek , "devel@edk2.groups.io" , "Wang, Jian J" , "Lu, XiaoyuX" , "Yao, Jiewen" , Sean Brogan , "macarl@microsoft.com" Content-Type: text/plain; charset="UTF-8" On Tue, 31 Mar 2020 at 03:40, Jiang, Guomin wrote: > > Hi Laszlo, > > Thanks for you spending time review the changes. > > And I just want to present how to reproduce the build error. > > When build OvmfPkgX64, you can encounter this issue with your local change. The error as below: > TcgPei.lib(AutoGen.obj) : error LNK2001: unresolved external symbol _fltused > c:\sourcecodes\tiano\Build\OvmfX64\DEBUG_VS2019\X64\SecurityPkg\Tcg\TcgPei\TcgPei\DEBUG\TcgPei.dll : fatal error LNK1120: 1 unresolved externals > > The build command: build -p OvmfPkg\OvmfPkgX64.dsc -b DEBUG -t VS2019 -a X64 -D TPM_ENABLE > The code changes for reproducing this symptom: > - int GLOBAL_USED _fltused = 1; > + //int GLOBAL_USED _fltused = 1; > The machine: WIN10 > The branch: edk2 master > Doesn't the build error go away as well if you simply add FloatUsed.c to all BaseCryptLib flavours if Visual Studio is being used? Something like diff --git a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf index 1bbe4f435aec..f40bf18e7f5d 100644 --- a/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf +++ b/CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf @@ -27,6 +27,7 @@ [Defines] # [Sources] + FloatUsed.c | MSFT InternalCryptLib.h Hash/CryptMd4.c Hash/CryptMd5.c