diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2018-10-19 17:37:26 +0200 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2018-10-19 13:39:18 -0400 |
commit | a246eb7e586b2d0102833be248aa94e557c98c2f (patch) | |
tree | 9f370400d954ac1fb2e28888bf73af3aa3e0f142 /dev-libs/protobuf | |
parent | app-i18n/libpinyin: Version bump (2.2.1). (diff) | |
download | gentoo-a246eb7e586b2d0102833be248aa94e557c98c2f.tar.gz gentoo-a246eb7e586b2d0102833be248aa94e557c98c2f.tar.bz2 gentoo-a246eb7e586b2d0102833be248aa94e557c98c2f.zip |
dev-libs/protobuf: Fix building on ARMv6.
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'dev-libs/protobuf')
-rw-r--r-- | dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch | 49 | ||||
-rw-r--r-- | dev-libs/protobuf/protobuf-3.6.1.ebuild | 1 |
2 files changed, 50 insertions, 0 deletions
diff --git a/dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch b/dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch new file mode 100644 index 000000000000..2b357b213170 --- /dev/null +++ b/dev-libs/protobuf/files/protobuf-3.6.1-libatomic_linking.patch @@ -0,0 +1,49 @@ +https://github.com/protocolbuffers/protobuf/issues/5219 +https://github.com/protocolbuffers/protobuf/pull/5227 +https://github.com/protocolbuffers/protobuf/commit/56b40a8f055cfd05633054aed5d3466a6e058b72 + +--- /configure.ac ++++ /configure.ac +@@ -165,6 +165,22 @@ + ]) + AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1]) + ++dnl On some platforms, std::atomic needs a helper library ++AC_MSG_CHECKING(whether -latomic is needed) ++AC_LINK_IFELSE([AC_LANG_SOURCE([[ ++ #include <atomic> ++ #include <cstdint> ++ std::atomic<std::int64_t> v; ++ int main() { ++ return v; ++ } ++]])], STD_ATOMIC_NEED_LIBATOMIC=no, STD_ATOMIC_NEED_LIBATOMIC=yes) ++AC_MSG_RESULT($STD_ATOMIC_NEED_LIBATOMIC) ++if test "x$STD_ATOMIC_NEED_LIBATOMIC" = xyes; then ++ LIBATOMIC_LIBS="-latomic" ++fi ++AC_SUBST([LIBATOMIC_LIBS]) ++ + AS_IF([test "$with_protoc" != "no"], [ + PROTOC=$with_protoc + AS_IF([test "$with_protoc" = "yes"], [ +--- /src/Makefile.am ++++ /src/Makefile.am +@@ -163,7 +163,7 @@ + + lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la + +-libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) ++libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS) + libprotobuf_lite_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined + if HAVE_LD_VERSION_SCRIPT + libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map +@@ -209,7 +209,7 @@ + google/protobuf/io/zero_copy_stream.cc \ + google/protobuf/io/zero_copy_stream_impl_lite.cc + +-libprotobuf_la_LIBADD = $(PTHREAD_LIBS) ++libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS) + libprotobuf_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined + if HAVE_LD_VERSION_SCRIPT + libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map diff --git a/dev-libs/protobuf/protobuf-3.6.1.ebuild b/dev-libs/protobuf/protobuf-3.6.1.ebuild index 3b3bdeaf3517..065eed562728 100644 --- a/dev-libs/protobuf/protobuf-3.6.1.ebuild +++ b/dev-libs/protobuf/protobuf-3.6.1.ebuild @@ -23,6 +23,7 @@ PATCHES=( "${FILESDIR}/${PN}-3.6.0-disable_no-warning-test.patch" "${FILESDIR}/${PN}-3.6.0-system_libraries.patch" "${FILESDIR}/${PN}-3.6.0-protoc_input_output_files.patch" + "${FILESDIR}/${PN}-3.6.1-libatomic_linking.patch" ) DOCS=(CHANGES.txt CONTRIBUTORS.txt README.md) |