summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-04-17 16:54:02 -0700
committerArmin Kuster <akuster808@gmail.com>2023-05-07 12:25:18 -0400
commitbbf09580e1e07551aff82837fdf70dd4736459a3 (patch)
tree5b9a53bfbeaa7bb96ea9fc05f755504f3ef04d15
parent46b6acbe4f3ce3262ec576c2583a76c140d9d24e (diff)
downloadmeta-openembedded-bbf09580e1e07551aff82837fdf70dd4736459a3.tar.gz
libcereal: Fix TMPDIR leaking into debug_str section
Fixes errors like File /usr/lib/libcereal/ptest/tests/.debug/test_unordered_map in package libcereal-dbg contains reference to TMPDIR Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 8eb74815c2e6ddebd7f28ff703b4b91f90b468d3) Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-support/libcereal/files/0001-doctest-Do-not-use-unnamed-class.patch38
-rw-r--r--meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb1
2 files changed, 39 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libcereal/files/0001-doctest-Do-not-use-unnamed-class.patch b/meta-oe/recipes-support/libcereal/files/0001-doctest-Do-not-use-unnamed-class.patch
new file mode 100644
index 0000000000..9396cc5d01
--- /dev/null
+++ b/meta-oe/recipes-support/libcereal/files/0001-doctest-Do-not-use-unnamed-class.patch
@@ -0,0 +1,38 @@
1From 03bbb1b055c41ec652470f775b55a7cf80d664ef Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 17 Apr 2023 16:46:12 -0700
4Subject: [PATCH] doctest: Do not use unnamed class
5
6When compiling with clang this results in emitting absolute path into
7debug info, especially .debug_str section has
8
9~(unnamed class at /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/libcereal/1.3.2+gitAUTOINC+ebef1e9298-r0/git/unittests/doctest.h:6428:5)
10(unnamed class at /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/libcereal/1.3.2+gitAUTOINC+ebef1e9298-r0/git/unittests/doctest.h:6428:5)
11
12Therefore use a name for the class instead and help get rid of this
13absolute path in debug info. This fixes
14
15File /usr/lib/libcereal/ptest/tests/.debug/test_unordered_map in package libcereal-dbg contains reference to TMPDIR
16
17Upstream-Status: Submitted [https://github.com/USCiLab/cereal/pull/788]
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 unittests/doctest.h | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/unittests/doctest.h b/unittests/doctest.h
24index cd5b44d6..e6d8f7f9 100644
25--- a/unittests/doctest.h
26+++ b/unittests/doctest.h
27@@ -6424,7 +6424,7 @@ void Context::setCout(std::ostream* out) { p->cout = out; }
28 static class DiscardOStream : public std::ostream
29 {
30 private:
31- class : public std::streambuf
32+ class discardBufStream: public std::streambuf
33 {
34 private:
35 // allowing some buffering decreases the amount of calls to overflow
36--
372.40.0
38
diff --git a/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb b/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb
index f15927554b..c5f26ecb4e 100644
--- a/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb
+++ b/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb
@@ -21,6 +21,7 @@ SRCREV = "ebef1e929807629befafbb2918ea1a08c7194554"
21SRC_URI = "git://github.com/USCiLab/cereal.git;branch=master;protocol=https \ 21SRC_URI = "git://github.com/USCiLab/cereal.git;branch=master;protocol=https \
22 file://0001-sandbox-Do-not-use-int8_t-in-std-uniform_int_distrib.patch \ 22 file://0001-sandbox-Do-not-use-int8_t-in-std-uniform_int_distrib.patch \
23 file://0001-cmake-Use-idirafter-instead-of-isystem.patch \ 23 file://0001-cmake-Use-idirafter-instead-of-isystem.patch \
24 file://0001-doctest-Do-not-use-unnamed-class.patch \
24 file://run-ptest \ 25 file://run-ptest \
25" 26"
26 27