Hi Guomin, Laszlo & Garrett, Because both UefiCpuLib and FspSecCoreT / FspSecCoreM both define InitializeFloatingPointUnits API. So this build issue been reported.
I have submit a patch to remove InitializeFloatingPointUnits in FspSecCoreT / FspSecCoreM, https://edk2.groups.io/g/devel/message/61757. Please wait that patch been merged before committing this change. Thanks, Eric > -----Original Message----- > From: Jiang, Guomin <guomin.ji...@intel.com> > Sent: Sunday, June 28, 2020 5:11 PM > To: Laszlo Ersek <ler...@redhat.com>; devel@edk2.groups.io; > garrett.kirkend...@amd.com > Cc: Ni, Ray <ray...@intel.com>; Dong, Eric <eric.d...@intel.com> > Subject: RE: [edk2-devel] [PATCH v6 1/4] PcAtChipsetPkg: > PcAtChipsetPkg.dsc add UefiCpuLib LibraryClass > > Hi Laszlo, > > The step to reproduce as below: > 1. add below change > diff --git a/IntelFsp2Pkg/IntelFsp2Pkg.dsc b/IntelFsp2Pkg/IntelFsp2Pkg.dsc > index 26cd3da43c3f..d43cb5be6472 100644 > --- a/IntelFsp2Pkg/IntelFsp2Pkg.dsc > +++ b/IntelFsp2Pkg/IntelFsp2Pkg.dsc > @@ -62,7 +62,10 @@ [Components] > IntelFsp2Pkg/Library/BaseDebugDeviceLibNull/BaseDebugDeviceLibNull.inf > > IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/SecFspSecPlatformLibNull.in > f > > - IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf > + IntelFsp2Pkg/FspSecCore/FspSecCoreT.inf { > + <LibraryClasses> > + NULL|UefiCpuPkg/Library/BaseUefiCpuLib/BaseUefiCpuLib.inf > + } > IntelFsp2Pkg/FspSecCore/FspSecCoreM.inf > IntelFsp2Pkg/FspSecCore/FspSecCoreS.inf > IntelFsp2Pkg/FspSecCore/Fsp22SecCoreS.inf > > 2. build -p IntelFsp2Pkg\IntelFsp2Pkg.dsc -b DEBUG -a IA32 -t VS2019 and I > can see BaseUefiCpuLib.lib(InitializeFpu.obj) : error LNK2005: > _InitializeFloatingPointUnits already defined in > FspSecCoreT.lib(InitializeFpu.obj) > > I can't reproduce it with the original edk2 or edk2-platforms, but our project > have the depend on ApicLib, so if the ApicLib depend on UefiCpuLib, it will > break our project build. > > Below > Thanks. > > > -----Original Message----- > > From: Laszlo Ersek <ler...@redhat.com> > > Sent: Tuesday, June 23, 2020 7:16 PM > > To: devel@edk2.groups.io; Jiang, Guomin <guomin.ji...@intel.com>; > > garrett.kirkend...@amd.com > > Cc: Ni, Ray <ray...@intel.com>; Dong, Eric <eric.d...@intel.com> > > Subject: Re: [edk2-devel] [PATCH v6 1/4] PcAtChipsetPkg: > > PcAtChipsetPkg.dsc add UefiCpuLib LibraryClass > > > > On 06/23/20 02:52, Guomin Jiang wrote: > > > Hi Garrett, > > > > > > Thanks for report quickly and it work and the 'Mac format issue > disappear'. > > > > > > But another build error occur 'error LNK2005: > > > _InitializeFloatingPointUnits > > already defined in FspSecCoreT.lib(InitializeFpu.obj)' > > > It seem that result by ApicLib who depend UefiCpuLib now. > > > > Yes. > > > > > I want to know why you add this dependency, > > > > It was discussed on the list in advance. > > > > [edk2-devel] UefiCpuPkg: Discuss: Move > StandardSignatureIsAuthenticAMD > > function to BaseUefiCpuLib > > > > https://edk2.groups.io/g/devel/message/61079 > > > > In addition, we have investigated all the platforms in the open source > > edk2 and edk2-platforms trees that could require an update due to the > > new > > dependency: > > > > https://edk2.groups.io/g/devel/message/61525 > > > > And this series is in fact addressing them all. > > > > > have any other way to do it, for example, add the dependency to the > > > dsc > > file. > > > > Please describe how you can reproduce the link error using edk2 and > > edk2- platforms content *only* (= using open source components only). > > > > Thanks > > Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#61768): https://edk2.groups.io/g/devel/message/61768 Mute This Topic: https://groups.io/mt/75037835/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-