From 4497f74a2604b0f11f234e3fe11edde907ceaa9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Sun, 2 May 2021 17:02:13 +0200 Subject: [PATCH] pulseview: Fix build with glibc 2.33 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- .../recipes-hardhelper/pulseview/pulseview.bb | 5 +- ...elow-standard-includes-to-fix-build-.patch | 83 +++++++++++++++++++ 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 recipes-misc/recipes-hardhelper/pulseview/pulseview/0001-Move-C-linking-below-standard-includes-to-fix-build-.patch diff --git a/recipes-misc/recipes-hardhelper/pulseview/pulseview.bb b/recipes-misc/recipes-hardhelper/pulseview/pulseview.bb index fdf15a47..822f2939 100644 --- a/recipes-misc/recipes-hardhelper/pulseview/pulseview.bb +++ b/recipes-misc/recipes-hardhelper/pulseview/pulseview.bb @@ -19,7 +19,10 @@ PACKAGECONFIG ??= "decode" inherit cmake_qt5 mime-xdg -SRC_URI = "git://github.com/sigrokproject/pulseview.git" +SRC_URI = " \ + git://github.com/sigrokproject/pulseview.git \ + file://0001-Move-C-linking-below-standard-includes-to-fix-build-.patch \ +" SRCREV = "89b7b94a048ec53e82f38412a4b65cabb609f395" PV = "0.4.2+git${SRCPV}" S = "${WORKDIR}/git" diff --git a/recipes-misc/recipes-hardhelper/pulseview/pulseview/0001-Move-C-linking-below-standard-includes-to-fix-build-.patch b/recipes-misc/recipes-hardhelper/pulseview/pulseview/0001-Move-C-linking-below-standard-includes-to-fix-build-.patch new file mode 100644 index 00000000..c47512a0 --- /dev/null +++ b/recipes-misc/recipes-hardhelper/pulseview/pulseview/0001-Move-C-linking-below-standard-includes-to-fix-build-.patch @@ -0,0 +1,83 @@ +From 0149150f46ac4159aa887197ea431c26b53fcd9d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Sun, 2 May 2021 14:53:39 +0200 +Subject: [PATCH] Move C linking below other includes to fix build with + latest glibc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +To be sure not to fail by other headers including standard headers move C +headers ad last position. + +Fixes: +| In file included from /home/superandy/tmp/oe-core-glibc/work/cortexa72-mortsgna-linux/pulseview/0.4.2+gitAUTOINC+89b7b94a04-r0/recipe-sysroot/usr/include/glib-2.0/glib/gatomic.h:31, +| from /home/superandy/tmp/oe-core-glibc/work/cortexa72-mortsgna-linux/pulseview/0.4.2+gitAUTOINC+89b7b94a04-r0/recipe-sysroot/usr/include/glib-2.0/glib/gthread.h:32, +| from /home/superandy/tmp/oe-core-glibc/work/cortexa72-mortsgna-linux/pulseview/0.4.2+gitAUTOINC+89b7b94a04-r0/recipe-sysroot/usr/include/glib-2.0/glib/gasyncqueue.h:32, +| from /home/superandy/tmp/oe-core-glibc/work/cortexa72-mortsgna-linux/pulseview/0.4.2+gitAUTOINC+89b7b94a04-r0/recipe-sysroot/usr/include/glib-2.0/glib.h:32, +| from /home/superandy/tmp/oe-core-glibc/work/cortexa72-mortsgna-linux/pulseview/0.4.2+gitAUTOINC+89b7b94a04-r0/recipe-sysroot/usr/include/libsigrokdecode/libsigrokdecode.h:25, +| from /home/superandy/tmp/oe-core-glibc/work/cortexa72-mortsgna-linux/pulseview/0.4.2+gitAUTOINC+89b7b94a04-r0/git/pv/data/decode/annotation.cpp:21: +| /home/superandy/tmp/oe-core-glibc/work/cortexa72-mortsgna-linux/pulseview/0.4.2+gitAUTOINC+89b7b94a04-r0/recipe-sysroot/usr/include/c++/10.3.0/type_traits:56:3: error: template with C linkage +| 56 | template +| | ^~~~~~~~ + +Signed-off-by: Andreas Müller +--- + pv/data/decode/annotation.cpp | 8 ++++---- + pv/views/trace/decodetrace.cpp | 7 ++++--- + 2 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/pv/data/decode/annotation.cpp b/pv/data/decode/annotation.cpp +index 7f233478..e689f01d 100644 +--- a/pv/data/decode/annotation.cpp ++++ b/pv/data/decode/annotation.cpp +@@ -17,10 +17,6 @@ + * along with this program; if not, see . + */ + +-extern "C" { +-#include +-} +- + #include + #include + +@@ -28,6 +24,10 @@ extern "C" { + #include + #include "pv/data/decode/rowdata.hpp" + ++extern "C" { ++#include ++} ++ + using std::vector; + + namespace pv { +diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp +index 409f1d28..060fd8d7 100644 +--- a/pv/views/trace/decodetrace.cpp ++++ b/pv/views/trace/decodetrace.cpp +@@ -17,9 +17,6 @@ + * along with this program; if not, see . + */ + +-extern "C" { +-#include +-} + + #include + #include +@@ -60,6 +57,10 @@ extern "C" { + #include + #include + ++extern "C" { ++#include ++} ++ + using std::abs; + using std::find_if; + using std::lock_guard; +-- +2.30.2 +