[edk2-devel] [PATCH edk2-platforms 1/5] Platform/ARM/SgiPkg: Remove '-march=armv8-a+nofp' flag

PierreGondois pierre.gondois at arm.com
Wed Jan 25 10:27:58 UTC 2023


From: Pierre Gondois <pierre.gondois at arm.com>

The '-march=armv8-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: ‘+nofp’ feature modifier is incompatible with the use of
  floating-point types
  static int drbg_add(const void *buf, int num, double randomness)
			 ^~~~~~~~

In SgiPlatformMm.dsc.inc, the '-march=armv8-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.

commit 936e8dd57524 ("Platform/Sgi: Cleanup build options for
StandaloneMM context")
moves the flag from the linker to the compiler, making the build fail.

Remove the '-march=armv8-a+nofp' flag as it is not necessary anymore
for SgiPlatformMm.dsc.inc, and is probably not necessary for
PlatformStandaloneMmRpmb.dsc.

CC: Omkar Anand Kulkarni <omkar.kulkarni at arm.com>
CC: Pranav Madhu <pranav.madhu at arm.com>
CC: Sayanta Pattanayak <Sayanta.Pattanayak at arm.com>
Signed-off-by: Pierre Gondois <pierre.gondois at arm.com>
---
 Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc b/Platform/ARM/SgiPkg/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 = -mstrict-align -march=armv8-a+nofp -D DISABLE_NEW_DEPRECATED_INTERFACES
+  GCC:*_*_*_CC_FLAGS = -mstrict-align -D DISABLE_NEW_DEPRECATED_INTERFACES
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
-- 
2.25.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#99009): https://edk2.groups.io/g/devel/message/99009
Mute This Topic: https://groups.io/mt/96518042/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list