svn commit: r489414 - head/devel/protobuf/files

Sunpoet Po-Chuan Hsieh sunpoet at FreeBSD.org
Sat Jan 5 22:47:20 UTC 2019


Author: sunpoet
Date: Sat Jan  5 22:47:16 2019
New Revision: 489414
URL: https://svnweb.freebsd.org/changeset/ports/489414

Log:
  Fix build on powerpcspe with linking to libatomic
  
  Obtained from:	https://github.com/protocolbuffers/protobuf/commit/56b40a8f055cfd05633054aed5d3466a6e058b72
  PR:		234425
  Submitted by:	jhibbits

Added:
  head/devel/protobuf/files/patch-configure.ac   (contents, props changed)
  head/devel/protobuf/files/patch-src-Makefile.am   (contents, props changed)
  head/devel/protobuf/files/patch-tests.sh   (contents, props changed)

Added: head/devel/protobuf/files/patch-configure.ac
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/protobuf/files/patch-configure.ac	Sat Jan  5 22:47:16 2019	(r489414)
@@ -0,0 +1,27 @@
+Obtained from:	https://github.com/protocolbuffers/protobuf/commit/56b40a8f055cfd05633054aed5d3466a6e058b72
+
+--- configure.ac.orig	2018-07-27 20:30:28 UTC
++++ configure.ac
+@@ -165,6 +165,22 @@ AS_IF([test "$with_zlib" != no], [
+ ])
+ 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"], [

Added: head/devel/protobuf/files/patch-src-Makefile.am
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/protobuf/files/patch-src-Makefile.am	Sat Jan  5 22:47:16 2019	(r489414)
@@ -0,0 +1,22 @@
+Obtained from:	https://github.com/protocolbuffers/protobuf/commit/56b40a8f055cfd05633054aed5d3466a6e058b72
+
+--- src/Makefile.am.orig	2018-07-27 20:30:28 UTC
++++ src/Makefile.am
+@@ -163,7 +163,7 @@ nobase_include_HEADERS =                
+ 
+ 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 @@ libprotobuf_lite_la_SOURCES =           
+   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

Added: head/devel/protobuf/files/patch-tests.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/protobuf/files/patch-tests.sh	Sat Jan  5 22:47:16 2019	(r489414)
@@ -0,0 +1,15 @@
+Obtained from:	https://github.com/protocolbuffers/protobuf/commit/56b40a8f055cfd05633054aed5d3466a6e058b72
+
+--- tests.sh.orig	2018-07-27 20:30:28 UTC
++++ tests.sh
+@@ -16,8 +16,8 @@ internal_build_cpp() {
+   git submodule update --init --recursive
+ 
+   ./autogen.sh
+-  ./configure CXXFLAGS="-fPIC"  # -fPIC is needed for python cpp test.
+-                                # See python/setup.py for more details
++  ./configure CXXFLAGS="-fPIC  -std=c++11"  # -fPIC is needed for python cpp test.
++                                            # See python/setup.py for more details
+   make -j2
+ }
+ 


More information about the svn-ports-head mailing list