PKGNAME=elfutils
PKGSEC=utils
PKGDEP="bzip2 curl libarchive libmicrohttpd xz zlib zstd"
PKGDES="Libraries and utilities to handle ELF object files and DWARF debugging information"

ABTYPE=autotools
# Note:  --disable-thread-safety, this option causes poor and inconsistent
#        performance when running Pahole across multiple cores. This feature
#        is also marked as EXPERIMENTAL.
#
#        Ref: https://sourceware.org/git/?p=elfutils.git;a=blob;f=configure.ac;h=af5b6bf77dd2bd17fb4bb0695e83e55c6ffbbef9;hb=HEAD#l80
#
# Note:  --with-biarch, enable biarch tests despite build problems.
#
# Note:  --disable-install-elfh, elf.h is provided by Glibc.
#
# FIXME: --disable-debugpred, enabling this option results in linkage failure
#        as follows...
#
#     relocation R_X86_64_32 against `predict_data' can not be used when making
#     a PIE object
AUTOTOOLS_AFTER=(
    '--program-prefix=eu-'
    '--enable-deterministic-archives'
    '--disable-thread-safety'
    '--enable-largefile'
    '--disable-debugpred'
    '--disable-gprof'
    '--disable-gcov'
    '--disable-sanitize-undefined'
    '--disable-sanitize-address'
    '--disable-valgrind'
    '--disable-valgrind-annotations'
    '--disable-install-elfh'
    '--disable-textrelcheck'
    '--enable-symbol-versioning'
    '--enable-nls'
    '--disable-rpath'
    '--enable-libdebuginfod'
    '--enable-debuginfod'
    '--without-valgrind'
    '--with-zlib'
    '--with-bzlib'
    '--with-lzma'
    '--with-zstd'
    '--without-biarch'
)

NOSTATIC=0
NOSTATIC__RETRO=1

PKGCONFL="libelf"
PKGBREAK="libelf libdwarf<=20180706"
PKGREP="libelf libdwarf<=20180706"

# Needed by Afterglow, whereas FAIL_ARCH defaults to mainline-only.
FAIL_ARCH="!(mainline|retro)"
