tools/elfutils: install a subset of the elfutils binaries
authorMichael Pratt <mcpratt@pm.me>
Wed, 1 May 2024 19:21:38 +0000 (15:21 -0400)
committerRobert Marko <robimarko@gmail.com>
Fri, 31 May 2024 14:01:43 +0000 (16:01 +0200)
commit7822908bf313e1e0f1ae76d92588063160e94be2
tree99e15a227110f597110f31f4d47c3e13952f8cc9
parent37f20d8c34f04253037c03513e3a4d67b5f242da
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>
tools/elfutils/Makefile
tools/elfutils/patches/100-portability.patch