You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/04/24 23:13:53 UTC
[GitHub] [incubator-nuttx] yamt commented on a diff in pull request #6123: arch/arm: add support for GCC LTO
yamt commented on code in PR #6123:
URL: https://github.com/apache/incubator-nuttx/pull/6123#discussion_r857190250
##########
arch/arm/src/arm/Toolchain.defs:
##########
@@ -113,15 +113,28 @@ endif
# Default toolchain
-CC = $(CROSSDEV)gcc
-CXX = $(CROSSDEV)g++
-CPP = $(CROSSDEV)gcc -E -P -x c
-LD = $(CROSSDEV)ld
-STRIP = $(CROSSDEV)strip --strip-unneeded
-AR = $(CROSSDEV)ar rcs
-NM = $(CROSSDEV)nm
+CC = $(CROSSDEV)gcc
+CXX = $(CROSSDEV)g++
+CPP = $(CROSSDEV)gcc -E -P -x c
+STRIP = $(CROSSDEV)strip --strip-unneeded
OBJCOPY = $(CROSSDEV)objcopy
OBJDUMP = $(CROSSDEV)objdump
+LD = $(CROSSDEV)ld
+AR = $(CROSSDEV)ar rcs
+NM = $(CROSSDEV)nm
+
+# Link Time Optimization
+
+ifeq ($(CONFIG_LTO_FULL),y)
+ MAXOPTIMIZATION += -flto
+ ifeq ($(CONFIG_ARM_TOOLCHAIN),GNU_EABI)
+ MAXOPTIMIZATION += -fuse-linker-plugin
+ MAXOPTIMIZATION += -fno-builtin
+ LD := $(CROSSDEV)gcc
Review Comment:
i will take a look. hopefully today.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org