View | Details | Raw Unified | Return to bug 234425
Collapse All | Expand All

(-)configure.ac (+16 lines)
Lines 165-170 AS_IF([test "$with_zlib" != no], [ Link Here
165
])
165
])
166
AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1])
166
AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1])
167
167
168
dnl On some platforms, std::atomic needs a helper library
169
AC_MSG_CHECKING(whether -latomic is needed)
170
AC_LINK_IFELSE([AC_LANG_SOURCE([[
171
  #include <atomic>
172
  #include <cstdint>
173
  std::atomic<std::int64_t> v;
174
  int main() {
175
    return v;
176
  }
177
]])], STD_ATOMIC_NEED_LIBATOMIC=no, STD_ATOMIC_NEED_LIBATOMIC=yes)
178
AC_MSG_RESULT($STD_ATOMIC_NEED_LIBATOMIC)
179
if test "x$STD_ATOMIC_NEED_LIBATOMIC" = xyes; then
180
  LIBATOMIC_LIBS="-latomic"
181
fi
182
AC_SUBST([LIBATOMIC_LIBS])
183
168
AS_IF([test "$with_protoc" != "no"], [
184
AS_IF([test "$with_protoc" != "no"], [
169
  PROTOC=$with_protoc
185
  PROTOC=$with_protoc
170
  AS_IF([test "$with_protoc" = "yes"], [
186
  AS_IF([test "$with_protoc" = "yes"], [
(-)src/Makefile.am (-2 / +2 lines)
Lines 166-172 nobase_include_HEADERS = \ Link Here
166
166
167
lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
167
lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la
168
168
169
libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
169
libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
170
libprotobuf_lite_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined
170
libprotobuf_lite_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined
171
if HAVE_LD_VERSION_SCRIPT
171
if HAVE_LD_VERSION_SCRIPT
172
libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map
172
libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map
Lines 212-218 libprotobuf_lite_la_SOURCES = \ Link Here
212
  google/protobuf/io/zero_copy_stream.cc                       \
212
  google/protobuf/io/zero_copy_stream.cc                       \
213
  google/protobuf/io/zero_copy_stream_impl_lite.cc
213
  google/protobuf/io/zero_copy_stream_impl_lite.cc
214
214
215
libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
215
libprotobuf_la_LIBADD = $(PTHREAD_LIBS) $(LIBATOMIC_LIBS)
216
libprotobuf_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined
216
libprotobuf_la_LDFLAGS = -version-info 17:0:0 -export-dynamic -no-undefined
217
if HAVE_LD_VERSION_SCRIPT
217
if HAVE_LD_VERSION_SCRIPT
218
libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map
218
libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map
(-)tests.sh (-2 / +2 lines)
Lines 16-23 internal_build_cpp() { Link Here
16
  git submodule update --init --recursive
16
  git submodule update --init --recursive
17
17
18
  ./autogen.sh
18
  ./autogen.sh
19
  ./configure CXXFLAGS="-fPIC"  # -fPIC is needed for python cpp test.
19
  ./configure CXXFLAGS="-fPIC -std=c++11"  # -fPIC is needed for python cpp test.
20
                                # See python/setup.py for more details
20
                                           # See python/setup.py for more details
21
  make -j2
21
  make -j2
22
}
22
}
23
23

Return to bug 234425