[oe] [dunfell][PATCH v3] jsoncpp: Fix broken handling of escape characters

2020-11-10 Thread Viktor Rosendahl
Applying this backported patch from upstream fixes the following
test failure:

* Detail of EscapeSequenceTest/writeEscapeSequence test failure:
/home/viktor/jsoncpp/src/test_lib_json/main.cpp(3370): expected == result
  Expected: '["\"","\\","\b","\f","\n","\r","\t","\u0278","\ud852\udf62"]
  '
  Actual  : '["\"","\\","\b","\f","\n","\r","\t","",""]
  '

This failure only happens on architectures that use unsigned char as
default type for char. It doesn't happen on x86 because it uses signed
char by default. However, the failure can be emulated on x86 by adding
the following line to the beginning of CMakeLists.txt:

add_compile_options(-funsigned-char)

Also, there is another bug in the code that is fixed by this upstream
patch:

 "static_cast(*cur) < 0x80" should be:
 "static_cast(*cur) >= 0x80"

This patch is not needed in master or gatesgarth branches, because they
use version 1.9.3 of jsoncpp, which doesn't have the bug.

Signed-off-by: Viktor Rosendahl 
---
 ...inverted-sense-in-isAnyCharRequiredQ.patch | 49 +++
 .../recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb |  5 +-
 2 files changed, 53 insertions(+), 1 deletion(-)
 create mode 100644 
meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch

diff --git 
a/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch
 
