From: Steve Sakoman <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][nanbield 09/12] cmake: Unset CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
Date: Thu, 11 Jan 2024 06:27:22 -1000 [thread overview]
Message-ID: <5599eaefee3818c865d71f5b7c3cc04fc01de848.1704990330.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1704990330.git.steve@sakoman.com>
From: Zahir Hussain <zahir.basha@kpit.com>
As discussion in [YOCTO #14717] cmake contains a OEToolchainConfig.cmake
file to configure the toolchain correctly in cross-compile build for recipes
using cmake.
The variable CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES value updates incorrectly
during do_compile the code. Due to this getting sporadic error like below,
fatal error: stdlib.h: No such file or directory
| 75 | #include_next <stdlib.h>
| | ^~~~~~~~~~
| compilation terminated.
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.
As cmake already correctly initializes the variable from environment,
So we have to unset it in the toolchain file to avoid overwriting the
variable definition again.
Signed-off-by: aszh07 <mail2szahir@gmail.com>
Signed-off-by: Zahir Hussain <zahir.basha@kpit.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5aeada5793af53e8c93940952d4f314474dca4c2)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
index d6a1e0464c..6434b27371 100644
--- a/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
+++ b/meta/recipes-devtools/cmake/cmake/OEToolchainConfig.cmake
@@ -18,3 +18,6 @@ file( GLOB toolchain_config_files "${CMAKE_CURRENT_LIST_FILE}.d/*.cmake" )
foreach(config ${toolchain_config_files})
include(${config})
endforeach()
+
+unset(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES)
+unset(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES)
--
2.34.1
next prev parent reply other threads:[~2024-01-11 16:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 16:27 [OE-core][nanbield 00/12] Patch review Steve Sakoman
2024-01-11 16:27 ` [OE-core][nanbield 01/12] shadow: Fix for CVE-2023-4641 Steve Sakoman
2024-01-11 16:27 ` [OE-core][nanbield 02/12] tiff: Backport fixes for CVE-2023-6277 Steve Sakoman
2024-01-11 16:27 ` [OE-core][nanbield 03/12] go: update 1.20.10 -> 1.20.11 Steve Sakoman
2024-01-11 16:27 ` [OE-core][nanbield 04/12] go: update 1.20.11 -> 1.20.12 Steve Sakoman
2024-01-11 16:27 ` [OE-core][nanbield 05/12] linux-firmware: Package iwlwifi .pnvm files Steve Sakoman
2024-01-11 16:27 ` [OE-core][nanbield 06/12] linux-firmware: Change bnx2 packaging Steve Sakoman
2024-01-11 16:27 ` [OE-core][nanbield 07/12] linux-firmware: Create bnx2x subpackage Steve Sakoman
2024-01-11 16:27 ` [OE-core][nanbield 08/12] documentation.conf: fix do_menuconfig description Steve Sakoman
2024-01-11 16:27 ` Steve Sakoman [this message]
2024-01-11 16:27 ` [OE-core][nanbield 10/12] avahi: update URL for new project location Steve Sakoman
2024-01-11 16:27 ` [OE-core][nanbield 11/12] zstd: fix LICENSE statement Steve Sakoman
2024-01-11 16:27 ` [OE-core][nanbield 12/12] pseudo: Update to pull in syncfs probe fix Steve Sakoman
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=5599eaefee3818c865d71f5b7c3cc04fc01de848.1704990330.git.steve@sakoman.com \
--to=steve@sakoman.com \
--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