[PATCH 0/5] Remove support for old FreeBSD hosts

John Baldwin jhb@FreeBSD.org
Thu Sep 10 19:56:33 GMT 2020


On 9/10/20 5:24 AM, Simon Marchi wrote:
> I think it would be ok to have checks only in gdbsupport/common.m4.  But I
> think it would be clearer to separate the two concerns:
> 
> - which of -lutil and -lutil-freebsd should be added to LIBS?
> - should HAVE_KINFO_GETFILE be defined?
> 
> So I would perhaps write it like this, even if it's a bit redundant:
> 
>   # On FreeBSD we may need libutil for the kinfo_get* functions.  On
>   # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
>   # Figure out which one to use.
>   AC_SEARCH_LIBS(kinfo_getfile, util util-freebsd)
> 
>   # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
>   AC_CHECK_FUNCS(kinfo_getfile)
> 
> But really I think any way would be fine, as long as it's properly
> documented / commented.

I like this and I'll post a v2 with that in a bit once my test
build has finished.

-- 
John Baldwin


More information about the Gdb-patches mailing list