b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch
new file mode 100644
index 0..ff03e0565
--- /dev/null
+++ 
b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch
@@ -0,0 +1,49 @@
+From 2d5a94aeeab01f0448b5a0bb8d4a9a23a5b790d5 Mon Sep 17 00:00:00 2001
+From: Andrew Childs 
+Date: Sat, 28 Dec 2019 16:04:24 +0900
+Subject: [PATCH] json_writer: fix inverted sense in isAnyCharRequiredQuoting
+ (#1120)
+
+This bug is only affects platforms where `char` is unsigned.
+
+When char is a signed type, values >= 0x80 are also considered < 0,
+and hence require escaping due to the < ' ' condition.
+
+When char is an unsigned type, values >= 0x80 match none of the
+conditions and are considered safe to emit without escaping.
+
+This shows up as a test failure:
+
+* Detail of EscapeSequenceTest/writeEscapeSequence test failure:
+/build/source/src/test_lib_json/main.cpp(3370): expected == result
+  Expected: '["\"","\\","\b","\f","\n","\r","\t","\u0278","\ud852\udf62"]
+  '
+  Actual  : '["\"","\\","\b","\f","\n","\r","\t","",""]
+  '
+Upstream-Status: Backport 
[https://github.com/open-source-parsers/jsoncpp/commit/f11611c8785082ead760494cba06196f14a06dcb]
+
+Signed-off-by: Viktor Rosendahl 
+
+---
+ src/lib_json/json_writer.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
+index 519ce23..b68a638 100644
+--- a/src/lib_json/json_writer.cpp
 b/src/lib_json/json_writer.cpp
+@@ -178,8 +178,9 @@ static bool isAnyCharRequiredQuoting(char const* s, size_t 
n) {
+ 
+   char const* const end = s + n;
+   for (char const* cur = s; cur < end; ++cur) {
+-if (*cur == '\\' || *cur == '\"' || *cur < ' ' ||
+-static_cast(*cur) < 0x80)
++if (*cur == '\\' || *cur == '\"' ||
++static_cast(*cur) < ' ' ||
++static_cast(*cur) >= 0x80)
+   return true;
+   }
+   return false;
+-- 
+2.17.1
+
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb 
b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb
index 8a5db3da3..6482a93a7 100644
--- a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb
+++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb
@@ -14,7 +14,10 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=fa2a23dd1dc6c139f35105379d76df2b"
 
 SRCREV = "d2e6a971f4544c55b8e3b25cf96db266971b778f"
-SRC_URI = "git://github.com/open-source-parsers/jsoncpp"
+SRC_URI = "\
+   git://github.com/open-source-parsers/jsoncpp \
+   
file://0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch \
+  "
 
 S = "${WORKDIR}/git"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#87883): 
https://lists.openembedded.org/g/openembedded-devel/message/87883
Mute This Topic: https://lists.openembedded.org/mt/78166143/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe] [dunfell][PATCH v2] jsoncpp: Fix broken handling of escape characters

2020-11-10 Thread Viktor Rosendahl
New in v2: I removed the unescaped characters from the quoted error
message because it seems that they broke patchwork.

Applying this backported patch from upstream fixes the following
test failure:

* Detail of EscapeSequenceTest/writeEscapeSequence test failure:
/home/viktor/jsoncpp/src/test_lib_json/main.cpp(3370): expected == result
  Expected: '["\"","\\","\b","\f","\n","\r","\t","\u0278","\ud852\udf62"]
  '
  Actual  : '["\"","\\","\b","\f","\n","\r","\t","",
  ""]
  '

This failure only happens on architectures that use unsigned char as
default type for char. It doesn't happen on x86 because it uses signed
char by default. However, the failure can be emulated on x86 by adding
the following line to the beginning of CMakeLists.txt:

add_compile_options(-funsigned-char)

Also, there is another bug in the code that is fixed by this upstream
patch:

 "static_cast(*cur) < 0x80" should be:
 "static_cast(*cur) >= 0x80"

This patch is not needed in master or gatesgarth branches, because they
use version 1.9.3 of jsoncpp, which doesn't have the bug.

Signed-off-by: Viktor Rosendahl 
---
 ...inverted-sense-in-isAnyCharRequiredQ.patch | 52 +++
 .../recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb |  5 +-
 2 files changed, 56 insertions(+), 1 deletion(-)
 create mode 100644 
meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch

diff --git 
a/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch
 
b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch
new file mode 100644
index 0..784f175ee
--- /dev/null
+++ 
b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch
@@ -0,0 +1,52 @@
+From 2d5a94aeeab01f0448b5a0bb8d4a9a23a5b790d5 Mon Sep 17 00:00:00 2001
+From: Andrew Childs 
+Date: Sat, 28 Dec 2019 16:04:24 +0900
+Subject: [PATCH] json_writer: fix inverted sense in isAnyCharRequiredQuoting
+ (#1120)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This bug is only affects platforms where `char` is unsigned.
+
+When char is a signed type, values >= 0x80 are also considered < 0,
+and hence require escaping due to the < ' ' condition.
+
+When char is an unsigned type, values >= 0x80 match none of the
+conditions and are considered safe to emit without escaping.
+
+This shows up as a test failure:
+
+* Detail of EscapeSequenceTest/writeEscapeSequence test failure:
+/build/source/src/test_lib_json/main.cpp(3370): expected == result
+  Expected: '["\"","\\","\b","\f","\n","\r","\t","\u0278","\ud852\udf62"]
+  '
+  Actual  : '["\"","\\","\b","\f","\n","\r","\t","ɸ","𤭢"]
+  '
+Upstream-Status: Backport 
[https://github.com/open-source-parsers/jsoncpp/commit/f11611c8785082ead760494cba06196f14a06dcb]
+
+Signed-off-by: Viktor Rosendahl 
+
+---
+ src/lib_json/json_writer.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
+index 519ce23..b68a638 100644
+--- a/src/lib_json/json_writer.cpp
 b/src/lib_json/json_writer.cpp
+@@ -178,8 +178,9 @@ static bool isAnyCharRequiredQuoting(char const* s, size_t 
n) {
+ 
+   char const* const end = s + n;
+   for (char const* cur = s; cur < end; ++cur) {
+-if (*cur == '\\' || *cur == '\"' || *cur < ' ' ||
+-static_cast(*cur) < 0x80)
++if (*cur == '\\' || *cur == '\"' ||
++static_cast(*cur) < ' ' ||
++static_cast(*cur) >= 0x80)
+   return true;
+   }
+   return false;
+-- 
+2.17.1
+
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb 
b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb
index 8a5db3da3..6482a93a7 100644
--- a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb
+++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb
@@ -14,7 +14,10 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=fa2a23dd1dc6c139f35105379d76df2b"
 
 SRCREV = "d2e6a971f4544c55b8e3b25cf96db266971b778f"
-SRC_URI = "git://github.com/open-source-parsers/jsoncpp"
+SRC_URI = "\
+   git://github.com/open-source-parsers/jsoncpp \
+   
file://0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch \
+  "
 
 S = "${WORKDIR}/git"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#87882): 
https://lists.openembedded.org/g/openembedded-devel/message/87882
Mute This Topic: https://lists.openembedded.org/mt/78165649/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe] [dunfell][PATCH] jsoncpp: Fix broken handling of escape characters

2020-11-10 Thread Viktor Rosendahl
Applying this backported patch from upstream fixes the following
test failure:

* Detail of EscapeSequenceTest/writeEscapeSequence test failure:
/home/viktor/jsoncpp/src/test_lib_json/main.cpp(3370): expected == result
  Expected: '["\"","\\","\b","\f","\n","\r","\t","\u0278","\ud852\udf62"]
  '
  Actual  : '["\"","\\","\b","\f","\n","\r","\t","ɸ","𤭢"]
  '

This failure only happens on architectures that use unsigned char as
default type for char. It doesn't happen on x86 because it uses signed
char by default. However, the failure can be emulated on x86 by adding
the following line to the beginning of CMakeLists.txt:

add_compile_options(-funsigned-char)

Also, there is another bug in the code that is fixed by this upstream
patch:

 "static_cast(*cur) < 0x80" should be:
 "static_cast(*cur) >= 0x80"

This patch is not needed in master or gatesgarth branches, because they
use version 1.9.3 of jsoncpp, which doesn't have the bug.

Signed-off-by: Viktor Rosendahl 
---
 ...inverted-sense-in-isAnyCharRequiredQ.patch | 52 +++
 .../recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb |  5 +-
 2 files changed, 56 insertions(+), 1 deletion(-)
 create mode 100644 
meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch

diff --git 
a/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch
 
b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch
new file mode 100644
index 0..784f175ee
--- /dev/null
+++ 
b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch
@@ -0,0 +1,52 @@
+From 2d5a94aeeab01f0448b5a0bb8d4a9a23a5b790d5 Mon Sep 17 00:00:00 2001
+From: Andrew Childs 
+Date: Sat, 28 Dec 2019 16:04:24 +0900
+Subject: [PATCH] json_writer: fix inverted sense in isAnyCharRequiredQuoting
+ (#1120)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This bug is only affects platforms where `char` is unsigned.
+
+When char is a signed type, values >= 0x80 are also considered < 0,
+and hence require escaping due to the < ' ' condition.
+
+When char is an unsigned type, values >= 0x80 match none of the
+conditions and are considered safe to emit without escaping.
+
+This shows up as a test failure:
+
+* Detail of EscapeSequenceTest/writeEscapeSequence test failure:
+/build/source/src/test_lib_json/main.cpp(3370): expected == result
+  Expected: '["\"","\\","\b","\f","\n","\r","\t","\u0278","\ud852\udf62"]
+  '
+  Actual  : '["\"","\\","\b","\f","\n","\r","\t","ɸ","𤭢"]
+  '
+Upstream-Status: Backport 
[https://github.com/open-source-parsers/jsoncpp/commit/f11611c8785082ead760494cba06196f14a06dcb]
+
+Signed-off-by: Viktor Rosendahl 
+
+---
+ src/lib_json/json_writer.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib_json/json_writer.cpp b/src/lib_json/json_writer.cpp
+index 519ce23..b68a638 100644
+--- a/src/lib_json/json_writer.cpp
 b/src/lib_json/json_writer.cpp
+@@ -178,8 +178,9 @@ static bool isAnyCharRequiredQuoting(char const* s, size_t 
n) {
+ 
+   char const* const end = s + n;
+   for (char const* cur = s; cur < end; ++cur) {
+-if (*cur == '\\' || *cur == '\"' || *cur < ' ' ||
+-static_cast(*cur) < 0x80)
++if (*cur == '\\' || *cur == '\"' ||
++static_cast(*cur) < ' ' ||
++static_cast(*cur) >= 0x80)
+   return true;
+   }
+   return false;
+-- 
+2.17.1
+
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb 
b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb
index 8a5db3da3..6482a93a7 100644
--- a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb
+++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.2.bb
@@ -14,7 +14,10 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=fa2a23dd1dc6c139f35105379d76df2b"
 
 SRCREV = "d2e6a971f4544c55b8e3b25cf96db266971b778f"
-SRC_URI = "git://github.com/open-source-parsers/jsoncpp"
+SRC_URI = "\
+   git://github.com/open-source-parsers/jsoncpp \
+   
file://0001-json_writer-fix-inverted-sense-in-isAnyCharRequiredQ.patch \
+  "
 
 S = "${WORKDIR}/git"
 
-- 
2.17.1


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#87881): 
https://lists.openembedded.org/g/openembedded-devel/message/87881
Mute This Topic: https://lists.openembedded.org/mt/78164898/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[oe] [zeus][PATCH 2/3] lcov: Add support for intermediate JSON format

2020-02-20 Thread Viktor Rosendahl
From: Viktor Rosendahl 

gcc-9 uses this intermediate JSON format, so we will need these two patches
to make lcov work again.

Signed-off-by: Viktor Rosendahl 
---
 ...Add-intermediate-text-format-support.patch | 898 ++
 ...Add-intermediate-JSON-format-support.patch | 247 +
 meta-oe/recipes-support/lcov/lcov_1.14.bb |   9 +-
 3 files changed, 1153 insertions(+), 1 deletion(-)
 create mode 100644 
meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
 create mode 100644 
meta-oe/recipes-support/lcov/files/0002-geninfo-Add-intermediate-JSON-format-support.patch

diff --git 
a/meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
 
b/meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
new file mode 100644
index 0..9ac0770f9
--- /dev/null
+++ 
b/meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
@@ -0,0 +1,898 @@
+From ec3e1f411c332cbc2f2bc7ab7e2175ebf918b37a Mon Sep 17 00:00:00 2001
+From: Peter Oberparleiter 
+Date: Fri, 24 May 2019 16:56:52 +0200
+Subject: [PATCH 1/2] geninfo: Add intermediate text format support
+
+This change adds support for parsing the output of gcov's intermediate
+text file format as implemented by GCC versions 5 to 8.  The use of the
+gcov intermediate format should increase processing speed. It also
+provides branch coverage data when using the --initial command line
+option.
+
+Users can control whether geninfo uses the intermediate format via the
+geninfo_intermediate configuration file option. Valid values are:
+
+ 0: Use normal text format
+ 1: Use intermediate format
+  auto: Use intermediate format if available. This is the default.
+
+Signed-off-by: Peter Oberparleiter 
+---
+ bin/geninfo  | 567 ---
+ lcovrc   |   3 +
+ man/lcovrc.5 |  24 +++
+ 3 files changed, 521 insertions(+), 73 deletions(-)
+
+Upstream-Status: Backport
+Download URL: 
https://github.com/linux-test-project/lcov/commit/ebfeb3e179e450c69c3532f98cd5ea1fbf6ccba7
+
+diff --git a/bin/geninfo b/bin/geninfo
+index f41eaec..027 100755
+--- a/bin/geninfo
 b/bin/geninfo
+@@ -54,6 +54,8 @@ use warnings;
+ use File::Basename; 
+ use File::Spec::Functions qw /abs2rel catdir file_name_is_absolute splitdir
+ splitpath catpath/;
++use File::Temp qw(tempfile tempdir);
++use File::Copy qw(copy);
+ use Getopt::Long;
+ use Digest::MD5 qw(md5_base64);
+ use Cwd qw/abs_path/;
+@@ -163,13 +165,13 @@ sub solve_relative_path($$);
+ sub read_gcov_header($);
+ sub read_gcov_file($);
+ sub info(@);
++sub process_intermediate($$$);
+ sub map_llvm_version($);
+ sub version_to_str($);
+ sub get_gcov_version();
+ sub system_no_output($@);
+ sub read_config($);
+ sub apply_config($);
+-sub get_exclusion_data($);
+ sub apply_exclusion_data($$);
+ sub process_graphfile($$);
+ sub filter_fn_name($);
+@@ -264,6 +266,8 @@ our $gcno_split_crc;
+ our $func_coverage = 1;
+ our $br_coverage = 0;
+ our $rc_auto_base = 1;
++our $rc_intermediate = "auto";
++our $intermediate;
+ our $excl_line = "LCOV_EXCL_LINE";
+ our $excl_br_line = "LCOV_EXCL_BR_LINE";
+ 
+@@ -331,6 +335,7 @@ if ($config || %opt_rc)
+   "geninfo_compat"=> \$opt_compat,
+   "geninfo_adjust_src_path"   => \$rc_adjust_src_path,
+   "geninfo_auto_base" => \$rc_auto_base,
++  "geninfo_intermediate"  => \$rc_intermediate,
+   "lcov_function_coverage"=> \$func_coverage,
+   "lcov_branch_coverage"  => \$br_coverage,
+   "lcov_excl_line"=> \$excl_line,
+@@ -460,15 +465,38 @@ if (system_no_output(3, $gcov_tool, "--help") == -1)
+ }
+ 
+ ($gcov_version, $gcov_version_string) = get_gcov_version();
++$gcov_caps = get_gcov_capabilities();
++
++# Determine intermediate mode
++if ($rc_intermediate eq "0") {
++  $intermediate = 0;
++} elsif ($rc_intermediate eq "1") {
++  $intermediate = 1;
++} elsif (lc($rc_intermediate) eq "auto") {
++  # Use intermediate format if supported by gcov
++  $intermediate = $gcov_caps->{'intermediate-format'} ? 1 : 0;
++} else {
++  die("ERROR: invalid value for geninfo_intermediate: ".
++  "'$rc_intermediate'\n");
++}
++
++if ($intermediate) {
++  info("Using intermediate gcov format\n");
++  if ($opt_derive_func_data) {
++  warn("WARNING: --derive-func-data is not compatible with ".
++   "intermediate format - ignoring\n");
++  $opt_derive_func_data = 0;
++  }
++}
+ 
+ # Determine gcov optio

[oe] [zeus][PATCH 0/3] Make lcov work with gcc-9 (backport)

2020-02-20 Thread Viktor Rosendahl
Hi all,

These are the patches that makes lcov work with gcc-9 that were merged into
master recently. The commits in master are:

416c4f7d5 perl: Add libperlio-gzip-perl and libjson-perl
64441dc46 lcov: Add support for intermediate JSON format
7002e7dd3 lcov: Add missing missing RDEPEND and enable nativesdk

They have the same content as the ones in master, except
that the third patch adds one additional missing RDEPEND, which was alreay
fixed in master.

best regards,

Viktor

Viktor Rosendahl (3):
  perl: Add libperlio-gzip-perl and libjson-perl
  lcov: Add support for intermediate JSON format
  lcov: Add missing missing RDEPEND and enable nativesdk

 .../perl/libjson-perl_4.02000.bb  |  22 +
 .../perl/libperlio-gzip-perl_0.20.bb  |  30 +
 ...Add-intermediate-text-format-support.patch | 898 ++
 ...Add-intermediate-JSON-format-support.patch | 247 +
 meta-oe/recipes-support/lcov/lcov_1.14.bb |  12 +-
 5 files changed, 1208 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb
 create mode 100644 meta-oe/recipes-devtools/perl/libperlio-gzip-perl_0.20.bb
 create mode 100644 
meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
 create mode 100644 
meta-oe/recipes-support/lcov/files/0002-geninfo-Add-intermediate-JSON-format-support.patch

-- 
2.17.1

-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [zeus][PATCH 3/3] lcov: Add missing missing RDEPEND and enable nativesdk

2020-02-20 Thread Viktor Rosendahl
From: Viktor Rosendahl 

It seems like geninfo is depending on perl-module-digest-md5 and
gcov-symlinks, so they should be added here. Also, lcov is useful in SDKs,
so let's enable the building of native and nativesdk packages.

Signed-off-by: Viktor Rosendahl 
---
 meta-oe/recipes-support/lcov/lcov_1.14.bb | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-oe/recipes-support/lcov/lcov_1.14.bb 
b/meta-oe/recipes-support/lcov/lcov_1.14.bb
index ac0505829..14718184b 100755
--- a/meta-oe/recipes-support/lcov/lcov_1.14.bb
+++ b/meta-oe/recipes-support/lcov/lcov_1.14.bb
@@ -10,11 +10,13 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
 RDEPENDS_${PN} += " \
 gcov \
+gcov-symlinks \
 libjson-perl \
 libperlio-gzip-perl \
 perl \
 perl-module-filehandle \
 perl-module-getopt-std \
+perl-module-digest-md5 \
 perl-module-digest-sha \
 perl-module-constant \
 perl-module-cwd \
@@ -57,3 +59,4 @@ do_install() {
 oe_runmake install PREFIX=${D}${prefix} CFG_DIR=${D}${sysconfdir}
 }
 
+BBCLASSEXTEND = "native nativesdk"
-- 
2.17.1

-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [zeus][PATCH 1/3] perl: Add libperlio-gzip-perl and libjson-perl

2020-02-20 Thread Viktor Rosendahl
From: Viktor Rosendahl 

We need to add these perl modules in order to make lcov compatible
with gcc9.

Signed-off-by: Viktor Rosendahl 
---
 .../perl/libjson-perl_4.02000.bb  | 22 ++
 .../perl/libperlio-gzip-perl_0.20.bb  | 30 +++
 2 files changed, 52 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb
 create mode 100644 meta-oe/recipes-devtools/perl/libperlio-gzip-perl_0.20.bb

diff --git a/meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb 
b/meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb
new file mode 100644
index 0..4e5a8a6ff
--- /dev/null
+++ b/meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Perl module to decode/encode json files"
+DESCRIPTION = "This package contains the JSON.pm module with friends. \
+The module implements JSON encode/decode."
+
+HOMEPAGE = "https://metacpan.org/pod/JSON";
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = 
"file://README;beginline=1171;endline=1176;md5=3be2cb8159d094768e67386c453e8bbe"
+
+DEPENDS += "perl"
+
+SRC_URI = "git://github.com/makamaka/JSON.git;protocol=https"
+
+SRCREV = "42a6324df654e92419512cee80c0b49155d9e56d"
+
+S = "${WORKDIR}/git"
+
+inherit cpan
+
+RDEPENDS_${PN} += "perl"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-oe/recipes-devtools/perl/libperlio-gzip-perl_0.20.bb 
b/meta-oe/recipes-devtools/perl/libperlio-gzip-perl_0.20.bb
new file mode 100644
index 0..ffe7a7d99
--- /dev/null
+++ b/meta-oe/recipes-devtools/perl/libperlio-gzip-perl_0.20.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Perl module to manipulate and access gzip files"
+DESCRIPTION = "This package contains the gzip.pm module with friends. \
+The module implements perlio layer for gzip."
+
+HOMEPAGE = "https://metacpan.org/pod/PerlIO::gzip";
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = 
"file://README;beginline=55;endline=61;md5=bc3da2dec1fbea59ac91172c5e0eb837"
+
+DEPENDS += "perl"
+
+SRC_URI = 
"https://cpan.metacpan.org/authors/id/N/NW/NWCLARK/PerlIO-gzip-${PV}.tar.gz";
+
+SRC_URI[md5sum] = "0393eae5d0b23df6cf40ed44af7d711c"
+SRC_URI[sha256sum] = 
"4848679a3f201e3f3b0c5f6f9526e602af52923ffa471a2a3657db786bd3bdc5"
+
+S = "${WORKDIR}/PerlIO-gzip-${PV}"
+
+EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} 
EXPATINCPATH=${STAGING_INCDIR}"
+
+inherit cpan
+
+do_compile() {
+   export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 
'libc-*.so')"
+   cpan_do_compile
+}
+
+RDEPENDS_${PN} += "perl perl-module-perlio"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.17.1

-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-oe][PATCH 0/3] Make lcov work with gcc-9

2020-02-17 Thread Viktor Rosendahl
Hi all,

I have made this patch series in order to address the issue that lcov
doesn't work with gcc-9 because it doesn't understand the fancy new JSON
format. The last patch also adds a missing dependency
and enables the building of native and nativesdk packages.

These patches are intended for master but I can also send the series
for zeus, if/when acceptable for master.

best regards,

Viktor

Viktor Rosendahl (3):
  perl: Add libperlio-gzip-perl and libjson-perl
  lcov: Add support for intermediate JSON format
  lcov: Add missing missing RDEPEND and enable nativesdk

 .../perl/libjson-perl_4.02000.bb  |  22 +
 .../perl/libperlio-gzip-perl_0.20.bb  |  30 +
 ...Add-intermediate-text-format-support.patch | 898 ++
 ...Add-intermediate-JSON-format-support.patch | 247 +
 meta-oe/recipes-support/lcov/lcov_1.14.bb |  11 +-
 5 files changed, 1207 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb
 create mode 100644 meta-oe/recipes-devtools/perl/libperlio-gzip-perl_0.20.bb
 create mode 100644 
meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
 create mode 100644 
meta-oe/recipes-support/lcov/files/0002-geninfo-Add-intermediate-JSON-format-support.patch

-- 
2.17.1

-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-oe][PATCH 1/3] perl: Add libperlio-gzip-perl and libjson-perl

2020-02-17 Thread Viktor Rosendahl
From: Viktor Rosendahl 

We need to add these perl modules in order to make lcov compatible
with gcc9.

Signed-off-by: Viktor Rosendahl 
---
 .../perl/libjson-perl_4.02000.bb  | 22 ++
 .../perl/libperlio-gzip-perl_0.20.bb  | 30 +++
 2 files changed, 52 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb
 create mode 100644 meta-oe/recipes-devtools/perl/libperlio-gzip-perl_0.20.bb

diff --git a/meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb 
b/meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb
new file mode 100644
index 0..4e5a8a6ff
--- /dev/null
+++ b/meta-oe/recipes-devtools/perl/libjson-perl_4.02000.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Perl module to decode/encode json files"
+DESCRIPTION = "This package contains the JSON.pm module with friends. \
+The module implements JSON encode/decode."
+
+HOMEPAGE = "https://metacpan.org/pod/JSON";
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = 
"file://README;beginline=1171;endline=1176;md5=3be2cb8159d094768e67386c453e8bbe"
+
+DEPENDS += "perl"
+
+SRC_URI = "git://github.com/makamaka/JSON.git;protocol=https"
+
+SRCREV = "42a6324df654e92419512cee80c0b49155d9e56d"
+
+S = "${WORKDIR}/git"
+
+inherit cpan
+
+RDEPENDS_${PN} += "perl"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-oe/recipes-devtools/perl/libperlio-gzip-perl_0.20.bb 
b/meta-oe/recipes-devtools/perl/libperlio-gzip-perl_0.20.bb
new file mode 100644
index 0..ffe7a7d99
--- /dev/null
+++ b/meta-oe/recipes-devtools/perl/libperlio-gzip-perl_0.20.bb
@@ -0,0 +1,30 @@
+SUMMARY = "Perl module to manipulate and access gzip files"
+DESCRIPTION = "This package contains the gzip.pm module with friends. \
+The module implements perlio layer for gzip."
+
+HOMEPAGE = "https://metacpan.org/pod/PerlIO::gzip";
+SECTION = "libs"
+LICENSE = "Artistic-1.0 | GPL-1.0+"
+LIC_FILES_CHKSUM = 
"file://README;beginline=55;endline=61;md5=bc3da2dec1fbea59ac91172c5e0eb837"
+
+DEPENDS += "perl"
+
+SRC_URI = 
"https://cpan.metacpan.org/authors/id/N/NW/NWCLARK/PerlIO-gzip-${PV}.tar.gz";
+
+SRC_URI[md5sum] = "0393eae5d0b23df6cf40ed44af7d711c"
+SRC_URI[sha256sum] = 
"4848679a3f201e3f3b0c5f6f9526e602af52923ffa471a2a3657db786bd3bdc5"
+
+S = "${WORKDIR}/PerlIO-gzip-${PV}"
+
+EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} 
EXPATINCPATH=${STAGING_INCDIR}"
+
+inherit cpan
+
+do_compile() {
+   export LIBC="$(find ${STAGING_DIR_TARGET}/${base_libdir}/ -name 
'libc-*.so')"
+   cpan_do_compile
+}
+
+RDEPENDS_${PN} += "perl perl-module-perlio"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.17.1

-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-oe][PATCH 3/3] lcov: Add missing missing RDEPEND and enable nativesdk

2020-02-17 Thread Viktor Rosendahl
From: Viktor Rosendahl 

It seems like geninfo is depending on gcov-symlinks, so it should be
added here. Also, lcov is useful in SDKs, so let's enable the building
of native and nativesdk packages.

Signed-off-by: Viktor Rosendahl 
---
 meta-oe/recipes-support/lcov/lcov_1.14.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta-oe/recipes-support/lcov/lcov_1.14.bb 
b/meta-oe/recipes-support/lcov/lcov_1.14.bb
index 484b1af5f..14718184b 100755
--- a/meta-oe/recipes-support/lcov/lcov_1.14.bb
+++ b/meta-oe/recipes-support/lcov/lcov_1.14.bb
@@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 
 RDEPENDS_${PN} += " \
 gcov \
+gcov-symlinks \
 libjson-perl \
 libperlio-gzip-perl \
 perl \
@@ -58,3 +59,4 @@ do_install() {
 oe_runmake install PREFIX=${D}${prefix} CFG_DIR=${D}${sysconfdir}
 }
 
+BBCLASSEXTEND = "native nativesdk"
-- 
2.17.1

-- 
___
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[oe] [meta-oe][PATCH 2/3] lcov: Add support for intermediate JSON format

2020-02-17 Thread Viktor Rosendahl
From: Viktor Rosendahl 

gcc-9 uses this intermediate JSON format, so we will need these two patches
to make lcov work again.

Signed-off-by: Viktor Rosendahl 
---
 ...Add-intermediate-text-format-support.patch | 898 ++
 ...Add-intermediate-JSON-format-support.patch | 247 +
 meta-oe/recipes-support/lcov/lcov_1.14.bb |   9 +-
 3 files changed, 1153 insertions(+), 1 deletion(-)
 create mode 100644 
meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
 create mode 100644 
meta-oe/recipes-support/lcov/files/0002-geninfo-Add-intermediate-JSON-format-support.patch

diff --git 
a/meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
 
b/meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
new file mode 100644
index 0..9ac0770f9
--- /dev/null
+++ 
b/meta-oe/recipes-support/lcov/files/0001-geninfo-Add-intermediate-text-format-support.patch
@@ -0,0 +1,898 @@
+From ec3e1f411c332cbc2f2bc7ab7e2175ebf918b37a Mon Sep 17 00:00:00 2001
+From: Peter Oberparleiter 
+Date: Fri, 24 May 2019 16:56:52 +0200
+Subject: [PATCH 1/2] geninfo: Add intermediate text format support
+
+This change adds support for parsing the output of gcov's intermediate
+text file format as implemented by GCC versions 5 to 8.  The use of the
+gcov intermediate format should increase processing speed. It also
+provides branch coverage data when using the --initial command line
+option.
+
+Users can control whether geninfo uses the intermediate format via the
+geninfo_intermediate configuration file option. Valid values are:
+
+ 0: Use normal text format
+ 1: Use intermediate format
+  auto: Use intermediate format if available. This is the default.
+
+Signed-off-by: Peter Oberparleiter 
+---
+ bin/geninfo  | 567 ---
+ lcovrc   |   3 +
+ man/lcovrc.5 |  24 +++
+ 3 files changed, 521 insertions(+), 73 deletions(-)
+
+Upstream-Status: Backport
+Download URL: 
https://github.com/linux-test-project/lcov/commit/ebfeb3e179e450c69c3532f98cd5ea1fbf6ccba7
+
+diff --git a/bin/geninfo b/bin/geninfo
+index f41eaec..027 100755
+--- a/bin/geninfo
 b/bin/geninfo
