pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: fix for cross/aarch64-none-elf-gcc



Aleksey Cheusov <vle%gmx.net@localhost> writes:

> Is the objections against the following patch?
> I'll add comments to it.
>
> diff -N patches/patch-gcc_plugin.c
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ patches/patch-gcc_plugin.c	7 Jun 2024 20:20:04 -0000
> @@ -0,0 +1,13 @@
> +$NetBSD$
> +
> +--- gcc/plugin.c.orig	2024-06-07 13:22:58.717044364 +0000
> ++++ gcc/plugin.c
> +@@ -677,6 +677,8 @@ try_init_one_plugin (struct plugin_name_
> +
> + #else // POSIX-like with dlopen()/dlsym().
> +
> ++#include <dlfcn.h>
> ++
> + /* We need a union to cast dlsym return value to a function pointer
> +    as ISO C forbids assignment between function pointer and 'void *'.
> +    Use explicit union instead of __extension__(<union_cast>) for

I keep a bookmark for POSIX and try to read that first.  dlopen may not
be used without including dlfcn.h.  So your change appears correct and
it's presumably buggy of upstream not to include it.

A link for the patch comment and to go in your upstream bug report:

  https://pubs.opengroup.org/onlinepubs/9699919799/functions/dlopen.html


Home | Main Index | Thread Index | Old Index