You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/19 14:13:22 UTC

[incubator-nuttx] branch master updated: arm hostfs: Compile only when enabled by config (#307)

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 2cd2a0a  arm hostfs: Compile only when enabled by config (#307)
2cd2a0a is described below

commit 2cd2a0af5a52e6cf3131fbefd432c77a4c917b89
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Feb 19 23:13:12 2020 +0900

    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 35d4ab4..de86975 100644
--- a/arch/arm/src/common/up_hostfs.c
+++ b/arch/arm/src/common/up_hostfs.c
@@ -46,8 +46,6 @@
 #include <syscall.h>
 #include <unistd.h>
 
-#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 a51be77..dc23061 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