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 2020/12/16 02:56:20 UTC

[incubator-nuttx] branch master updated: boards: sabre-6quad: Update Make.defs to remove unused code

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


The following commit(s) were added to refs/heads/master by this push:
     new aa6ddf6  boards: sabre-6quad: Update Make.defs to remove unused code
aa6ddf6 is described below

commit aa6ddf6e5d86eaa504229a2dff6d923eb0912a04
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Wed Dec 16 10:21:27 2020 +0900

    boards: sabre-6quad: Update Make.defs to remove unused code
    
    Summary:
    - Add -ffunction-sections -fdata-sections to ARCHCFLAG
    - Add --gc-sections to LDFLAGS
    
    Impact:
    - sabre-6quad only
    
    Testing:
    - Tested with nsh and smp configurations
    
    Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
 boards/arm/imx6/sabre-6quad/scripts/Make.defs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/boards/arm/imx6/sabre-6quad/scripts/Make.defs b/boards/arm/imx6/sabre-6quad/scripts/Make.defs
index 311b64c..317a524 100644
--- a/boards/arm/imx6/sabre-6quad/scripts/Make.defs
+++ b/boards/arm/imx6/sabre-6quad/scripts/Make.defs
@@ -54,7 +54,7 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
 endif
 
 ARCHCPUFLAGS = -mcpu=cortex-a9 -mfpu=vfpv4-d16
-ARCHCFLAGS = -fno-builtin
+ARCHCFLAGS = -fno-builtin -ffunction-sections -fdata-sections
 ARCHCXXFLAGS = -fno-builtin -fno-exceptions -fcheck-new -fno-rtti
 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef
 ARCHWARNINGSXX = -Wall -Wshadow -Wundef
@@ -86,6 +86,8 @@ else
   LDELFFLAGS += -T $(BOARD_DIR)$(DELIM)scripts$(DELIM)gnu-elf.ld
 endif
 
+LDFLAGS += --gc-sections
+
 ifneq ($(CROSSDEV),arm-nuttx-elf-)
   LDFLAGS += -nostartfiles -nodefaultlibs
 endif