public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] cmake: read asm flags correctly from environment in toolchain file
@ 2022-02-14 15:38 Martin Beeger
  2022-02-14 15:43 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Beeger @ 2022-02-14 15:38 UTC (permalink / raw)
  To: openembedded-core; +Cc: Martin Beeger

As discussied in [YOCTO #14717] cmake contains a OEToolchainConfig.cmake
file to configure the toolchain correctly in cross-compile build for recipes
using cmake. The CMAKE_ASM_FLAGS are the configuration for inline assembly,
and these are set in toolchain environment via the ASMFLAGS variable.
This changes the toolchain so cmake correctly picks up the given ASMFLAGS
instead of errorneously forcing the C flags instead.

Signed-off-by: Martin Beeger <martin.beeger@online.de>
---
 meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
index 86446c3ace..3513d05b2f 100644
--- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
+++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
@@ -1,7 +1,7 @@
 set( CMAKE_SYSTEM_NAME Linux )
 set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE )
 set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS}  CACHE STRING "" FORCE )
-set( CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
+set( CMAKE_ASM_FLAGS $ENV{ASMFLAGS} CACHE STRING "" FORCE )
 set( CMAKE_SYSROOT $ENV{OECORE_TARGET_SYSROOT} )
 
 set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} )
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-07-18 16:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-14 15:38 [PATCH] cmake: read asm flags correctly from environment in toolchain file Martin Beeger
2022-02-14 15:43 ` [OE-core] " Richard Purdie
2022-02-14 16:32   ` Martin Beeger
2022-02-15 14:18     ` Peter Kjellerstedt
2022-02-15 20:25       ` Martin Beeger
2022-07-18 16:47         ` Martin Beeger
2022-07-18 16:48           ` Martin Beeger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox