From 3169ae8a9f2cff48e0b1dd57eb55e12651370c51 Mon Sep 17 00:00:00 2001 From: Matthias Reichl Date: Tue, 9 Feb 2021 16:07:09 +0100 Subject: [PATCH] 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 --- config/options | 7 +++++++ packages/virtual/libc/package.mk | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/config/options b/config/options index 0dbc5cd29a..974860b1f5 100644 --- a/config/options +++ b/config/options @@ -30,6 +30,13 @@ export PROJECT="${PROJECT:-Generic}" export ARCH="${ARCH:-x86_64}" 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 . config/functions diff --git a/packages/virtual/libc/package.mk b/packages/virtual/libc/package.mk index 4535bb3088..8aae341393 100644 --- a/packages/virtual/libc/package.mk +++ b/packages/virtual/libc/package.mk @@ -12,7 +12,7 @@ PKG_DEPENDS_INIT="toolchain glibc:init" PKG_SECTION="virtual" 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_INIT+=" arm-mem:init" fi