This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 7a935c36315 arm/clang.cmake: keep -pg out of link flags
7a935c36315 is described below
commit 7a935c36315c32b41ad5463d31337e08a47133f6
Author: hujun5 <[email protected]>
AuthorDate: Thu Sep 10 18:13:45 2026 +0800
arm/clang.cmake: keep -pg out of link flags
-pg only affects code generation, but it is collected into
NUTTX_EXTRA_FLAGS and reaches pure link steps, where clang reports it
as unused and the inherited -Werror turns that into a build error.
Signed-off-by: hujun5 <[email protected]>
---
arch/arm/src/cmake/clang.cmake | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/src/cmake/clang.cmake b/arch/arm/src/cmake/clang.cmake
index 2de4db30bed..87f12bdb04c 100644
--- a/arch/arm/src/cmake/clang.cmake
+++ b/arch/arm/src/cmake/clang.cmake
@@ -108,6 +108,7 @@ endif()
if(CONFIG_PROFILE_ALL)
add_compile_options(-pg)
+ list(APPEND COMPILE_ONLY_FLAGS -pg)
endif()
if(CONFIG_MM_UBSAN_ALL)