You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by je...@apache.org on 2020/09/21 07:16:09 UTC

[incubator-nuttx-apps] branch master updated: apps/Application.mk: fix compile assmbely error

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

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


The following commit(s) were added to refs/heads/master by this push:
     new df389bc  apps/Application.mk: fix compile assmbely error
df389bc is described below

commit df389bc3322af9e7004a855c82a10daff978c4ec
Author: ligd <li...@xiaomi.com>
AuthorDate: Fri Sep 18 18:23:39 2020 +0800

    apps/Application.mk: fix compile assmbely error
    
    Change-Id: Ia611ed0753dbfd861cc8f5e2bff71bc305a47657
---
 Application.mk | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/Application.mk b/Application.mk
index 9163b64..d1dba98 100644
--- a/Application.mk
+++ b/Application.mk
@@ -73,8 +73,8 @@ PROGNAME := $(shell echo $(PROGNAME))
 RASRCS = $(filter %.s,$(ASRCS))
 CASRCS = $(filter %.S,$(ASRCS))
 
-AOBJS = $(RASRCS:.s=$(SUFFIX)$(OBJEXT))
-AOBJS += $(CASRCS:.S=$(SUFFIX)$(OBJEXT))
+RAOBJS = $(RASRCS:.s=$(SUFFIX)$(OBJEXT))
+CAOBJS = $(CASRCS:.S=$(SUFFIX)$(OBJEXT))
 COBJS = $(CSRCS:.c=$(SUFFIX)$(OBJEXT))
 CXXOBJS = $(CXXSRCS:$(CXXEXT)=$(SUFFIX)$(OBJEXT))
 
@@ -84,7 +84,7 @@ MAINCXXOBJ = $(MAINCXXSRCS:$(CXXEXT)=$(SUFFIX)$(OBJEXT))
 MAINCOBJ = $(MAINCSRCS:.c=$(SUFFIX)$(OBJEXT))
 
 SRCS = $(ASRCS) $(CSRCS) $(CXXSRCS) $(MAINSRC)
-OBJS = $(AOBJS) $(COBJS) $(CXXOBJS)
+OBJS = $(RAOBJS) $(CAOBJS) $(COBJS) $(CXXOBJS)
 
 ifneq ($(BUILD_MODULE),y)
   OBJS += $(MAINCOBJ) $(MAINCXXOBJ)
@@ -122,7 +122,11 @@ define ELFLD
 	$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) $(ARCHCRT0OBJ) $1 $(LDLIBS) -o $2
 endef
 
-$(AOBJS): %$(SUFFIX)$(OBJEXT): $(ASRCS)
+$(RAOBJS): %$(SUFFIX)$(OBJEXT): %.s
+	$(if $(and $(CONFIG_BUILD_LOADABLE),$(AELFFLAGS)), \
+		$(call ELFASSEMBLE, $<, $@), $(call ASSEMBLE, $<, $@))
+
+$(CAOBJS): %$(SUFFIX)$(OBJEXT): %.S
 	$(if $(and $(CONFIG_BUILD_LOADABLE),$(AELFFLAGS)), \
 		$(call ELFASSEMBLE, $<, $@), $(call ASSEMBLE, $<, $@))