FreeBSD Bugzilla – Attachment 200539 Details for
Bug 234425
devel/protobuf: Fix build for powerpcspe and likely powerpc(32)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to link in libatomic on 32-bit archs with no 64-bit atomics
patch-libatomic (text/plain), 2.33 KB, created by
Justin Hibbits
on 2018-12-26 20:47:30 UTC
(
hide
)
Description:
Patch to link in libatomic on 32-bit archs with no 64-bit atomics
Filename:
MIME Type:
Creator:
Justin Hibbits
Created:
2018-12-26 20:47:30 UTC
Size:
2.33 KB
patch
obsolete
>diff --git configure.ac configure.ac >index 8e1c308ce1..18a77f5977 100644 >--- configure.ac >+++ 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"], [ >diff --git src/Makefile.am src/Makefile.am >index bfa0d3ad1b..24c63669fd 100644 >--- src/Makefile.am >+++ src/Makefile.am >@@ -166,7 +166,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 >@@ -212,7 +212,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 >diff --git tests.sh tests.sh >index fc7c95c4d6..df41bc5a61 100755 >--- tests.sh >+++ 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 > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 234425
: 200539