-----Original Message-----
From: Jung-uk Kim <jkim(a)FreeBSD.org>
Sent: Friday, December 13, 2019 7:05 AM
To: Moore, Robert <robert.moore(a)intel.com>; Rafael J. Wysocki
<rjw(a)rjwysocki.net>; Kaneda, Erik <erik.kaneda(a)intel.com>
Cc: Laster K. <officiallazerl0rd(a)gmail.com>; Wysocki, Rafael J
<rafael.j.wysocki(a)intel.com>; linux-acpi(a)vger.kernel.org; devel(a)acpica.org
Subject: Re: [Devel] Re: [PATCH] ACPICA: Fix compilation with bare-metal toolchian
On 19. 12. 12., Moore, Robert wrote:
> -----Original Message-----
> From: Rafael J. Wysocki [mailto:
[email protected]]
> Sent: Friday, July 5, 2019 2:44 AM
> To: Moore, Robert <robert.moore(a)intel.com>; Schmauss, Erik
> <erik.schmauss(a)intel.com>
> Cc: Laster K. <officiallazerl0rd(a)gmail.com>; Wysocki, Rafael J
> <rafael.j.wysocki(a)intel.com>; lenb(a)kernel.org; linux-
> acpi(a)vger.kernel.org; devel(a)acpica.org
> Subject: Re: [PATCH] ACPICA: Fix compilation with bare-metal
> toolchian
>
> On Saturday, June 22, 2019 11:03:54 PM CEST Laster K. wrote:
>> An ifdef expects to be compiled with full-fledged Linux toolchain,
>> but it's common to compile kernel with just bare-metal toolchain
>> which doesn't define __linux__. So, also add __KERNEL__ check.
>>
[Moore, Robert]
This sounds OK, as long as no other supported hosts define __KERNEL__.
FreeBSD defines _KERNEL for kernel source.
I'd have to say that this sounds a bit dangerous. Is there another symbol that we can
AND into an expression?
JK
>> Signed-off-by: Laster K. (lazerl0rd)
<officiallazerl0rd(a)gmail.com>
>> ---
>> Apologies for the multiple/spammed e-mails, I was having mail client
> issues.
>>
>> include/acpi/platform/acenv.h | 2 +-
>> include/acpi/platform/acenvex.h | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/acpi/platform/acenv.h
>> b/include/acpi/platform/acenv.h index 35ab3f87cc29..b69319198cb8
>> 100644
>> --- a/include/acpi/platform/acenv.h
>> +++ b/include/acpi/platform/acenv.h
>> @@ -148,7 +148,7 @@
>>
>> #endif
>>
>> -#if defined(_LINUX) || defined(__linux__)
>> +#if defined(_LINUX) || defined(__KERNEL__) || defined(__linux__)
>> #include <acpi/platform/aclinux.h>
>>
>> #elif defined(_APPLE) || defined(__APPLE__) diff --git
>> a/include/acpi/platform/acenvex.h b/include/acpi/platform/acenvex.h
>> index 2e36c8344897..c7697a47e33f 100644
>> --- a/include/acpi/platform/acenvex.h
>> +++ b/include/acpi/platform/acenvex.h
>> @@ -19,7 +19,7 @@
>> *
>>
>> ********************************************************************
>> **
>> *******/
>>
>> -#if defined(_LINUX) || defined(__linux__)
>> +#if defined(_LINUX) || defined(__KERNEL__) || defined(__linux__)
>> #include <acpi/platform/aclinuxex.h>
>>
>> #elif defined(__DragonFly__)
>>
>
> Erik, Bob, any input here?