diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-11-13 00:12:04 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-11-13 00:16:50 -0800 |
commit | d7b8a3171c04b4364f7af38963517982b2d6ce60 (patch) | |
tree | aa384b485583a6215b62a84e702a7499c7140a5a | |
parent | f1109887083d97365e3e0c292a76cb0195af269d (diff) | |
download | meta-openembedded-d7b8a3171c04b4364f7af38963517982b2d6ce60.tar.gz |
cannelloni: Fix build with clang and libc++ runtime
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2 files changed, 40 insertions, 1 deletions
diff --git a/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-include-bits-stdc-.h-only-when-using-libstdc.patch b/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-include-bits-stdc-.h-only-when-using-libstdc.patch new file mode 100644 index 000000000..71f447c94 --- /dev/null +++ b/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-include-bits-stdc-.h-only-when-using-libstdc.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 7aed36765ae44b41ede7e139da0a11b3696f2e06 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 13 Nov 2023 00:07:23 -0800 | ||
4 | Subject: [PATCH] include bits/stdc++.h only when using libstdc++ | ||
5 | |||
6 | We have other c++ runtime implementations e.g. llvm's libc++ which does | ||
7 | not provide this header bits/stdc++.h, therefore make sure that this | ||
8 | header is only included when using libstdc++ | ||
9 | |||
10 | Fixes | ||
11 | | /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/cannelloni/1.1.0/git/tcpthread.cpp:27:10: fatal error: 'bits/stdc++.h' file not found | ||
12 | | 27 | #include <bits/stdc++.h> | ||
13 | | | ^~~~~~~~~~~~~~~ | ||
14 | |||
15 | Upstream-Status: Submitted [https://github.com/mguentner/cannelloni/pull/56] | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | tcpthread.cpp | 2 ++ | ||
19 | 1 file changed, 2 insertions(+) | ||
20 | |||
21 | diff --git a/tcpthread.cpp b/tcpthread.cpp | ||
22 | index a1b3047..bb5a7b2 100644 | ||
23 | --- a/tcpthread.cpp | ||
24 | +++ b/tcpthread.cpp | ||
25 | @@ -24,7 +24,9 @@ | ||
26 | #include <cstdint> | ||
27 | #include <cstdio> | ||
28 | |||
29 | +#ifdef __GLIBCXX__ | ||
30 | #include <bits/stdc++.h> | ||
31 | +#endif | ||
32 | |||
33 | #include <linux/can.h> | ||
34 | #include <string.h> | ||
35 | -- | ||
36 | 2.42.1 | ||
37 | |||
diff --git a/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.1.0.bb b/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.1.0.bb index fb457dc03..dfa7437ba 100644 --- a/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.1.0.bb +++ b/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.1.0.bb | |||
@@ -2,7 +2,9 @@ SUMMARY = "a SocketCAN over Ethernet tunnel" | |||
2 | HOMEPAGE = "https://github.com/mguentner/cannelloni" | 2 | HOMEPAGE = "https://github.com/mguentner/cannelloni" |
3 | LICENSE = "GPL-2.0-only" | 3 | LICENSE = "GPL-2.0-only" |
4 | 4 | ||
5 | SRC_URI = "git://github.com/mguentner/cannelloni.git;protocol=https;branch=master" | 5 | SRC_URI = "git://github.com/mguentner/cannelloni.git;protocol=https;branch=master \ |
6 | file://0001-include-bits-stdc-.h-only-when-using-libstdc.patch \ | ||
7 | " | ||
6 | SRCREV = "3d4fb8c8b07f6d7c62b2bdad7e5a94de61c9a29b" | 8 | SRCREV = "3d4fb8c8b07f6d7c62b2bdad7e5a94de61c9a29b" |
7 | 9 | ||
8 | LIC_FILES_CHKSUM = "file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" | 10 | LIC_FILES_CHKSUM = "file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" |