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