From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Martin Beeger <martin.beeger@online.de>,
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] cmake: read asm flags correctly from environment in toolchain file
Date: Mon, 14 Feb 2022 15:43:20 +0000 [thread overview]
Message-ID: <ba611eefa813d1edeccea304b96937943113270e.camel@linuxfoundation.org> (raw)
In-Reply-To: <20220214153807.21216-1-martin.beeger@online.de>
On Mon, 2022-02-14 at 16:38 +0100, Martin Beeger wrote:
> 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} )
I'm a little more puzzled on this one since whilst we set CFLAGS and CXXFLAGS in
bitbake.conf, we don't set ASMFLAGS and it wouldn't be present in our
environment.
Perhaps this should be $ENV{CFLAGS} instead of ${CMAKE_C_FLAGS}? There are flags
in our CFLAGS which like need to be passed to the assembler too?
Cheers,
Richard
next prev parent reply other threads:[~2022-02-14 15:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 15:38 [PATCH] cmake: read asm flags correctly from environment in toolchain file Martin Beeger
2022-02-14 15:43 ` Richard Purdie [this message]
2022-02-14 16:32 ` [OE-core] " 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ba611eefa813d1edeccea304b96937943113270e.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=martin.beeger@online.de \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox