ACK: [PATCH] acpica: fwts_acpica: fix linker issues on Fedora (LP: #1712572)
ivanhu
ivan.hu at canonical.com
Wed Aug 30 05:41:37 UTC 2017
On 08/29/2017 11:04 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> When building for ppcC64el on Fedora we get linker issues with
> undefined symbols. It seems that while this is not an issue on
> Debian systems, the linker seems to require these sysbols to be
> defined even if we don't actually use them. Make these functions
> void no-ops that throw warnings if they are used. This has been
> tested on Fedora 25 and also Ubuntu and is able to build and
> pass the regression tests.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpica/fwts_acpica.c | 36 ++++++++++++++++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
> diff --git a/src/acpica/fwts_acpica.c b/src/acpica/fwts_acpica.c
> index b85e18d6..b0cefe73 100644
> --- a/src/acpica/fwts_acpica.c
> +++ b/src/acpica/fwts_acpica.c
> @@ -1326,4 +1326,40 @@ fwts_list *fwts_acpica_get_object_names(int type)
> return list;
> }
>
> +#else
> +
> +static void __void_func(const char *funcname)
> +{
> + fprintf(stderr, "fwts ACPICA library: unexpected call to %s()\n", funcname);
> + exit(EXIT_FAILURE);
> +}
> +
> +#define VOID_FUNC(name) void name(void) { __void_func(#name); }
> +
> +/*
> + * With ACPI disabled, these functions should never
> + * be called. We should defined this otherwise we will
> + * get linker errors with some autotools/linker combos
> + */
> +VOID_FUNC(AcpiGbl_IgnoreErrors)
> +VOID_FUNC(AcpiGbl_RegionFillValue)
> +
> +VOID_FUNC(AcpiOsCreateSemaphore)
> +VOID_FUNC(AcpiOsDeleteSemaphore)
> +VOID_FUNC(AcpiOsExecute)
> +VOID_FUNC(AcpiOsGetRootPointer)
> +VOID_FUNC(AcpiOsPrintf)
> +VOID_FUNC(AcpiOsReadPciConfiguration)
> +VOID_FUNC(AcpiOsReadPort)
> +VOID_FUNC(AcpiOsSignal)
> +VOID_FUNC(AcpiOsSignalSemaphore)
> +VOID_FUNC(AcpiOsSleep)
> +VOID_FUNC(AcpiOsVprintf)
> +VOID_FUNC(AcpiOsWaitSemaphore)
> +
> +VOID_FUNC(AeTableOverride)
> +
> +VOID_FUNC(MpSaveGpioInfo)
> +VOID_FUNC(MpSaveSerialInfo)
> +
> #endif
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list