PKGNAME=valgrind
PKGSEC=devel
PKGDEP="glibc-dbg openmpi perl"
PKGDEP__RETRO="glibc-dbg perl"
PKGDES="Tool to help identify memory management problems in programs"

# Filter out some flags that cause lots of valgrind test failures.
# Also filter away -O2, valgrind adds it wherever suitable, but
# not for tests which should be -O0, as they aren't meant to be
# compiled with -O2 unless explicitely requested. Same for any -mcpu flag.
# Ideally we will change this to only be done for the non-primary build
# and the test suite.
#
# http://src.fedoraproject.org/cgit/rpms/valgrind.git/commit/?id=7a98f80d9b61ce167e4ef8129c81ed9284ecf4e1
AB_FLAGS_SPECS=0
AB_FLAGS_SSP=0
AB_FLAGS_FTF=0
NOLTO=1

AUTOTOOLS_AFTER=(
    '--with-mpicc=mpicc'
)
AUTOTOOLS_AFTER__RETRO=(
    "${AUTOTOOLS_AFTER[@]}"
    '--without-mpicc'
)

# configure: error: Unsupported host architecture. Sorry
FAIL_ARCH="@(loongarch64|loongarch64_nosimd)"
