diff options
author | Lv Zheng <lv.zheng@intel.com> | 2016-05-23 23:06:54 +0800 |
---|---|---|
committer | Lv Zheng <lv.zheng@intel.com> | 2016-06-06 12:58:28 +0800 |
commit | 70e41616567106527e9302496ec03a5e70d8cc53 (patch) | |
tree | 11d8fdca760bf999375ebd100f11a7028aef8dce /source/include/platform/acgcc.h | |
parent | 831b85c7b5e72e12dbc30df2b04e255e1accddb8 (diff) | |
download | acpica-70e41616567106527e9302496ec03a5e70d8cc53.tar.gz |
Clib: Add -nostdinc support for EFI layer
This patch adds sprintf()/snprintf()/vsnprintf()/printf()/vfprintf()
support for OSPMs that have ACPI_USE_SYSTEM_CLIBRARY defined but do not
have ACPI_USE_STANDARD_HEADERS defined.
This patch also converts the entire EFI porting layer to use the standard
system Clibrary and implements GNU EFI specific standard Clibrary stdio
operations.
-fno-builtin is required for GCC to avoid optimization performed printf().
This optimization cannot be automatically disabled by specifying -nostdlib.
Please refer to the Link 1 for the details.
-iwithprefix include is required to include <stdarg.h> which contains
compiler specific implementation of vargs. It is unclear why there is the
vargs macros defined for OSPMs that do not have ACPI_USE_SYSTEM_CLIBRARY
defined. After applying this patch, this special vargs implementation
should also get deleted.
Standard C header files shouldn't be included here and there throughout the
entire ACPICA code base. This patch corrects some of them. Lv Zheng.
Link 1: http://www.ciselant.de/projects/gcc_printf/gcc_printf.html
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Diffstat (limited to 'source/include/platform/acgcc.h')
-rw-r--r-- | source/include/platform/acgcc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/include/platform/acgcc.h b/source/include/platform/acgcc.h index 3d36a38a3..773bd8959 100644 --- a/source/include/platform/acgcc.h +++ b/source/include/platform/acgcc.h @@ -116,6 +116,10 @@ #ifndef __ACGCC_H__ #define __ACGCC_H__ +/* Allow inclusion of stdarg.h */ + +#define ACPI_USE_COMPILER_VA + #define ACPI_INLINE __inline__ /* Function name is used for debug output. Non-ANSI, compiler-dependent */ |