All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][RFC PATCH] include-what-you-use: new recipe
@ 2024-07-15 12:17 Christian Eggers
  2024-07-15 14:18 ` [oe] " Khem Raj
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Eggers @ 2024-07-15 12:17 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Christian Eggers

Based on proposal send previously here:
https://lists.yoctoproject.org/g/yocto/topic/recipe_for/83279588

This recipe depends on meta-clang, so should it be added to that layer?

Unfortunately the 'include-what-you-use' (iwyu) tool doesn't work yet.
Although I have installed nativesdk-clang (via CLANGSDK = "1") and
nativesdk-include-what-you-use packages, the C++ standard headers are
not found:

include-what-you-use --sysroot=/opt/poky/5.0.2/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-musleabi impl/Fdt.cpp
impl/Fdt.cpp:9:10: fatal error: 'cerrno' file not found
    9 | #include <cerrno>
      |          ^~~~~~~~

As iwyu uses Clang and I have no experience working with it, this is
probably only a beginner mistake. Can Clang use the C++ headers provided
by libstdc++, or do I need to install further packages?

Signed-off-by: Christian Eggers <ceggers@arri.de>
---
 .../include-what-you-use_git.bb               | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/include-what-you-use/include-what-you-use_git.bb

diff --git a/meta-oe/recipes-devtools/include-what-you-use/include-what-you-use_git.bb b/meta-oe/recipes-devtools/include-what-you-use/include-what-you-use_git.bb
new file mode 100644
index 000000000000..e7df6a834a34
--- /dev/null
+++ b/meta-oe/recipes-devtools/include-what-you-use/include-what-you-use_git.bb
@@ -0,0 +1,22 @@
+LICENSE = "NCSA"
+LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=59d01ad98720f3c50d6a8a0ef3108c88 \
+                    file://iwyu-check-license-header.py;md5=7bdb749831163fbe9232b3cb7186116f"
+
+SRC_URI = "git://github.com/include-what-you-use/include-what-you-use.git;protocol=https;branch=clang_18"
+
+PV = "0.22+git${SRCPV}"
+SRCREV = "377eaef70cdda47368939f4d9beabfabe3f628f0"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "clang"
+
+inherit cmake python3native
+
+EXTRA_OECMAKE:append:class-nativesdk = " \
+	-DCMAKE_SKIP_RPATH:BOOL=ON \
+	"
+
+FILES:${PN} += "${datadir}/${BPN}"
+
+BBCLASSEXTEND = "nativesdk"
-- 
2.44.1



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

end of thread, other threads:[~2024-07-19 15:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-15 12:17 [meta-oe][RFC PATCH] include-what-you-use: new recipe Christian Eggers
2024-07-15 14:18 ` [oe] " Khem Raj
2024-07-16  8:08   ` Christian Eggers
2024-07-16 13:45     ` Khem Raj
2024-07-16 14:57       ` Christian Eggers
2024-07-16 15:42         ` Khem Raj
2024-07-19 14:10           ` Christian Eggers
2024-07-19 15:57             ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.