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/09/26 06:40:43 UTC

[GitHub] [incubator-nuttx] anchao commented on a diff in pull request #7187: arm/armlink: add support of link time optimization(lto)

anchao commented on code in PR #7187:
URL: https://github.com/apache/incubator-nuttx/pull/7187#discussion_r979608681


##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -220,9 +226,10 @@ ifneq ($(CONFIG_CXX_RTTI),y)
 endif
 
 ARCHOPTIMIZATION += -fno-common -Wall -Wshadow -Wundef
-ARCHOPTIMIZATION += -nostdlib
 
-ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),)
+ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y)
+  ARCHOPTIMIZATION += -nostdlib

Review Comment:
   Yes, this is a regression issue, PR https://github.com/apache/incubator-nuttx/pull/7100 added this option but non-armclang toolchains need to use the standard system startup files or libraries, this change will broken GCC compiler if enable -flto.



-- 
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