You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "anchao (via GitHub)" <gi...@apache.org> on 2023/04/11 15:05:32 UTC
[GitHub] [nuttx] anchao commented on a diff in pull request #8903: Fix LTO warnings with GCC 12
anchao commented on code in PR #8903:
URL: https://github.com/apache/nuttx/pull/8903#discussion_r1162961965
##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -248,6 +214,27 @@ ifeq ($(CONFIG_ARCH_TOOLCHAIN_CLANG),y)
ARCHOPTIMIZATION += -fshort-enums
endif
+# Link Time Optimization
+
+ifeq ($(CONFIG_LTO_THIN),y)
+ ARCHOPTIMIZATION += -flto=thin
+ ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y)
+ LDFLAGS += --lto
+ endif
+else ifeq ($(CONFIG_LTO_FULL),y)
+ ifeq ($(GCCVER),12.2)
+ ARCHOPTIMIZATION += -flto=auto
Review Comment:
we can skip the version check, always set -flto-auto as default
--
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