From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.69914.1674725682023540984 for ; Thu, 26 Jan 2023 01:34:42 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: thomas.abraham@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C71424B3; Thu, 26 Jan 2023 01:35:22 -0800 (PST) Received: from [10.57.75.31] (unknown [10.57.75.31]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A07B53F71E; Thu, 26 Jan 2023 01:34:39 -0800 (PST) Message-ID: Date: Thu, 26 Jan 2023 09:34:37 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH edk2-platforms 1/5] Platform/ARM/SgiPkg: Remove '-march=armv8-a+nofp' flag To: Pierre.Gondois@arm.com, devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar , Leif Lindholm , Wenyi Xie , Ilias Apalodimas , Omkar Anand Kulkarni , Pranav Madhu , Sayanta Pattanayak References: <20230125102802.663790-1-Pierre.Gondois@arm.com> <20230125102802.663790-2-Pierre.Gondois@arm.com> From: "Thomas Abraham" In-Reply-To: <20230125102802.663790-2-Pierre.Gondois@arm.com> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable On 25/01/2023 10:27, Pierre.Gondois@arm.com wrote: > From: Pierre Gondois >=20 > The '-march=3Darmv8-a+nofp' flag abort the following build: > build -a AARCH64 -p Platform/ARM/SgiPkg/PlatformStandaloneMm.dsc > -t GCC5 -D SECURE_STORAGE_ENABLE > Error message: > CryptoPkg/Library/OpensslLib/openssl/crypto/rand/drbg_lib.c:1009:12: > error: =E2=80=98+nofp=E2=80=99 feature modifier is incompatible with= the use of > floating-point types > static int drbg_add(const void *buf, int num, double randomness) > ^~~~~~~~ >=20 > In SgiPlatformMm.dsc.inc, the '-march=3Darmv8-a+nofp' flag was > originally added in: > commit 1974293d1975 ("Platform/ARM/SgiPkg: Build infrastructure for > StandaloneMm image") > as a linker flag. The flag seem to have been added to avoid triggering > an exception due to the floating point unit missing in RTL. With the > latest RTL, the exception is not triggered anymore. >=20 > commit 936e8dd57524 ("Platform/Sgi: Cleanup build options for > StandaloneMM context") > moves the flag from the linker to the compiler, making the build fail. >=20 > Remove the '-march=3Darmv8-a+nofp' flag as it is not necessary anymore > for SgiPlatformMm.dsc.inc, and is probably not necessary for > PlatformStandaloneMmRpmb.dsc. >=20 > CC: Omkar Anand Kulkarni > CC: Pranav Madhu > CC: Sayanta Pattanayak > Signed-off-by: Pierre Gondois > --- > Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc b/Platform/ARM/S= giPkg/SgiPlatformMm.dsc.inc > index 01f0a7657c51..f9a516b341f0 100644 > --- a/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc > +++ b/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc > @@ -146,5 +146,5 @@ [Components.AARCH64] > # > #####################################################################= ############################## > [BuildOptions.AARCH64] > - GCC:*_*_*_CC_FLAGS =3D -mstrict-align -march=3Darmv8-a+nofp -D DISAB= LE_NEW_DEPRECATED_INTERFACES > + GCC:*_*_*_CC_FLAGS =3D -mstrict-align -D DISABLE_NEW_DEPRECATED_INTE= RFACES > GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000 Thanks for this fix. Reviewed-by: Thomas Abraham