tools/elfutils: install a subset of the elfutils binaries
Install binaries that are not common with binutils
instead of none at all. This adds a negligible time to the build.
Building shared libraries is disabled, so the AM_LDFLAGS can be reset
without the rpath-link option which is unrecognized by clang.
Some of the binaries depend on functions that are defined
using a "strong alias" instead of a normal definition,
but this is disabled by our patches in order to work on macOS,
so use the identical function directly instead.
Add fnmatch from gnulib with GNU extensions
which is needed for usage of the FNM_EXTMATCH flag.
Handle a "Wunused-const-variable" error with the same
preprocessor conditional used to include the function
that the variable is used in.
Ref:
f64bd4b6c ("tools/elfutils: only build required components")
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15368
Signed-off-by: Robert Marko <robimarko@gmail.com>