[PATCH libevdev 5/5] Add some minimal documentation about static linking

David Herrmann dh.herrmann at gmail.com
Wed Aug 20 03:22:55 PDT 2014


Hi

On Tue, Aug 19, 2014 at 12:24 PM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> I can't recommend it, but I can't stop people from doing it, so at least
> document the ground rules.

Ugh? Why do we stop people from shooting themselves in their foot?
(regarding the whole series, not just this patch)

I'm fine with renaming symbols to something more sane (log_* to
_libevdev_log_*), but all this fake static-linking supports seems to
solve problem no-one cares about. The toolchain we use does not
provide proper support for static linking. Let those people fix the
toolchain to add symbol-visibility support for static linking, and
everything will work great. Now we just fix bugs in the wrong places.

I will not stop you from applying those patches, but I really don't
see the point.

Thanks
David

> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  libevdev/libevdev.h | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/libevdev/libevdev.h b/libevdev/libevdev.h
> index 321f980..5797190 100644
> --- a/libevdev/libevdev.h
> +++ b/libevdev/libevdev.h
> @@ -541,6 +541,20 @@ extern "C" {
>   */
>
>  /**
> + * @page static_linking Statically linking libevdev
> + *
> + * Statically linking libevdev.a is generally supported but not
> + * recommended. Symbol visibility is difficult to control in a static
> + * library, so extra care must be taken to only use symbols that are
> + * explicitly exported. libevdev's API stability guarantee only applies to
> + * those symbols.
> + *
> + * In addition to the exported symbols, libevdev reserves the
> + * <b>_libevdev_*</b> namespace. Do not use or create symbols with that
> + * prefix, they are subject to change at any time.
> + */
> +
> +/**
>   * @page testing libevdev-internal test suite
>   *
>   * libevdev's internal test suite uses the
> --
> 1.9.3
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/input-tools


More information about the Input-tools mailing list