ACPICA: Clib: Add -nostdinc support for EFI layer
authorLv Zheng <lv.zheng@intel.com>
Thu, 4 Aug 2016 08:45:06 +0000 (16:45 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 13 Aug 2016 01:09:35 +0000 (03:09 +0200)
commitf173a7750eb188fd7d888d5950d58454bcfbd09b
tree673af041d61caf1a783647422c3b81069f50cfcf
parente323c02dee59af7da65637852f6fa95551325d80
ACPICA: Clib: Add -nostdinc support for EFI layer

ACPICA commit d261d40ea168f8e4c4e3986de720b8651c4aba1c

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.

-iwithprefix include is required to include <stdarg.h> which contains
compiler specific implementation of vargs when -nostdinc is specified.
-fno-builtin is required for GCC to avoid optimization performed printf().
This optimization cannot be automatically disabled by specifying -nostdlib.
Please refer to the first link below for the details. However, the build
option changes do not affect Linux kernel builds and are not included.
Lv Zheng.

Link: http://www.ciselant.de/projects/gcc_printf/gcc_printf.html
Link: https://github.com/acpica/acpica/commit/d261d40e
Link: https://bugs.acpica.org/show_bug.cgi?id=1302
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/acutils.h
drivers/acpi/acpica/utbuffer.c
drivers/acpi/acpica/utdebug.c
drivers/acpi/acpica/utprint.c
tools/power/acpi/tools/acpidump/apdump.c
tools/power/acpi/tools/acpidump/apfiles.c