mirror of
https://github.com/feather-wallet/feather.git
synced 2025-01-03 17:39:49 +00:00
depends: update protobuf to 3.21.12
This commit is contained in:
parent
1fd4798732
commit
e368572601
3 changed files with 3 additions and 83 deletions
|
@ -1,8 +1,8 @@
|
||||||
package=native_protobuf
|
package=native_protobuf
|
||||||
$(package)_version=3.20.3
|
$(package)_version=3.21.12
|
||||||
$(package)_download_path=https://github.com/protocolbuffers/protobuf/releases/download/v$($(package)_version)/
|
$(package)_download_path=https://github.com/protocolbuffers/protobuf/releases/download/v21.12/
|
||||||
$(package)_file_name=protobuf-cpp-$($(package)_version).tar.gz
|
$(package)_file_name=protobuf-cpp-$($(package)_version).tar.gz
|
||||||
$(package)_sha256_hash=e51cc8fc496f893e2a48beb417730ab6cbcb251142ad8b2cd1951faa5c76fe3d
|
$(package)_sha256_hash=4eab9b524aa5913c6fffb20b2a8abf5ef7f95a80bc0701f3a6dbb4c607f73460
|
||||||
$(package)_cxxflags=-std=c++11
|
$(package)_cxxflags=-std=c++11
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
|
|
|
@ -5,17 +5,12 @@ $(package)_file_name=$(native_$(package)_file_name)
|
||||||
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
|
$(package)_sha256_hash=$(native_$(package)_sha256_hash)
|
||||||
$(package)_dependencies=native_$(package)
|
$(package)_dependencies=native_$(package)
|
||||||
$(package)_cxxflags=-std=c++11
|
$(package)_cxxflags=-std=c++11
|
||||||
$(package)_patches = fix-abi.patch
|
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
|
$(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc
|
||||||
$(package)_config_opts_linux=--with-pic
|
$(package)_config_opts_linux=--with-pic
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_preprocess_cmds
|
|
||||||
patch -p1 -i $($(package)_patch_dir)/fix-abi.patch
|
|
||||||
endef
|
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . && \
|
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub . && \
|
||||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub ./third_party/googletest/googletest/build-aux/ && \
|
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub ./third_party/googletest/googletest/build-aux/ && \
|
||||||
|
|
|
@ -1,75 +0,0 @@
|
||||||
From 101b6199f33a396b5758057ca10b8f9c8d8e8855 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Antoine Pitrou <antoine@python.org>
|
|
||||||
Date: Tue, 19 Jul 2022 16:40:28 +0200
|
|
||||||
Subject: [PATCH] Fix #9947: make the ABI identical between debug and non-debug
|
|
||||||
builds
|
|
||||||
|
|
||||||
---
|
|
||||||
src/google/protobuf/message_lite.cc | 8 ++------
|
|
||||||
src/google/protobuf/metadata_lite.h | 13 ++++++++++---
|
|
||||||
2 files changed, 12 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/google/protobuf/message_lite.cc b/src/google/protobuf/message_lite.cc
|
|
||||||
index 3a1b67bf6..da66c1965 100644
|
|
||||||
--- a/src/google/protobuf/message_lite.cc
|
|
||||||
+++ b/src/google/protobuf/message_lite.cc
|
|
||||||
@@ -520,18 +520,14 @@ void GenericTypeHandler<std::string>::Merge(const std::string& from,
|
|
||||||
*to = from;
|
|
||||||
}
|
|
||||||
|
|
||||||
-// Non-inline implementations of InternalMetadata routines
|
|
||||||
-#if defined(NDEBUG) || defined(_MSC_VER)
|
|
||||||
-// for opt and MSVC builds, the destructor is defined in the header.
|
|
||||||
-#else
|
|
||||||
+// Non-inline implementations of InternalMetadata destructor
|
|
||||||
// This is moved out of the header because the GOOGLE_DCHECK produces a lot of code.
|
|
||||||
-InternalMetadata::~InternalMetadata() {
|
|
||||||
+void InternalMetadata::CheckedDestruct() {
|
|
||||||
if (HasMessageOwnedArenaTag()) {
|
|
||||||
GOOGLE_DCHECK(!HasUnknownFieldsTag());
|
|
||||||
delete reinterpret_cast<Arena*>(ptr_ - kMessageOwnedArenaTagMask);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
// Non-inline variants of std::string specializations for
|
|
||||||
// various InternalMetadata routines.
|
|
||||||
diff --git a/src/google/protobuf/metadata_lite.h b/src/google/protobuf/metadata_lite.h
|
|
||||||
index 11faba69f..0c31517f0 100644
|
|
||||||
--- a/src/google/protobuf/metadata_lite.h
|
|
||||||
+++ b/src/google/protobuf/metadata_lite.h
|
|
||||||
@@ -74,15 +74,19 @@ class PROTOBUF_EXPORT InternalMetadata {
|
|
||||||
GOOGLE_DCHECK(!is_message_owned || arena != nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
-#if defined(NDEBUG) || defined(_MSC_VER)
|
|
||||||
+ // To keep the ABI identical between debug and non-debug builds,
|
|
||||||
+ // the destructor is always defined here even though it may delegate
|
|
||||||
+ // to a non-inline private method.
|
|
||||||
+ // (see https://github.com/protocolbuffers/protobuf/issues/9947)
|
|
||||||
~InternalMetadata() {
|
|
||||||
+#if defined(NDEBUG) || defined(_MSC_VER)
|
|
||||||
if (HasMessageOwnedArenaTag()) {
|
|
||||||
delete reinterpret_cast<Arena*>(ptr_ - kMessageOwnedArenaTagMask);
|
|
||||||
}
|
|
||||||
- }
|
|
||||||
#else
|
|
||||||
- ~InternalMetadata();
|
|
||||||
+ CheckedDestruct();
|
|
||||||
#endif
|
|
||||||
+ }
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
void Delete() {
|
|
||||||
@@ -261,6 +265,9 @@ class PROTOBUF_EXPORT InternalMetadata {
|
|
||||||
PROTOBUF_NOINLINE void DoSwap(T* other) {
|
|
||||||
mutable_unknown_fields<T>()->Swap(other);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ // Private helper with debug checks for ~InternalMetadata()
|
|
||||||
+ void CheckedDestruct();
|
|
||||||
};
|
|
||||||
|
|
||||||
// String Template specializations.
|
|
||||||
--
|
|
||||||
2.40.1
|
|
Loading…
Reference in a new issue