From 2cd2a0af5a52e6cf3131fbefd432c77a4c917b89 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 19 Feb 2020 23:13:12 +0900 Subject: [PATCH] arm hostfs: Compile only when enabled by config (#307) * arch/arm/src/tiva/Make.defs: Compile only when enabled by configuration CONFIG_ARM_SEMIHOSTING_HOSTFS * arch/arm/src/common/up_hostfs.c: Remove the ifdef conditional because it's redundant with the make logic. --- arch/arm/src/common/up_hostfs.c | 4 ---- arch/arm/src/tiva/Make.defs | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/common/up_hostfs.c b/arch/arm/src/common/up_hostfs.c index 35d4ab4e11..de86975d68 100644 --- a/arch/arm/src/common/up_hostfs.c +++ b/arch/arm/src/common/up_hostfs.c @@ -46,8 +46,6 @@ #include #include -#ifdef CONFIG_ARM_SEMIHOSTING_HOSTFS - /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -328,5 +326,3 @@ int host_stat(const char *path, struct stat *buf) return ret; } - -#endif diff --git a/arch/arm/src/tiva/Make.defs b/arch/arm/src/tiva/Make.defs index a51be77dbc..dc230618d7 100644 --- a/arch/arm/src/tiva/Make.defs +++ b/arch/arm/src/tiva/Make.defs @@ -53,7 +53,10 @@ CMN_CSRCS += up_releasepending.c up_releasestack.c up_reprioritizertr.c CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_stackframe.c CMN_CSRCS += up_svcall.c up_trigger_irq.c up_unblocktask.c up_udelay.c CMN_CSRCS += up_usestack.c up_vfork.c -CMN_CSRCS += up_hostfs.c + +ifeq ($(CONFIG_ARM_SEMIHOSTING_HOSTFS),y) + CMN_CSRCS += up_hostfs.c +endif ifneq ($(CONFIG_ARCH_IDLE_CUSTOM),y) CMN_CSRCS += up_idle.c