mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 06:18:40 +08:00
toolchains: Compiler versioning adds --print-memory-usage
1. The "-print-memory-usage" parameter introduced in GNU Link version 2.26 Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
parent
593b4bfbf5
commit
6381685a8b
4 changed files with 5 additions and 5 deletions
|
@ -65,6 +65,7 @@ if(CONFIG_ARCH_TOOLCHAIN_GNU AND NOT CONFIG_ARCH_TOOLCHAIN_CLANG)
|
|||
set(GCCVER ${CMAKE_MATCH_1})
|
||||
|
||||
if(GCCVER GREATER_EQUAL 12)
|
||||
add_link_options(-Wl,--print-memory-usage)
|
||||
add_compile_options(--param=min-pagesize=0)
|
||||
if(CONFIG_ARCH_RAMFUNCS OR NOT CONFIG_BOOT_RUNFROMFLASH)
|
||||
add_link_options(-Wl,--no-warn-rwx-segments)
|
||||
|
@ -229,8 +230,6 @@ if(CONFIG_DEBUG_LINK_MAP)
|
|||
add_link_options(-Wl,--cref -Wl,-Map=nuttx.map)
|
||||
endif()
|
||||
|
||||
add_link_options(-Wl,--print-memory-usage)
|
||||
|
||||
if(CONFIG_DEBUG_SYMBOLS)
|
||||
add_compile_options(${CONFIG_DEBUG_SYMBOLS_LEVEL})
|
||||
endif()
|
||||
|
|
|
@ -318,6 +318,7 @@ else
|
|||
endif
|
||||
ifeq ($(shell expr "$(GCCVER)" \>= 12), 1)
|
||||
ARCHOPTIMIZATION += --param=min-pagesize=0
|
||||
LDFLAGS += --print-memory-usage
|
||||
ifeq ($(CONFIG_ARCH_RAMFUNCS),y)
|
||||
LDFLAGS += --no-warn-rwx-segments
|
||||
else ifeq ($(CONFIG_BOOT_RUNFROMFLASH),)
|
||||
|
@ -328,8 +329,6 @@ else
|
|||
endif
|
||||
|
||||
LDFLAGS += --entry=__start
|
||||
LDFLAGS += --print-memory-usage
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
|
||||
|
|
|
@ -197,6 +197,8 @@ ifeq ($(CONFIG_ARCH_TOOLCHAIN_GNU),y)
|
|||
LDFLAGS += --no-warn-rwx-segments
|
||||
endif
|
||||
|
||||
endif
|
||||
ifeq ($(shell expr "$(GCCVER)" \>= 12), 1)
|
||||
LDFLAGS += --print-memory-usage
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -198,8 +198,8 @@ if(CONFIG_ARCH_TOOLCHAIN_GNU AND NOT CONFIG_ARCH_TOOLCHAIN_CLANG)
|
|||
set(GCCVER ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
if(GCCVER GREATER_EQUAL 12)
|
||||
add_link_options(-Wl,--print-memory-usage)
|
||||
add_link_options(-Wl,--no-warn-rwx-segments)
|
||||
endif()
|
||||
|
||||
add_link_options(-Wl,--print-memory-usage)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue