All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: buildroot@buildroot.org
Cc: "Yann E . MORIN" <yann.morin.1998@free.fr>,
	Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: [Buildroot] [PATCH 1/1] package/snappy: bump to version 1.1.9
Date: Tue, 11 Jan 2022 23:41:56 +0100	[thread overview]
Message-ID: <20220111224156.2800195-1-fontaine.fabrice@gmail.com> (raw)

- Disable benchmarks through option added by
  https://github.com/google/snappy/commit/4ebd8b2f23dd4ab67ca695256a128cd796d39ce6
- Update indentation in hash file (two spaces)

https://github.com/google/snappy/releases/tag/1.1.9

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-with-SNAPPY_ATTRIBUTE_ALWAYS_INLINE.patch | 71 +++++++++++++++++++
 package/snappy/snappy.hash                    |  4 +-
 package/snappy/snappy.mk                      |  4 +-
 3 files changed, 75 insertions(+), 4 deletions(-)
 create mode 100644 package/snappy/0001-Add-inline-with-SNAPPY_ATTRIBUTE_ALWAYS_INLINE.patch

diff --git a/package/snappy/0001-Add-inline-with-SNAPPY_ATTRIBUTE_ALWAYS_INLINE.patch b/package/snappy/0001-Add-inline-with-SNAPPY_ATTRIBUTE_ALWAYS_INLINE.patch
new file mode 100644
index 0000000000..bd2ef07794
--- /dev/null
+++ b/package/snappy/0001-Add-inline-with-SNAPPY_ATTRIBUTE_ALWAYS_INLINE.patch
@@ -0,0 +1,71 @@
+From 0c716d435abe65250100c2caea0e5126ac4e14bd Mon Sep 17 00:00:00 2001
+From: "Georgi D. Sotirov" <gdsotirov@gmail.com>
+Date: Wed, 5 May 2021 14:16:46 +0300
+Subject: [PATCH] Add inline with SNAPPY_ATTRIBUTE_ALWAYS_INLINE
+
+Add inline with SNAPPY_ATTRIBUTE_ALWAYS_INLINE on AdvanceToNextTag to
+fix the following compilation errors and a warning with GCC:
+
+[  2%] Building CXX object CMakeFiles/snappy.dir/snappy.cc.o
+/usr/bin/c++   -DHAVE_CONFIG_H -Dsnappy_EXPORTS
+-I/tmp/snappy-1.1.9/build -I/tmp/snappy-1.1.9  -O3
+-march=i586 -mtune=i686 -Wall -Wextra -fno-exceptions -fno-rtti -O3
+-DNDEBUG -fPIC   -std=c++11 -o CMakeFiles/snappy.dir/snappy.cc.o -c
+/tmp/snappy-1.1.9/snappy.cc
+/tmp/snappy-1.1.9/snappy.cc:1017:8: warning: always_inline
+function might not be inlinable [-Wattributes]
+ size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
+        ^
+/tmp/snappy-1.1.9/snappy.cc: In function 'std::pair<const
+unsigned char*, int> snappy::DecompressBranchless(const uint8_t*, const
+uint8_t*, ptrdiff_t, T, ptrdiff_t) [with T = char*; uint8_t = unsigned
+char; ptrdiff_t = int]':
+/tmp/snappy-1.1.9/snappy.cc:1017:8: error: inlining failed in
+call to always_inline 'size_t snappy::AdvanceToNextTag(const uint8_t**,
+size_t*)': function body can be overwritten at link time
+/tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here
+         size_t tag_type = AdvanceToNextTag(&ip, &tag);
+                                                     ^
+/tmp/snappy-1.1.9/snappy.cc:1017:8: error: inlining failed in
+call to always_inline 'size_t snappy::AdvanceToNextTag(const uint8_t**,
+size_t*)': function body can be overwritten at link time
+ size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
+        ^
+/tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here
+         size_t tag_type = AdvanceToNextTag(&ip, &tag);
+                                                     ^
+/tmp/snappy-1.1.9/snappy.cc:1017:8: error: inlining failed in
+call to always_inline 'size_t snappy::AdvanceToNextTag(const uint8_t**,
+size_t*)': function body can be overwritten at link time
+ size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
+        ^
+/tmp/snappy-1.1.9/snappy.cc:1097:53: error: called from here
+         size_t tag_type = AdvanceToNextTag(&ip, &tag);
+                                                     ^
+CMakeFiles/snappy.dir/build.make:137: recipe for target
+'CMakeFiles/snappy.dir/snappy.cc.o' failed
+
+Just like with other functions using SNAPPY_ATTRIBUTE_ALWAYS_INLINE
+macro (i.e. __attribute__((always_inline)) ) it is necessary to use C++
+inline specifier.
+
+[Retrieved from:
+https://github.com/google/snappy/pull/128/commits/0c716d435abe65250100c2caea0e5126ac4e14bd]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ snappy.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/snappy.cc b/snappy.cc
+index 79dc0e8d..51157be2 100644
+--- a/snappy.cc
++++ b/snappy.cc
+@@ -1014,7 +1014,7 @@ void MemMove(ptrdiff_t dst, const void* src, size_t size) {
+ }
+ 
+ SNAPPY_ATTRIBUTE_ALWAYS_INLINE
+-size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
++inline size_t AdvanceToNextTag(const uint8_t** ip_p, size_t* tag) {
+   const uint8_t*& ip = *ip_p;
+   // This section is crucial for the throughput of the decompression loop.
+   // The latency of an iteration is fundamentally constrained by the
diff --git a/package/snappy/snappy.hash b/package/snappy/snappy.hash
index c08c5b7fe4..b49b0e7e3b 100644
--- a/package/snappy/snappy.hash
+++ b/package/snappy/snappy.hash
@@ -1,3 +1,3 @@
 # Locally calculated
-sha256 16b677f07832a612b0836178db7f374e414f94657c138e6993cbfc5dcc58651f  snappy-1.1.8.tar.gz
-sha256 55172044f7e241207117448a4d9d6ba1d0925c8ad66b5d4c08c70adfa9cc3de6  COPYING
+sha256  75c1fbb3d618dd3a0483bff0e26d0a92b495bbe5059c8b4f1c962b478b6e06e7  snappy-1.1.9.tar.gz
+sha256  55172044f7e241207117448a4d9d6ba1d0925c8ad66b5d4c08c70adfa9cc3de6  COPYING
diff --git a/package/snappy/snappy.mk b/package/snappy/snappy.mk
index e1fa28fbce..d31dcdd5fe 100644
--- a/package/snappy/snappy.mk
+++ b/package/snappy/snappy.mk
@@ -4,12 +4,12 @@
 #
 ################################################################################
 
-SNAPPY_VERSION = 1.1.8
+SNAPPY_VERSION = 1.1.9
 SNAPPY_SITE = $(call github,google,snappy,$(SNAPPY_VERSION))
 SNAPPY_LICENSE = BSD-3-Clause
 SNAPPY_LICENSE_FILES = COPYING
 SNAPPY_CPE_ID_VENDOR = google
 SNAPPY_INSTALL_STAGING = YES
-SNAPPY_CONF_OPTS = -DSNAPPY_BUILD_TESTS=OFF
+SNAPPY_CONF_OPTS = -DSNAPPY_BUILD_BENCHMARKS=OFF -DSNAPPY_BUILD_TESTS=OFF
 
 $(eval $(cmake-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2022-01-11 22:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 22:41 Fabrice Fontaine [this message]
2022-01-12 10:37 ` [Buildroot] [PATCH 1/1] package/snappy: bump to version 1.1.9 Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220111224156.2800195-1-fontaine.fabrice@gmail.com \
    --to=fontaine.fabrice@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.