config/options: add ARM_MEM_SUPPORT option to control arm-mem inclusion

Move the check if arm-mem should be included from virtual/libc
to config/options and set the ARM_MEM_SUPPORT variable accordingly.

This makes it possible to opt-out of using arm-mem which can
be helpful for performance testing and debugging (eg valgrind
doesn't play nicely with it).

Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
Matthias Reichl 2021-02-09 16:07:09 +01:00
parent 06bafb5046
commit 3169ae8a9f
2 changed files with 8 additions and 1 deletions

View File

@ -30,6 +30,13 @@ export PROJECT="${PROJECT:-Generic}"
export ARCH="${ARCH:-x86_64}" export ARCH="${ARCH:-x86_64}"
TARGET_ARCH="${ARCH}" TARGET_ARCH="${ARCH}"
# include arm-mem package on arm
if [ "${TARGET_ARCH}" = "arm" ]; then
ARM_MEM_SUPPORT="yes"
else
ARM_MEM_SUPPORT="no"
fi
# include helper functions # include helper functions
. config/functions . config/functions

View File

@ -12,7 +12,7 @@ PKG_DEPENDS_INIT="toolchain glibc:init"
PKG_SECTION="virtual" PKG_SECTION="virtual"
PKG_LONGDESC="Meta package for installing various tools and libs needed for libc" PKG_LONGDESC="Meta package for installing various tools and libs needed for libc"
if [ "${TARGET_ARCH}" = "arm" ]; then if [ "${ARM_MEM_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" arm-mem" PKG_DEPENDS_TARGET+=" arm-mem"
PKG_DEPENDS_INIT+=" arm-mem:init" PKG_DEPENDS_INIT+=" arm-mem:init"
fi fi