You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/01/29 18:40:14 UTC

[incubator-nuttx] 02/07: board/arm/imxrt: the request for map file in Make.defs LDFLAGS results in absolute path in export target.

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

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

commit d77fe3390fff6ec2c18cf0a3dbf1841dd32e3d94
Author: Pavel Pisa <pp...@pikron.com>
AuthorDate: Wed Jan 20 19:09:54 2021 +0100

    board/arm/imxrt: the request for map file in Make.defs LDFLAGS results in absolute path in export target.
    
    The BSP MAke.defs line
    
      LDFLAGS += -Map=$(TOPDIR)/nuttx.map
    
    results  in absolute path in nuttx-export/scripts/Make.defs
    which would mean that each application rebuild would attempt
    to modify file inside original build of NuttX system.
    
    Even worse, it prevents linking by GCC, because -Map=xxx/nuttx.map
    works directly in LD, it would require -Wl,-Map= for GCC.
    
    Fixed name of map file prevents to define map file by build
    system using exported NuttX libraries and link kit.
    
    Change is done to allow OMK template based applications
    development for another NuttX BSP
    
      https://github.com/ppisa/nuttx-devel/tree/master/nuttx-omk-template
    
    Signed-off-by: Pavel Pisa <pp...@pikron.com>
---
 boards/arm/imxrt/teensy-4.x/scripts/Make.defs | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/boards/arm/imxrt/teensy-4.x/scripts/Make.defs b/boards/arm/imxrt/teensy-4.x/scripts/Make.defs
index 2757a0e..918effc 100644
--- a/boards/arm/imxrt/teensy-4.x/scripts/Make.defs
+++ b/boards/arm/imxrt/teensy-4.x/scripts/Make.defs
@@ -85,11 +85,6 @@ endif
 
 ifneq ($(CROSSDEV),arm-nuttx-elf-)
   LDFLAGS += -nostartfiles -nodefaultlibs
-ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
-  LDFLAGS += -Map="${shell cygpath -w $(TOPDIR)/nuttx.map}"
-else
-  LDFLAGS += -Map=$(TOPDIR)/nuttx.map
-endif
 endif
 ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
   LDFLAGS += -g