From 6895baa6a64fa9499e4d11696d59b3522c527ed0 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Tue, 11 Apr 2017 15:48:05 +0800 Subject: ACPICA: Add non-linux host build support _LINUX: used to detect a target build is a linux kernel/application. __linux__: used to detect a build is on a linux hosts. Thus we can see: if a linux kernel build is performed on environments other than linux hosts, __linux__ may not be defined by the compiler and _LINUX cannot cover linux kernel resident ACPICA files, as it's only defined in and hence only allows non ACPICA kernel files to correctly include aclinux.h. As a conclusion, we don't actually support such build. This patch adds -D_LINUX for ACPICA files so that kernel builds on any hosts can use unified _LINUX as a linux kernel target indication to correctly include aclinux.h. Tested-by: Al Stone Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile index 32d93edbc479..dea65306b687 100644 --- a/drivers/acpi/acpica/Makefile +++ b/drivers/acpi/acpica/Makefile @@ -2,7 +2,7 @@ # Makefile for ACPICA Core interpreter # -ccflags-y := -Os -DBUILDING_ACPICA +ccflags-y := -Os -D_LINUX -DBUILDING_ACPICA ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT # use acpi.o to put all files here into acpi.o modparam namespace -- cgit v1.2.1