Merge ~afrantzis/protobuf/+git/protobuf-xenial:hide-unnecessary-symbols into ~afrantzis/protobuf/+git/protobuf-xenial:bileto
- Git
- lp:~afrantzis/protobuf/+git/protobuf-xenial
- hide-unnecessary-symbols
- Merge into bileto
Proposed by
Alexandros Frantzis
Status: | Needs review |
---|---|
Proposed branch: | ~afrantzis/protobuf/+git/protobuf-xenial:hide-unnecessary-symbols |
Merge into: | ~afrantzis/protobuf/+git/protobuf-xenial:bileto |
Diff against target: |
882 lines (+763/-0) 15 files modified
.pc/Hide-unnecessary-exported-library-symbols.patch/.timestamp (+0/-0) .pc/Hide-unnecessary-exported-library-symbols.patch/configure.ac (+159/-0) .pc/Hide-unnecessary-exported-library-symbols.patch/src/Makefile.am (+419/-0) .pc/Hide-unnecessary-exported-library-symbols.patch/src/libprotobuf-lite.map (+0/-0) .pc/Hide-unnecessary-exported-library-symbols.patch/src/libprotobuf.map (+0/-0) .pc/Hide-unnecessary-exported-library-symbols.patch/src/libprotoc.map (+0/-0) .pc/applied-patches (+1/-0) configure.ac (+19/-0) debian/changelog (+8/-0) debian/patches/Hide-unnecessary-exported-library-symbols.patch (+114/-0) debian/patches/series (+1/-0) src/Makefile.am (+15/-0) src/libprotobuf-lite.map (+9/-0) src/libprotobuf.map (+9/-0) src/libprotoc.map (+9/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alexandros Frantzis | Pending | ||
Review via email: mp+320146@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Unmerged commits
- 2aad1e8... by Alexandros Frantzis
-
Hide-unnecessar
y-exported- library- symbols. patch
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/.pc/Hide-unnecessary-exported-library-symbols.patch/.timestamp b/.pc/Hide-unnecessary-exported-library-symbols.patch/.timestamp |
2 | new file mode 100644 |
3 | index 0000000..e69de29 |
4 | --- /dev/null |
5 | +++ b/.pc/Hide-unnecessary-exported-library-symbols.patch/.timestamp |
6 | diff --git a/.pc/Hide-unnecessary-exported-library-symbols.patch/configure.ac b/.pc/Hide-unnecessary-exported-library-symbols.patch/configure.ac |
7 | new file mode 100644 |
8 | index 0000000..c07067c |
9 | --- /dev/null |
10 | +++ b/.pc/Hide-unnecessary-exported-library-symbols.patch/configure.ac |
11 | @@ -0,0 +1,159 @@ |
12 | +## Process this file with autoconf to produce configure. |
13 | +## In general, the safest way to proceed is to run ./autogen.sh |
14 | + |
15 | +AC_PREREQ(2.59) |
16 | + |
17 | +# Note: If you change the version, you must also update it in: |
18 | +# * java/pom.xml |
19 | +# * python/setup.py |
20 | +# * src/google/protobuf/stubs/common.h |
21 | +# * src/Makefile.am (Update -version-info for LDFLAGS if needed) |
22 | +# |
23 | +# In the SVN trunk, the version should always be the next anticipated release |
24 | +# version with the "-pre" suffix. (We used to use "-SNAPSHOT" but this pushed |
25 | +# the size of one file name in the dist tarfile over the 99-char limit.) |
26 | +AC_INIT([Protocol Buffers],[2.6.1],[protobuf@googlegroups.com],[protobuf]) |
27 | + |
28 | +AM_MAINTAINER_MODE([enable]) |
29 | + |
30 | +AC_CONFIG_SRCDIR(src/google/protobuf/message.cc) |
31 | +AC_CONFIG_HEADERS([config.h]) |
32 | +AC_CONFIG_MACRO_DIR([m4]) |
33 | + |
34 | +# autoconf's default CXXFLAGS are usually "-g -O2". These aren't necessarily |
35 | +# the best choice for libprotobuf. |
36 | +AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"], |
37 | + [CFLAGS=""]) |
38 | +AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"], |
39 | + [CXXFLAGS=""]) |
40 | + |
41 | +AC_CANONICAL_TARGET |
42 | + |
43 | +AM_INIT_AUTOMAKE([subdir-objects]) |
44 | + |
45 | +AC_ARG_WITH([zlib], |
46 | + [AS_HELP_STRING([--with-zlib], |
47 | + [include classes for streaming compressed data in and out @<:@default=check@:>@])], |
48 | + [],[with_zlib=check]) |
49 | + |
50 | +AC_ARG_WITH([protoc], |
51 | + [AS_HELP_STRING([--with-protoc=COMMAND], |
52 | + [use the given protoc command instead of building a new one when building tests (useful for cross-compiling)])], |
53 | + [],[with_protoc=no]) |
54 | + |
55 | +# Checks for programs. |
56 | +AC_PROG_CC |
57 | +AC_PROG_CXX |
58 | +AC_LANG([C++]) |
59 | +ACX_USE_SYSTEM_EXTENSIONS |
60 | +AM_CONDITIONAL(GCC, test "$GCC" = yes) # let the Makefile know if we're gcc |
61 | + |
62 | +# test_util.cc takes forever to compile with GCC and optimization turned on. |
63 | +AC_MSG_CHECKING([C++ compiler flags...]) |
64 | +AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[ |
65 | + AS_IF([test "$GCC" = "yes"],[ |
66 | + PROTOBUF_OPT_FLAG="-O2" |
67 | + CXXFLAGS="${CXXFLAGS} -g" |
68 | + ]) |
69 | + |
70 | + # Protocol Buffers contains several checks that are intended to be used only |
71 | + # for debugging and which might hurt performance. Most users are probably |
72 | + # end users who don't want these checks, so add -DNDEBUG by default. |
73 | + CXXFLAGS="$CXXFLAGS -DNDEBUG" |
74 | + |
75 | + AC_MSG_RESULT([use default: $PROTOBUF_OPT_FLAG $CXXFLAGS]) |
76 | +],[ |
77 | + AC_MSG_RESULT([use user-supplied: $CXXFLAGS]) |
78 | +]) |
79 | + |
80 | +AC_SUBST(PROTOBUF_OPT_FLAG) |
81 | + |
82 | +ACX_CHECK_SUNCC |
83 | + |
84 | +# Have to do libtool after SUNCC, other wise it "helpfully" adds Crun Cstd |
85 | +# to the link |
86 | +AC_PROG_LIBTOOL |
87 | + |
88 | +# Checks for header files. |
89 | +AC_HEADER_STDC |
90 | +AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stdlib.h unistd.h]) |
91 | + |
92 | +# Checks for library functions. |
93 | +AC_FUNC_MEMCMP |
94 | +AC_FUNC_STRTOD |
95 | +AC_CHECK_FUNCS([ftruncate memset mkdir strchr strerror strtol]) |
96 | + |
97 | +# Check for zlib. |
98 | +HAVE_ZLIB=0 |
99 | +AS_IF([test "$with_zlib" != no], [ |
100 | + AC_MSG_CHECKING([zlib version]) |
101 | + |
102 | + # First check the zlib header version. |
103 | + AC_COMPILE_IFELSE( |
104 | + [AC_LANG_PROGRAM([[ |
105 | + #include <zlib.h> |
106 | + #if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1204) |
107 | + # error zlib version too old |
108 | + #endif |
109 | + ]], [])], [ |
110 | + AC_MSG_RESULT([ok (1.2.0.4 or later)]) |
111 | + |
112 | + # Also need to add -lz to the linker flags and make sure this succeeds. |
113 | + AC_SEARCH_LIBS([zlibVersion], [z], [ |
114 | + AC_DEFINE([HAVE_ZLIB], [1], [Enable classes using zlib compression.]) |
115 | + HAVE_ZLIB=1 |
116 | + ], [ |
117 | + AS_IF([test "$with_zlib" != check], [ |
118 | + AC_MSG_FAILURE([--with-zlib was given, but no working zlib library was found]) |
119 | + ]) |
120 | + ]) |
121 | + ], [ |
122 | + AS_IF([test "$with_zlib" = check], [ |
123 | + AC_MSG_RESULT([headers missing or too old (requires 1.2.0.4)]) |
124 | + ], [ |
125 | + AC_MSG_FAILURE([--with-zlib was given, but zlib headers were not present or were too old (requires 1.2.0.4)]) |
126 | + ]) |
127 | + ]) |
128 | +]) |
129 | +AM_CONDITIONAL([HAVE_ZLIB], [test $HAVE_ZLIB = 1]) |
130 | + |
131 | +AS_IF([test "$with_protoc" != "no"], [ |
132 | + PROTOC=$with_protoc |
133 | + AS_IF([test "$with_protoc" = "yes"], [ |
134 | + # No argument given. Use system protoc. |
135 | + PROTOC=protoc |
136 | + ]) |
137 | + AS_IF([echo "$PROTOC" | grep -q '^@<:@^/@:>@.*/'], [ |
138 | + # Does not start with a slash, but contains a slash. So, it's a relative |
139 | + # path (as opposed to an absolute path or an executable in $PATH). |
140 | + # Since it will actually be executed from the src directory, prefix with |
141 | + # the current directory. We also insert $ac_top_build_prefix in case this |
142 | + # is a nested package and --with-protoc was actually given on the outer |
143 | + # package's configure script. |
144 | + PROTOC=`pwd`/${ac_top_build_prefix}$PROTOC |
145 | + ]) |
146 | + AC_SUBST([PROTOC]) |
147 | +]) |
148 | +AM_CONDITIONAL([USE_EXTERNAL_PROTOC], [test "$with_protoc" != "no"]) |
149 | + |
150 | +ACX_PTHREAD |
151 | +AC_CXX_STL_HASH |
152 | + |
153 | +case "$target_os" in |
154 | + mingw* | cygwin* | win*) |
155 | + ;; |
156 | + *) |
157 | + # Need to link against rt on Solaris |
158 | + AC_SEARCH_LIBS([sched_yield], [rt], [], [AC_MSG_FAILURE([sched_yield was not found on your system])]) |
159 | + ;; |
160 | +esac |
161 | + |
162 | +# HACK: Make gtest's configure script pick up our copy of CFLAGS and CXXFLAGS, |
163 | +# since the flags added by ACX_CHECK_SUNCC must be used when compiling gtest |
164 | +# too. |
165 | +export CFLAGS |
166 | +export CXXFLAGS |
167 | +AC_CONFIG_SUBDIRS([gtest]) |
168 | + |
169 | +AC_CONFIG_FILES([Makefile src/Makefile protobuf.pc protobuf-lite.pc]) |
170 | +AC_OUTPUT |
171 | diff --git a/.pc/Hide-unnecessary-exported-library-symbols.patch/src/Makefile.am b/.pc/Hide-unnecessary-exported-library-symbols.patch/src/Makefile.am |
172 | new file mode 100644 |
173 | index 0000000..2a11695 |
174 | --- /dev/null |
175 | +++ b/.pc/Hide-unnecessary-exported-library-symbols.patch/src/Makefile.am |
176 | @@ -0,0 +1,419 @@ |
177 | +## Process this file with automake to produce Makefile.in |
178 | + |
179 | +if HAVE_ZLIB |
180 | +GZCHECKPROGRAMS = zcgzip zcgunzip |
181 | +GZHEADERS = google/protobuf/io/gzip_stream.h |
182 | +GZTESTS = google/protobuf/io/gzip_stream_unittest.sh |
183 | +else |
184 | +GZCHECKPROGRAMS = |
185 | +GZHEADERS = |
186 | +GZTESTS = |
187 | +endif |
188 | + |
189 | +if GCC |
190 | +# These are good warnings to turn on by default |
191 | +NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) -Wall -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare |
192 | +else |
193 | +NO_OPT_CXXFLAGS = $(PTHREAD_CFLAGS) |
194 | +endif |
195 | + |
196 | +AM_CXXFLAGS = $(NO_OPT_CXXFLAGS) $(PROTOBUF_OPT_FLAG) |
197 | + |
198 | +AM_LDFLAGS = $(PTHREAD_CFLAGS) |
199 | + |
200 | +# If I say "dist_include_DATA", automake complains that $(includedir) is not |
201 | +# a "legitimate" directory for DATA. Screw you, automake. |
202 | +protodir = $(includedir) |
203 | +nobase_dist_proto_DATA = google/protobuf/descriptor.proto \ |
204 | + google/protobuf/compiler/plugin.proto |
205 | + |
206 | +# Not sure why these don't get cleaned automatically. |
207 | +clean-local: |
208 | + rm -f *.loT |
209 | + |
210 | +CLEANFILES = $(protoc_outputs) unittest_proto_middleman \ |
211 | + testzip.jar testzip.list testzip.proto testzip.zip |
212 | + |
213 | +MAINTAINERCLEANFILES = \ |
214 | + Makefile.in |
215 | + |
216 | +nobase_include_HEADERS = \ |
217 | + google/protobuf/stubs/atomicops.h \ |
218 | + google/protobuf/stubs/atomicops_internals_arm64_gcc.h \ |
219 | + google/protobuf/stubs/atomicops_internals_arm_gcc.h \ |
220 | + google/protobuf/stubs/atomicops_internals_arm_qnx.h \ |
221 | + google/protobuf/stubs/atomicops_internals_atomicword_compat.h \ |
222 | + google/protobuf/stubs/atomicops_internals_generic_gcc.h \ |
223 | + google/protobuf/stubs/atomicops_internals_macosx.h \ |
224 | + google/protobuf/stubs/atomicops_internals_mips_gcc.h \ |
225 | + google/protobuf/stubs/atomicops_internals_pnacl.h \ |
226 | + google/protobuf/stubs/atomicops_internals_solaris.h \ |
227 | + google/protobuf/stubs/atomicops_internals_tsan.h \ |
228 | + google/protobuf/stubs/atomicops_internals_x86_gcc.h \ |
229 | + google/protobuf/stubs/atomicops_internals_x86_msvc.h \ |
230 | + google/protobuf/stubs/common.h \ |
231 | + google/protobuf/stubs/platform_macros.h \ |
232 | + google/protobuf/stubs/once.h \ |
233 | + google/protobuf/stubs/stl_util.h \ |
234 | + google/protobuf/stubs/template_util.h \ |
235 | + google/protobuf/stubs/type_traits.h \ |
236 | + google/protobuf/descriptor.h \ |
237 | + google/protobuf/descriptor.pb.h \ |
238 | + google/protobuf/descriptor_database.h \ |
239 | + google/protobuf/dynamic_message.h \ |
240 | + google/protobuf/extension_set.h \ |
241 | + google/protobuf/generated_enum_reflection.h \ |
242 | + google/protobuf/generated_message_util.h \ |
243 | + google/protobuf/generated_message_reflection.h \ |
244 | + google/protobuf/message.h \ |
245 | + google/protobuf/message_lite.h \ |
246 | + google/protobuf/reflection_ops.h \ |
247 | + google/protobuf/repeated_field.h \ |
248 | + google/protobuf/service.h \ |
249 | + google/protobuf/text_format.h \ |
250 | + google/protobuf/unknown_field_set.h \ |
251 | + google/protobuf/wire_format.h \ |
252 | + google/protobuf/wire_format_lite.h \ |
253 | + google/protobuf/wire_format_lite_inl.h \ |
254 | + google/protobuf/io/coded_stream.h \ |
255 | + $(GZHEADERS) \ |
256 | + google/protobuf/io/printer.h \ |
257 | + google/protobuf/io/strtod.h \ |
258 | + google/protobuf/io/tokenizer.h \ |
259 | + google/protobuf/io/zero_copy_stream.h \ |
260 | + google/protobuf/io/zero_copy_stream_impl.h \ |
261 | + google/protobuf/io/zero_copy_stream_impl_lite.h \ |
262 | + google/protobuf/compiler/code_generator.h \ |
263 | + google/protobuf/compiler/command_line_interface.h \ |
264 | + google/protobuf/compiler/importer.h \ |
265 | + google/protobuf/compiler/parser.h \ |
266 | + google/protobuf/compiler/plugin.h \ |
267 | + google/protobuf/compiler/plugin.pb.h \ |
268 | + google/protobuf/compiler/cpp/cpp_generator.h \ |
269 | + google/protobuf/compiler/java/java_generator.h \ |
270 | + google/protobuf/compiler/python/python_generator.h |
271 | + |
272 | +lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la |
273 | + |
274 | +libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) |
275 | +libprotobuf_lite_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined |
276 | +libprotobuf_lite_la_SOURCES = \ |
277 | + google/protobuf/stubs/atomicops_internals_x86_gcc.cc \ |
278 | + google/protobuf/stubs/atomicops_internals_x86_msvc.cc \ |
279 | + google/protobuf/stubs/common.cc \ |
280 | + google/protobuf/stubs/once.cc \ |
281 | + google/protobuf/stubs/hash.h \ |
282 | + google/protobuf/stubs/map_util.h \ |
283 | + google/protobuf/stubs/shared_ptr.h \ |
284 | + google/protobuf/stubs/stringprintf.cc \ |
285 | + google/protobuf/stubs/stringprintf.h \ |
286 | + google/protobuf/extension_set.cc \ |
287 | + google/protobuf/generated_message_util.cc \ |
288 | + google/protobuf/message_lite.cc \ |
289 | + google/protobuf/repeated_field.cc \ |
290 | + google/protobuf/wire_format_lite.cc \ |
291 | + google/protobuf/io/coded_stream.cc \ |
292 | + google/protobuf/io/coded_stream_inl.h \ |
293 | + google/protobuf/io/zero_copy_stream.cc \ |
294 | + google/protobuf/io/zero_copy_stream_impl_lite.cc |
295 | + |
296 | +libprotobuf_la_LIBADD = $(PTHREAD_LIBS) |
297 | +libprotobuf_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined |
298 | +libprotobuf_la_SOURCES = \ |
299 | + $(libprotobuf_lite_la_SOURCES) \ |
300 | + google/protobuf/stubs/strutil.cc \ |
301 | + google/protobuf/stubs/strutil.h \ |
302 | + google/protobuf/stubs/substitute.cc \ |
303 | + google/protobuf/stubs/substitute.h \ |
304 | + google/protobuf/stubs/structurally_valid.cc \ |
305 | + google/protobuf/descriptor.cc \ |
306 | + google/protobuf/descriptor.pb.cc \ |
307 | + google/protobuf/descriptor_database.cc \ |
308 | + google/protobuf/dynamic_message.cc \ |
309 | + google/protobuf/extension_set_heavy.cc \ |
310 | + google/protobuf/generated_message_reflection.cc \ |
311 | + google/protobuf/message.cc \ |
312 | + google/protobuf/reflection_ops.cc \ |
313 | + google/protobuf/service.cc \ |
314 | + google/protobuf/text_format.cc \ |
315 | + google/protobuf/unknown_field_set.cc \ |
316 | + google/protobuf/wire_format.cc \ |
317 | + google/protobuf/io/gzip_stream.cc \ |
318 | + google/protobuf/io/printer.cc \ |
319 | + google/protobuf/io/strtod.cc \ |
320 | + google/protobuf/io/tokenizer.cc \ |
321 | + google/protobuf/io/zero_copy_stream_impl.cc \ |
322 | + google/protobuf/compiler/importer.cc \ |
323 | + google/protobuf/compiler/parser.cc |
324 | + |
325 | +libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la |
326 | +libprotoc_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined |
327 | +libprotoc_la_SOURCES = \ |
328 | + google/protobuf/compiler/code_generator.cc \ |
329 | + google/protobuf/compiler/command_line_interface.cc \ |
330 | + google/protobuf/compiler/plugin.cc \ |
331 | + google/protobuf/compiler/plugin.pb.cc \ |
332 | + google/protobuf/compiler/subprocess.cc \ |
333 | + google/protobuf/compiler/subprocess.h \ |
334 | + google/protobuf/compiler/zip_writer.cc \ |
335 | + google/protobuf/compiler/zip_writer.h \ |
336 | + google/protobuf/compiler/cpp/cpp_enum.cc \ |
337 | + google/protobuf/compiler/cpp/cpp_enum.h \ |
338 | + google/protobuf/compiler/cpp/cpp_enum_field.cc \ |
339 | + google/protobuf/compiler/cpp/cpp_enum_field.h \ |
340 | + google/protobuf/compiler/cpp/cpp_extension.cc \ |
341 | + google/protobuf/compiler/cpp/cpp_extension.h \ |
342 | + google/protobuf/compiler/cpp/cpp_field.cc \ |
343 | + google/protobuf/compiler/cpp/cpp_field.h \ |
344 | + google/protobuf/compiler/cpp/cpp_file.cc \ |
345 | + google/protobuf/compiler/cpp/cpp_file.h \ |
346 | + google/protobuf/compiler/cpp/cpp_generator.cc \ |
347 | + google/protobuf/compiler/cpp/cpp_helpers.cc \ |
348 | + google/protobuf/compiler/cpp/cpp_helpers.h \ |
349 | + google/protobuf/compiler/cpp/cpp_message.cc \ |
350 | + google/protobuf/compiler/cpp/cpp_message.h \ |
351 | + google/protobuf/compiler/cpp/cpp_message_field.cc \ |
352 | + google/protobuf/compiler/cpp/cpp_message_field.h \ |
353 | + google/protobuf/compiler/cpp/cpp_options.h \ |
354 | + google/protobuf/compiler/cpp/cpp_primitive_field.cc \ |
355 | + google/protobuf/compiler/cpp/cpp_primitive_field.h \ |
356 | + google/protobuf/compiler/cpp/cpp_service.cc \ |
357 | + google/protobuf/compiler/cpp/cpp_service.h \ |
358 | + google/protobuf/compiler/cpp/cpp_string_field.cc \ |
359 | + google/protobuf/compiler/cpp/cpp_string_field.h \ |
360 | + google/protobuf/compiler/java/java_context.cc \ |
361 | + google/protobuf/compiler/java/java_context.h \ |
362 | + google/protobuf/compiler/java/java_enum.cc \ |
363 | + google/protobuf/compiler/java/java_enum.h \ |
364 | + google/protobuf/compiler/java/java_enum_field.cc \ |
365 | + google/protobuf/compiler/java/java_enum_field.h \ |
366 | + google/protobuf/compiler/java/java_extension.cc \ |
367 | + google/protobuf/compiler/java/java_extension.h \ |
368 | + google/protobuf/compiler/java/java_field.cc \ |
369 | + google/protobuf/compiler/java/java_field.h \ |
370 | + google/protobuf/compiler/java/java_file.cc \ |
371 | + google/protobuf/compiler/java/java_file.h \ |
372 | + google/protobuf/compiler/java/java_generator.cc \ |
373 | + google/protobuf/compiler/java/java_generator_factory.cc \ |
374 | + google/protobuf/compiler/java/java_generator_factory.h \ |
375 | + google/protobuf/compiler/java/java_helpers.cc \ |
376 | + google/protobuf/compiler/java/java_helpers.h \ |
377 | + google/protobuf/compiler/java/java_lazy_message_field.cc \ |
378 | + google/protobuf/compiler/java/java_lazy_message_field.h \ |
379 | + google/protobuf/compiler/java/java_message.cc \ |
380 | + google/protobuf/compiler/java/java_message.h \ |
381 | + google/protobuf/compiler/java/java_message_field.cc \ |
382 | + google/protobuf/compiler/java/java_message_field.h \ |
383 | + google/protobuf/compiler/java/java_name_resolver.cc \ |
384 | + google/protobuf/compiler/java/java_name_resolver.h \ |
385 | + google/protobuf/compiler/java/java_primitive_field.cc \ |
386 | + google/protobuf/compiler/java/java_primitive_field.h \ |
387 | + google/protobuf/compiler/java/java_shared_code_generator.cc \ |
388 | + google/protobuf/compiler/java/java_shared_code_generator.h \ |
389 | + google/protobuf/compiler/java/java_service.cc \ |
390 | + google/protobuf/compiler/java/java_service.h \ |
391 | + google/protobuf/compiler/java/java_string_field.cc \ |
392 | + google/protobuf/compiler/java/java_string_field.h \ |
393 | + google/protobuf/compiler/java/java_doc_comment.cc \ |
394 | + google/protobuf/compiler/java/java_doc_comment.h \ |
395 | + google/protobuf/compiler/python/python_generator.cc |
396 | + |
397 | +bin_PROGRAMS = protoc |
398 | +protoc_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la |
399 | +protoc_SOURCES = google/protobuf/compiler/main.cc |
400 | + |
401 | +# Tests ============================================================== |
402 | + |
403 | +protoc_inputs = \ |
404 | + google/protobuf/unittest.proto \ |
405 | + google/protobuf/unittest_empty.proto \ |
406 | + google/protobuf/unittest_import.proto \ |
407 | + google/protobuf/unittest_import_public.proto \ |
408 | + google/protobuf/unittest_mset.proto \ |
409 | + google/protobuf/unittest_optimize_for.proto \ |
410 | + google/protobuf/unittest_embed_optimize_for.proto \ |
411 | + google/protobuf/unittest_custom_options.proto \ |
412 | + google/protobuf/unittest_lite.proto \ |
413 | + google/protobuf/unittest_import_lite.proto \ |
414 | + google/protobuf/unittest_import_public_lite.proto \ |
415 | + google/protobuf/unittest_lite_imports_nonlite.proto \ |
416 | + google/protobuf/unittest_no_generic_services.proto \ |
417 | + google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto |
418 | + |
419 | +EXTRA_DIST = \ |
420 | + $(protoc_inputs) \ |
421 | + solaris/libstdc++.la \ |
422 | + google/protobuf/io/gzip_stream.h \ |
423 | + google/protobuf/io/gzip_stream_unittest.sh \ |
424 | + google/protobuf/testdata/golden_message \ |
425 | + google/protobuf/testdata/golden_message_oneof_implemented \ |
426 | + google/protobuf/testdata/golden_packed_fields_message \ |
427 | + google/protobuf/testdata/bad_utf8_string \ |
428 | + google/protobuf/testdata/text_format_unittest_data.txt \ |
429 | + google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt \ |
430 | + google/protobuf/testdata/text_format_unittest_data_pointy.txt \ |
431 | + google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt \ |
432 | + google/protobuf/testdata/text_format_unittest_extensions_data.txt \ |
433 | + google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt \ |
434 | + google/protobuf/package_info.h \ |
435 | + google/protobuf/io/package_info.h \ |
436 | + google/protobuf/compiler/package_info.h \ |
437 | + google/protobuf/compiler/zip_output_unittest.sh \ |
438 | + google/protobuf/unittest_enormous_descriptor.proto |
439 | + |
440 | +protoc_lite_outputs = \ |
441 | + google/protobuf/unittest_lite.pb.cc \ |
442 | + google/protobuf/unittest_lite.pb.h \ |
443 | + google/protobuf/unittest_import_lite.pb.cc \ |
444 | + google/protobuf/unittest_import_lite.pb.h \ |
445 | + google/protobuf/unittest_import_public_lite.pb.cc \ |
446 | + google/protobuf/unittest_import_public_lite.pb.h |
447 | + |
448 | +protoc_outputs = \ |
449 | + $(protoc_lite_outputs) \ |
450 | + google/protobuf/unittest.pb.cc \ |
451 | + google/protobuf/unittest.pb.h \ |
452 | + google/protobuf/unittest_empty.pb.cc \ |
453 | + google/protobuf/unittest_empty.pb.h \ |
454 | + google/protobuf/unittest_import.pb.cc \ |
455 | + google/protobuf/unittest_import.pb.h \ |
456 | + google/protobuf/unittest_import_public.pb.cc \ |
457 | + google/protobuf/unittest_import_public.pb.h \ |
458 | + google/protobuf/unittest_mset.pb.cc \ |
459 | + google/protobuf/unittest_mset.pb.h \ |
460 | + google/protobuf/unittest_optimize_for.pb.cc \ |
461 | + google/protobuf/unittest_optimize_for.pb.h \ |
462 | + google/protobuf/unittest_embed_optimize_for.pb.cc \ |
463 | + google/protobuf/unittest_embed_optimize_for.pb.h \ |
464 | + google/protobuf/unittest_custom_options.pb.cc \ |
465 | + google/protobuf/unittest_custom_options.pb.h \ |
466 | + google/protobuf/unittest_lite_imports_nonlite.pb.cc \ |
467 | + google/protobuf/unittest_lite_imports_nonlite.pb.h \ |
468 | + google/protobuf/unittest_no_generic_services.pb.cc \ |
469 | + google/protobuf/unittest_no_generic_services.pb.h \ |
470 | + google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.cc \ |
471 | + google/protobuf/compiler/cpp/cpp_test_bad_identifiers.pb.h |
472 | + |
473 | +BUILT_SOURCES = $(protoc_outputs) |
474 | + |
475 | +if USE_EXTERNAL_PROTOC |
476 | + |
477 | +unittest_proto_middleman: $(protoc_inputs) |
478 | + $(PROTOC) -I$(srcdir) --cpp_out=. $^ |
479 | + touch unittest_proto_middleman |
480 | + |
481 | +else |
482 | + |
483 | +# We have to cd to $(srcdir) before executing protoc because $(protoc_inputs) is |
484 | +# relative to srcdir, which may not be the same as the current directory when |
485 | +# building out-of-tree. |
486 | +unittest_proto_middleman: protoc$(EXEEXT) $(protoc_inputs) |
487 | + oldpwd=`pwd` && ( cd $(srcdir) && $$oldpwd/protoc$(EXEEXT) -I. --cpp_out=$$oldpwd $(protoc_inputs) ) |
488 | + touch unittest_proto_middleman |
489 | + |
490 | +endif |
491 | + |
492 | +$(protoc_outputs): unittest_proto_middleman |
493 | + |
494 | +COMMON_TEST_SOURCES = \ |
495 | + google/protobuf/test_util.cc \ |
496 | + google/protobuf/test_util.h \ |
497 | + google/protobuf/testing/googletest.cc \ |
498 | + google/protobuf/testing/googletest.h \ |
499 | + google/protobuf/testing/file.cc \ |
500 | + google/protobuf/testing/file.h |
501 | + |
502 | +check_PROGRAMS = protoc protobuf-test protobuf-lazy-descriptor-test \ |
503 | + protobuf-lite-test test_plugin $(GZCHECKPROGRAMS) |
504 | +protobuf_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ |
505 | + $(top_builddir)/gtest/lib/libgtest.la \ |
506 | + $(top_builddir)/gtest/lib/libgtest_main.la |
507 | +protobuf_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \ |
508 | + -I$(top_builddir)/gtest/include |
509 | +# Disable optimization for tests unless the user explicitly asked for it, |
510 | +# since test_util.cc takes forever to compile with optimization (with GCC). |
511 | +# See configure.ac for more info. |
512 | +protobuf_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) |
513 | +protobuf_test_SOURCES = \ |
514 | + google/protobuf/stubs/common_unittest.cc \ |
515 | + google/protobuf/stubs/once_unittest.cc \ |
516 | + google/protobuf/stubs/strutil_unittest.cc \ |
517 | + google/protobuf/stubs/structurally_valid_unittest.cc \ |
518 | + google/protobuf/stubs/stringprintf_unittest.cc \ |
519 | + google/protobuf/stubs/template_util_unittest.cc \ |
520 | + google/protobuf/stubs/type_traits_unittest.cc \ |
521 | + google/protobuf/descriptor_database_unittest.cc \ |
522 | + google/protobuf/descriptor_unittest.cc \ |
523 | + google/protobuf/dynamic_message_unittest.cc \ |
524 | + google/protobuf/extension_set_unittest.cc \ |
525 | + google/protobuf/generated_message_reflection_unittest.cc \ |
526 | + google/protobuf/message_unittest.cc \ |
527 | + google/protobuf/reflection_ops_unittest.cc \ |
528 | + google/protobuf/repeated_field_unittest.cc \ |
529 | + google/protobuf/repeated_field_reflection_unittest.cc \ |
530 | + google/protobuf/text_format_unittest.cc \ |
531 | + google/protobuf/unknown_field_set_unittest.cc \ |
532 | + google/protobuf/wire_format_unittest.cc \ |
533 | + google/protobuf/io/coded_stream_unittest.cc \ |
534 | + google/protobuf/io/printer_unittest.cc \ |
535 | + google/protobuf/io/tokenizer_unittest.cc \ |
536 | + google/protobuf/io/zero_copy_stream_unittest.cc \ |
537 | + google/protobuf/compiler/command_line_interface_unittest.cc \ |
538 | + google/protobuf/compiler/importer_unittest.cc \ |
539 | + google/protobuf/compiler/mock_code_generator.cc \ |
540 | + google/protobuf/compiler/mock_code_generator.h \ |
541 | + google/protobuf/compiler/parser_unittest.cc \ |
542 | + google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc \ |
543 | + google/protobuf/compiler/cpp/cpp_unittest.h \ |
544 | + google/protobuf/compiler/cpp/cpp_unittest.cc \ |
545 | + google/protobuf/compiler/cpp/cpp_plugin_unittest.cc \ |
546 | + google/protobuf/compiler/java/java_plugin_unittest.cc \ |
547 | + google/protobuf/compiler/java/java_doc_comment_unittest.cc \ |
548 | + google/protobuf/compiler/python/python_plugin_unittest.cc \ |
549 | + $(COMMON_TEST_SOURCES) |
550 | +nodist_protobuf_test_SOURCES = $(protoc_outputs) |
551 | + |
552 | +# Run cpp_unittest again with PROTOBUF_TEST_NO_DESCRIPTORS defined. |
553 | +protobuf_lazy_descriptor_test_LDADD = $(PTHREAD_LIBS) libprotobuf.la \ |
554 | + libprotoc.la \ |
555 | + $(top_builddir)/gtest/lib/libgtest.la \ |
556 | + $(top_builddir)/gtest/lib/libgtest_main.la |
557 | +protobuf_lazy_descriptor_test_CPPFLAGS = -I$(top_srcdir)/gtest/include \ |
558 | + -I$(top_builddir)/gtest/include \ |
559 | + -DPROTOBUF_TEST_NO_DESCRIPTORS |
560 | +protobuf_lazy_descriptor_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) |
561 | +protobuf_lazy_descriptor_test_SOURCES = \ |
562 | + google/protobuf/compiler/cpp/cpp_unittest.cc \ |
563 | + $(COMMON_TEST_SOURCES) |
564 | +nodist_protobuf_lazy_descriptor_test_SOURCES = $(protoc_outputs) |
565 | + |
566 | +# Build lite_unittest separately, since it doesn't use gtest. |
567 | +protobuf_lite_test_LDADD = $(PTHREAD_LIBS) libprotobuf-lite.la |
568 | +protobuf_lite_test_CXXFLAGS = $(NO_OPT_CXXFLAGS) |
569 | +protobuf_lite_test_SOURCES = \ |
570 | + google/protobuf/lite_unittest.cc \ |
571 | + google/protobuf/test_util_lite.cc \ |
572 | + google/protobuf/test_util_lite.h |
573 | +nodist_protobuf_lite_test_SOURCES = $(protoc_lite_outputs) |
574 | + |
575 | +# Test plugin binary. |
576 | +test_plugin_LDADD = $(PTHREAD_LIBS) libprotobuf.la libprotoc.la \ |
577 | + $(top_builddir)/gtest/lib/libgtest.la |
578 | +test_plugin_CPPFLAGS = -I$(top_srcdir)/gtest/include \ |
579 | + -I$(top_builddir)/gtest/include |
580 | +test_plugin_SOURCES = \ |
581 | + google/protobuf/compiler/mock_code_generator.cc \ |
582 | + google/protobuf/testing/file.cc \ |
583 | + google/protobuf/testing/file.h \ |
584 | + google/protobuf/compiler/test_plugin.cc |
585 | + |
586 | +if HAVE_ZLIB |
587 | +zcgzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la |
588 | +zcgzip_SOURCES = google/protobuf/testing/zcgzip.cc |
589 | + |
590 | +zcgunzip_LDADD = $(PTHREAD_LIBS) libprotobuf.la |
591 | +zcgunzip_SOURCES = google/protobuf/testing/zcgunzip.cc |
592 | +endif |
593 | + |
594 | +TESTS = protobuf-test protobuf-lazy-descriptor-test protobuf-lite-test \ |
595 | + google/protobuf/compiler/zip_output_unittest.sh $(GZTESTS) |
596 | diff --git a/.pc/Hide-unnecessary-exported-library-symbols.patch/src/libprotobuf-lite.map b/.pc/Hide-unnecessary-exported-library-symbols.patch/src/libprotobuf-lite.map |
597 | new file mode 100644 |
598 | index 0000000..e69de29 |
599 | --- /dev/null |
600 | +++ b/.pc/Hide-unnecessary-exported-library-symbols.patch/src/libprotobuf-lite.map |
601 | diff --git a/.pc/Hide-unnecessary-exported-library-symbols.patch/src/libprotobuf.map b/.pc/Hide-unnecessary-exported-library-symbols.patch/src/libprotobuf.map |
602 | new file mode 100644 |
603 | index 0000000..e69de29 |
604 | --- /dev/null |
605 | +++ b/.pc/Hide-unnecessary-exported-library-symbols.patch/src/libprotobuf.map |
606 | diff --git a/.pc/Hide-unnecessary-exported-library-symbols.patch/src/libprotoc.map b/.pc/Hide-unnecessary-exported-library-symbols.patch/src/libprotoc.map |
607 | new file mode 100644 |
608 | index 0000000..e69de29 |
609 | --- /dev/null |
610 | +++ b/.pc/Hide-unnecessary-exported-library-symbols.patch/src/libprotoc.map |
611 | diff --git a/.pc/applied-patches b/.pc/applied-patches |
612 | index 7bb8252..f4d82ca 100644 |
613 | --- a/.pc/applied-patches |
614 | +++ b/.pc/applied-patches |
615 | @@ -1 +1,2 @@ |
616 | debian-changes |
617 | +Hide-unnecessary-exported-library-symbols.patch |
618 | diff --git a/configure.ac b/configure.ac |
619 | index c07067c..353db7a 100644 |
620 | --- a/configure.ac |
621 | +++ b/configure.ac |
622 | @@ -74,6 +74,25 @@ ACX_CHECK_SUNCC |
623 | # to the link |
624 | AC_PROG_LIBTOOL |
625 | |
626 | +# Check whether the linker supports version scripts |
627 | +AC_MSG_CHECKING([whether the linker supports version scripts]) |
628 | +save_LDFLAGS=$LDFLAGS |
629 | +LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" |
630 | +cat > conftest.map <<EOF |
631 | +{ |
632 | + global: |
633 | + main; |
634 | + local: |
635 | + *; |
636 | +}; |
637 | +EOF |
638 | +AC_LINK_IFELSE( |
639 | + [AC_LANG_SOURCE([int main() { return 0; }])], |
640 | + [have_ld_version_script=yes; AC_MSG_RESULT(yes)], |
641 | + [have_ld_version_script=no; AC_MSG_RESULT(no)]) |
642 | +LDFLAGS=$save_LDFLAGS |
643 | +AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], [test "$have_ld_version_script" == "yes"]) |
644 | + |
645 | # Checks for header files. |
646 | AC_HEADER_STDC |
647 | AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stdlib.h unistd.h]) |
648 | diff --git a/debian/changelog b/debian/changelog |
649 | index 3d1951c..039598b 100644 |
650 | --- a/debian/changelog |
651 | +++ b/debian/changelog |
652 | @@ -1,3 +1,11 @@ |
653 | +protobuf (2.6.1-1.3ubuntu1) xenial; urgency=medium |
654 | + |
655 | + * debian/patches/Hide-unnecessary-exported-library-symbols.patch: |
656 | + - Backport upstream fix to hide unnecessary exported symbols |
657 | + (LP: #1667352) |
658 | + |
659 | + -- Alexandros Frantzis <alexandros.frantzis@canonical.com> Thu, 16 Mar 2017 14:06:01 +0200 |
660 | + |
661 | protobuf (2.6.1-1.3) unstable; urgency=medium |
662 | |
663 | * Non-maintainer upload. |
664 | diff --git a/debian/patches/Hide-unnecessary-exported-library-symbols.patch b/debian/patches/Hide-unnecessary-exported-library-symbols.patch |
665 | new file mode 100644 |
666 | index 0000000..49e9d17 |
667 | --- /dev/null |
668 | +++ b/debian/patches/Hide-unnecessary-exported-library-symbols.patch |
669 | @@ -0,0 +1,114 @@ |
670 | +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/protobuf/+bug/1667352 |
671 | +Origin: backport, https://github.com/google/protobuf/commit/c57c77b4b7b065a0f14c757f5b8983e136511067 |
672 | +Author: Alexandros Frantzis <alexandros.frantzis@canonical.com> |
673 | +Description: Hide unnecessary exported library symbols |
674 | + |
675 | +--- a/configure.ac |
676 | ++++ b/configure.ac |
677 | +@@ -74,6 +74,25 @@ ACX_CHECK_SUNCC |
678 | + # to the link |
679 | + AC_PROG_LIBTOOL |
680 | + |
681 | ++# Check whether the linker supports version scripts |
682 | ++AC_MSG_CHECKING([whether the linker supports version scripts]) |
683 | ++save_LDFLAGS=$LDFLAGS |
684 | ++LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map" |
685 | ++cat > conftest.map <<EOF |
686 | ++{ |
687 | ++ global: |
688 | ++ main; |
689 | ++ local: |
690 | ++ *; |
691 | ++}; |
692 | ++EOF |
693 | ++AC_LINK_IFELSE( |
694 | ++ [AC_LANG_SOURCE([int main() { return 0; }])], |
695 | ++ [have_ld_version_script=yes; AC_MSG_RESULT(yes)], |
696 | ++ [have_ld_version_script=no; AC_MSG_RESULT(no)]) |
697 | ++LDFLAGS=$save_LDFLAGS |
698 | ++AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], [test "$have_ld_version_script" == "yes"]) |
699 | ++ |
700 | + # Checks for header files. |
701 | + AC_HEADER_STDC |
702 | + AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stdlib.h unistd.h]) |
703 | +--- a/src/Makefile.am |
704 | ++++ b/src/Makefile.am |
705 | +@@ -97,6 +97,10 @@ lib_LTLIBRARIES = libprotobuf-lite.la li |
706 | + |
707 | + libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) |
708 | + libprotobuf_lite_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined |
709 | ++if HAVE_LD_VERSION_SCRIPT |
710 | ++libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map |
711 | ++EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map |
712 | ++endif |
713 | + libprotobuf_lite_la_SOURCES = \ |
714 | + google/protobuf/stubs/atomicops_internals_x86_gcc.cc \ |
715 | + google/protobuf/stubs/atomicops_internals_x86_msvc.cc \ |
716 | +@@ -119,6 +123,10 @@ libprotobuf_lite_la_SOURCES = |
717 | + |
718 | + libprotobuf_la_LIBADD = $(PTHREAD_LIBS) |
719 | + libprotobuf_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined |
720 | ++if HAVE_LD_VERSION_SCRIPT |
721 | ++libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map |
722 | ++EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map |
723 | ++endif |
724 | + libprotobuf_la_SOURCES = \ |
725 | + $(libprotobuf_lite_la_SOURCES) \ |
726 | + google/protobuf/stubs/strutil.cc \ |
727 | +@@ -148,6 +156,10 @@ libprotobuf_la_SOURCES = |
728 | + |
729 | + libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la |
730 | + libprotoc_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined |
731 | ++if HAVE_LD_VERSION_SCRIPT |
732 | ++libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map |
733 | ++EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map |
734 | ++endif |
735 | + libprotoc_la_SOURCES = \ |
736 | + google/protobuf/compiler/code_generator.cc \ |
737 | + google/protobuf/compiler/command_line_interface.cc \ |
738 | +@@ -259,6 +271,9 @@ EXTRA_DIST = |
739 | + google/protobuf/io/package_info.h \ |
740 | + google/protobuf/compiler/package_info.h \ |
741 | + google/protobuf/compiler/zip_output_unittest.sh \ |
742 | ++ libprotobuf-lite.map \ |
743 | ++ libprotobuf.map \ |
744 | ++ libprotoc.map \ |
745 | + google/protobuf/unittest_enormous_descriptor.proto |
746 | + |
747 | + protoc_lite_outputs = \ |
748 | +--- /dev/null |
749 | ++++ b/src/libprotobuf-lite.map |
750 | +@@ -0,0 +1,9 @@ |
751 | ++{ |
752 | ++ global: |
753 | ++ extern "C++" { |
754 | ++ *google*; |
755 | ++ }; |
756 | ++ |
757 | ++ local: |
758 | ++ *; |
759 | ++}; |
760 | +--- /dev/null |
761 | ++++ b/src/libprotobuf.map |
762 | +@@ -0,0 +1,9 @@ |
763 | ++{ |
764 | ++ global: |
765 | ++ extern "C++" { |
766 | ++ *google*; |
767 | ++ }; |
768 | ++ |
769 | ++ local: |
770 | ++ *; |
771 | ++}; |
772 | +--- /dev/null |
773 | ++++ b/src/libprotoc.map |
774 | +@@ -0,0 +1,9 @@ |
775 | ++{ |
776 | ++ global: |
777 | ++ extern "C++" { |
778 | ++ *google*; |
779 | ++ }; |
780 | ++ |
781 | ++ local: |
782 | ++ *; |
783 | ++}; |
784 | diff --git a/debian/patches/series b/debian/patches/series |
785 | index 7bb8252..f4d82ca 100644 |
786 | --- a/debian/patches/series |
787 | +++ b/debian/patches/series |
788 | @@ -1 +1,2 @@ |
789 | debian-changes |
790 | +Hide-unnecessary-exported-library-symbols.patch |
791 | diff --git a/src/Makefile.am b/src/Makefile.am |
792 | index 2a11695..c8d200d 100644 |
793 | --- a/src/Makefile.am |
794 | +++ b/src/Makefile.am |
795 | @@ -97,6 +97,10 @@ lib_LTLIBRARIES = libprotobuf-lite.la libprotobuf.la libprotoc.la |
796 | |
797 | libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS) |
798 | libprotobuf_lite_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined |
799 | +if HAVE_LD_VERSION_SCRIPT |
800 | +libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map |
801 | +EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map |
802 | +endif |
803 | libprotobuf_lite_la_SOURCES = \ |
804 | google/protobuf/stubs/atomicops_internals_x86_gcc.cc \ |
805 | google/protobuf/stubs/atomicops_internals_x86_msvc.cc \ |
806 | @@ -119,6 +123,10 @@ libprotobuf_lite_la_SOURCES = \ |
807 | |
808 | libprotobuf_la_LIBADD = $(PTHREAD_LIBS) |
809 | libprotobuf_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined |
810 | +if HAVE_LD_VERSION_SCRIPT |
811 | +libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map |
812 | +EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map |
813 | +endif |
814 | libprotobuf_la_SOURCES = \ |
815 | $(libprotobuf_lite_la_SOURCES) \ |
816 | google/protobuf/stubs/strutil.cc \ |
817 | @@ -148,6 +156,10 @@ libprotobuf_la_SOURCES = \ |
818 | |
819 | libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la |
820 | libprotoc_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined |
821 | +if HAVE_LD_VERSION_SCRIPT |
822 | +libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map |
823 | +EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map |
824 | +endif |
825 | libprotoc_la_SOURCES = \ |
826 | google/protobuf/compiler/code_generator.cc \ |
827 | google/protobuf/compiler/command_line_interface.cc \ |
828 | @@ -259,6 +271,9 @@ EXTRA_DIST = \ |
829 | google/protobuf/io/package_info.h \ |
830 | google/protobuf/compiler/package_info.h \ |
831 | google/protobuf/compiler/zip_output_unittest.sh \ |
832 | + libprotobuf-lite.map \ |
833 | + libprotobuf.map \ |
834 | + libprotoc.map \ |
835 | google/protobuf/unittest_enormous_descriptor.proto |
836 | |
837 | protoc_lite_outputs = \ |
838 | diff --git a/src/libprotobuf-lite.map b/src/libprotobuf-lite.map |
839 | new file mode 100644 |
840 | index 0000000..3915546 |
841 | --- /dev/null |
842 | +++ b/src/libprotobuf-lite.map |
843 | @@ -0,0 +1,9 @@ |
844 | +{ |
845 | + global: |
846 | + extern "C++" { |
847 | + *google*; |
848 | + }; |
849 | + |
850 | + local: |
851 | + *; |
852 | +}; |
853 | diff --git a/src/libprotobuf.map b/src/libprotobuf.map |
854 | new file mode 100644 |
855 | index 0000000..3915546 |
856 | --- /dev/null |
857 | +++ b/src/libprotobuf.map |
858 | @@ -0,0 +1,9 @@ |
859 | +{ |
860 | + global: |
861 | + extern "C++" { |
862 | + *google*; |
863 | + }; |
864 | + |
865 | + local: |
866 | + *; |
867 | +}; |
868 | diff --git a/src/libprotoc.map b/src/libprotoc.map |
869 | new file mode 100644 |
870 | index 0000000..3915546 |
871 | --- /dev/null |
872 | +++ b/src/libprotoc.map |
873 | @@ -0,0 +1,9 @@ |
874 | +{ |
875 | + global: |
876 | + extern "C++" { |
877 | + *google*; |
878 | + }; |
879 | + |
880 | + local: |
881 | + *; |
882 | +}; |