diff mbox series

acpica: fix linking issues when building non ACPI builds

Message ID 20180116225208.4633-1-colin.king@canonical.com
State Accepted
Headers show
Series acpica: fix linking issues when building non ACPI builds | expand

Commit Message

Colin Ian King Jan. 16, 2018, 10:52 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

It appears that building with older versions of gcc with ACPI disabled
causes a linking problem as the symbol AcpiGbl_AbortLoopOnTimeout is
not available.  The current workaround defines it as a unsigned char
type (same as ACPI's BOOLEAN) even though we never actually use it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpica/fwts_acpica.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Alex Hung Jan. 18, 2018, 3:55 a.m. UTC | #1
On 2018-01-16 02:52 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> It appears that building with older versions of gcc with ACPI disabled
> causes a linking problem as the symbol AcpiGbl_AbortLoopOnTimeout is
> not available.  The current workaround defines it as a unsigned char
> type (same as ACPI's BOOLEAN) even though we never actually use it.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpica/fwts_acpica.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/src/acpica/fwts_acpica.c b/src/acpica/fwts_acpica.c
> index b7d2f861..89beecc0 100644
> --- a/src/acpica/fwts_acpica.c
> +++ b/src/acpica/fwts_acpica.c
> @@ -1363,4 +1363,10 @@ VOID_FUNC(AeTableOverride)
>   VOID_FUNC(MpSaveGpioInfo)
>   VOID_FUNC(MpSaveSerialInfo)
>   
> +/*
> + * We need this otherwise gcc 4.5 ends up with a linker failure
> + * when building with ACPI disabled and I have no idea why.
> + */
> +unsigned char AcpiGbl_AbortLoopOnTimeout = FALSE;
> +
>   #endif
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu Jan. 22, 2018, 9:32 a.m. UTC | #2
On 01/17/2018 06:52 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> It appears that building with older versions of gcc with ACPI disabled
> causes a linking problem as the symbol AcpiGbl_AbortLoopOnTimeout is
> not available.  The current workaround defines it as a unsigned char
> type (same as ACPI's BOOLEAN) even though we never actually use it.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpica/fwts_acpica.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/src/acpica/fwts_acpica.c b/src/acpica/fwts_acpica.c
> index b7d2f861..89beecc0 100644
> --- a/src/acpica/fwts_acpica.c
> +++ b/src/acpica/fwts_acpica.c
> @@ -1363,4 +1363,10 @@ VOID_FUNC(AeTableOverride)
>  VOID_FUNC(MpSaveGpioInfo)
>  VOID_FUNC(MpSaveSerialInfo)
>  
> +/*
> + * We need this otherwise gcc 4.5 ends up with a linker failure
> + * when building with ACPI disabled and I have no idea why.
> + */
> +unsigned char AcpiGbl_AbortLoopOnTimeout = FALSE;
> +
>  #endif

Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox series

Patch

diff --git a/src/acpica/fwts_acpica.c b/src/acpica/fwts_acpica.c
index b7d2f861..89beecc0 100644
--- a/src/acpica/fwts_acpica.c
+++ b/src/acpica/fwts_acpica.c
@@ -1363,4 +1363,10 @@  VOID_FUNC(AeTableOverride)
 VOID_FUNC(MpSaveGpioInfo)
 VOID_FUNC(MpSaveSerialInfo)
 
+/*
+ * We need this otherwise gcc 4.5 ends up with a linker failure
+ * when building with ACPI disabled and I have no idea why.
+ */
+unsigned char AcpiGbl_AbortLoopOnTimeout = FALSE;
+
 #endif