[edk2-devel] [edk2-libc Patch 2/2] StdLib: Resolve CLANGPDB build issues
Michael D Kinney
michael.d.kinney at intel.com
Tue Aug 31 21:49:31 UTC 2021
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1618
Disable warnings for unused command line arguments. This is being
triggered by -nostdlibinc flag enabled by tools_def.txt.
Define __warn_references() to nothing for all toolchains. CLANGPDB
by default is GCC like and was pulling in .stabs directives that are
not supported.
Cc: Rebecca Cran <rebecca at nuviainc.com>
Cc: Sivaraman <sivaramann at amiindia.co.in>
Signed-off-by: Michael D Kinney <michael.d.kinney at intel.com>
---
StdLib/Include/sys/EfiCdefs.h | 7 +------
StdLib/StdLib.inc | 3 ++-
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/StdLib/Include/sys/EfiCdefs.h b/StdLib/Include/sys/EfiCdefs.h
index ed537c0..8b12a2e 100644
--- a/StdLib/Include/sys/EfiCdefs.h
+++ b/StdLib/Include/sys/EfiCdefs.h
@@ -86,12 +86,7 @@
#endif
#include <sys/featuretest.h>
-//#include <machine/_EfiCdefs.h>
-#ifdef __PE32__
-#include <sys/_EfiCdefs_PE32.h>
-#else
-#include <sys/cdefs_aout.h>
-#endif
+#define __warn_references(sym,msg)
/* NULL is defined by the automatic inclusion of Base.h by the build tools. */
diff --git a/StdLib/StdLib.inc b/StdLib/StdLib.inc
index 814bdbc..9ca8ead 100644
--- a/StdLib/StdLib.inc
+++ b/StdLib/StdLib.inc
@@ -122,7 +122,7 @@
GCC:*_*_IA32_CC_FLAGS = -O0 -DUEFI_C_SOURCE
RVCT:*_*_*_CC_FLAGS = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm
XCODE:*_*_*_CC_FLAGS = -O0 -DUEFI_C_SOURCE -Wno-unused-const-variable -Wno-string-compare -Wno-sometimes-uninitialized
-
+ CLANGPDB:*_*_*_CC_FLAGS = -Wno-unused-command-line-argument
!else
# These Build Options are used when building the Standard Libraries to be run
# on real hardware.
@@ -131,6 +131,7 @@
GCC:*_*_*_CC_FLAGS = -nostdinc -nostdlib -DUEFI_C_SOURCE
RVCT:*_*_*_CC_FLAGS = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm
XCODE:*_*_*_CC_FLAGS = -nostdinc -nostdlib -DUEFI_C_SOURCE -Wno-unused-const-variable -Wno-string-compare -Wno-sometimes-uninitialized
+ CLANGPDB:*_*_*_CC_FLAGS = -Wno-unused-command-line-argument
!endif
# Temporarily restrict compiler warnings to those produced by VS2012.
--
2.32.0.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80031): https://edk2.groups.io/g/devel/message/80031
Mute This Topic: https://groups.io/mt/85287997/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