+@@ -54,6 +54,8 @@ use warnings;
+ use File::Basename; 
+ use File::Spec::Functions qw /abs2rel catdir file_name_is_absolute splitdir
+ splitpath catpath/;
++use File::Temp qw(tempfile tempdir);
++use File::Copy qw(copy);
+ use Getopt::Long;
+ use Digest::MD5 qw(md5_base64);
+ use Cwd qw/abs_path/;
+@@ -163,13 +165,13 @@ sub solve_relative_path($$);
+ sub read_gcov_header($);
+ sub read_gcov_file($);
+ sub info(@);
++sub process_intermediate($$$);
+ sub map_llvm_version($);
+ sub version_to_str($);
+ sub get_gcov_version();
+ sub system_no_output($@);
+ sub read_config($);
+ sub apply_config($);
+-sub get_exclusion_data($);
+ sub apply_exclusion_data($$);
+ sub process_graphfile($$);
+ sub filter_fn_name($);
+@@ -264,6 +266,8 @@ our $gcno_split_crc;
+ our $func_coverage = 1;
+ our $br_coverage = 0;
+ our $rc_auto_base = 1;
++our $rc_intermediate = "auto";
++our $intermediate;
+ our $excl_line = "LCOV_EXCL_LINE";
+ our $excl_br_line = "LCOV_EXCL_BR_LINE";
+ 
+@@ -331,6 +335,7 @@ if ($config || %opt_rc)
+   "geninfo_compat"=> \$opt_compat,
+   "geninfo_adjust_src_path"   => \$rc_adjust_src_path,
+   "geninfo_auto_base" => \$rc_auto_base,
++  "geninfo_intermediate"  => \$rc_intermediate,
+   "lcov_function_coverage"=> \$func_coverage,
+   "lcov_branch_coverage"  => \$br_coverage,
+   "lcov_excl_line"=> \$excl_line,
+@@ -460,15 +465,38 @@ if (system_no_output(3, $gcov_tool, "--help") == -1)
+ }
+ 
+ ($gcov_version, $gcov_version_string) = get_gcov_version();
++$gcov_caps = get_gcov_capabilities();
++
++# Determine intermediate mode
++if ($rc_intermediate eq "0") {
++  $intermediate = 0;
++} elsif ($rc_intermediate eq "1") {
++  $intermediate = 1;
++} elsif (lc($rc_intermediate) eq "auto") {
++  # Use intermediate format if supported by gcov
++  $intermediate = $gcov_caps->{'intermediate-format'} ? 1 : 0;
++} else {
++  die("ERROR: invalid value for geninfo_intermediate: ".
++  "'$rc_intermediate'\n");
++}
++
++if ($intermediate) {
++  info("Using intermediate gcov format\n");
++  if ($opt_derive_func_data) {
++  warn("WARNING: --derive-func-data is not compatible with ".
++   "intermediate format - ignoring\n");
++  $opt_derive_func_data = 0;
++  }
++}
+ 
+ # Determine gcov optio