Merge ~mir-team/protobuf/+git/protobuf-xenial:hide-unnecessary-symbols into ~mir-team/protobuf/+git/protobuf-xenial:bileto

Proposed by Alexandros Frantzis
Status: Superseded
Proposed branch: ~mir-team/protobuf/+git/protobuf-xenial:hide-unnecessary-symbols
Merge into: ~mir-team/protobuf/+git/protobuf-xenial:bileto
Diff against target: 143 lines (+123/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/Hide-unnecessary-exported-library-symbols.patch (+114/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Mir development team Pending
Review via email: mp+320171@code.launchpad.net
To post a comment you must log in.

Unmerged commits

d17cc50... by Alexandros Frantzis

Hide-unnecessary-exported-library-symbols.patch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 3d1951c..01d2515 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+protobuf (2.6.1-1.3ubuntu1) UNRELEASED; urgency=medium
7+
8+ * debian/patches/Hide-unnecessary-exported-library-symbols.patch:
9+ - Backport upstream fix to hide unnecessary exported symbols
10+ (LP: #1667352)
11+
12+ -- Alexandros Frantzis <alexandros.frantzis@canonical.com> Thu, 16 Mar 2017 14:06:01 +0200
13+
14 protobuf (2.6.1-1.3) unstable; urgency=medium
15
16 * Non-maintainer upload.
17diff --git a/debian/patches/Hide-unnecessary-exported-library-symbols.patch b/debian/patches/Hide-unnecessary-exported-library-symbols.patch
18new file mode 100644
19index 0000000..49e9d17
20--- /dev/null
21+++ b/debian/patches/Hide-unnecessary-exported-library-symbols.patch
22@@ -0,0 +1,114 @@
23+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/protobuf/+bug/1667352
24+Origin: backport, https://github.com/google/protobuf/commit/c57c77b4b7b065a0f14c757f5b8983e136511067
25+Author: Alexandros Frantzis <alexandros.frantzis@canonical.com>
26+Description: Hide unnecessary exported library symbols
27+
28+--- a/configure.ac
29++++ b/configure.ac
30+@@ -74,6 +74,25 @@ ACX_CHECK_SUNCC
31+ # to the link
32+ AC_PROG_LIBTOOL
33+
34++# Check whether the linker supports version scripts
35++AC_MSG_CHECKING([whether the linker supports version scripts])
36++save_LDFLAGS=$LDFLAGS
37++LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
38++cat > conftest.map <<EOF
39++{
40++ global:
41++ main;
42++ local:
43++ *;
44++};
45++EOF
46++AC_LINK_IFELSE(
47++ [AC_LANG_SOURCE([int main() { return 0; }])],
48++ [have_ld_version_script=yes; AC_MSG_RESULT(yes)],
49++ [have_ld_version_script=no; AC_MSG_RESULT(no)])
50++LDFLAGS=$save_LDFLAGS
51++AM_CONDITIONAL([HAVE_LD_VERSION_SCRIPT], [test "$have_ld_version_script" == "yes"])
52++
53+ # Checks for header files.
54+ AC_HEADER_STDC
55+ AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stdlib.h unistd.h])
56+--- a/src/Makefile.am
57++++ b/src/Makefile.am
58+@@ -97,6 +97,10 @@ lib_LTLIBRARIES = libprotobuf-lite.la li
59+
60+ libprotobuf_lite_la_LIBADD = $(PTHREAD_LIBS)
61+ libprotobuf_lite_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined
62++if HAVE_LD_VERSION_SCRIPT
63++libprotobuf_lite_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf-lite.map
64++EXTRA_libprotobuf_lite_la_DEPENDENCIES = libprotobuf-lite.map
65++endif
66+ libprotobuf_lite_la_SOURCES = \
67+ google/protobuf/stubs/atomicops_internals_x86_gcc.cc \
68+ google/protobuf/stubs/atomicops_internals_x86_msvc.cc \
69+@@ -119,6 +123,10 @@ libprotobuf_lite_la_SOURCES =
70+
71+ libprotobuf_la_LIBADD = $(PTHREAD_LIBS)
72+ libprotobuf_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined
73++if HAVE_LD_VERSION_SCRIPT
74++libprotobuf_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotobuf.map
75++EXTRA_libprotobuf_la_DEPENDENCIES = libprotobuf.map
76++endif
77+ libprotobuf_la_SOURCES = \
78+ $(libprotobuf_lite_la_SOURCES) \
79+ google/protobuf/stubs/strutil.cc \
80+@@ -148,6 +156,10 @@ libprotobuf_la_SOURCES =
81+
82+ libprotoc_la_LIBADD = $(PTHREAD_LIBS) libprotobuf.la
83+ libprotoc_la_LDFLAGS = -version-info 9:1:0 -export-dynamic -no-undefined
84++if HAVE_LD_VERSION_SCRIPT
85++libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map
86++EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map
87++endif
88+ libprotoc_la_SOURCES = \
89+ google/protobuf/compiler/code_generator.cc \
90+ google/protobuf/compiler/command_line_interface.cc \
91+@@ -259,6 +271,9 @@ EXTRA_DIST =
92+ google/protobuf/io/package_info.h \
93+ google/protobuf/compiler/package_info.h \
94+ google/protobuf/compiler/zip_output_unittest.sh \
95++ libprotobuf-lite.map \
96++ libprotobuf.map \
97++ libprotoc.map \
98+ google/protobuf/unittest_enormous_descriptor.proto
99+
100+ protoc_lite_outputs = \
101+--- /dev/null
102++++ b/src/libprotobuf-lite.map
103+@@ -0,0 +1,9 @@
104++{
105++ global:
106++ extern "C++" {
107++ *google*;
108++ };
109++
110++ local:
111++ *;
112++};
113+--- /dev/null
114++++ b/src/libprotobuf.map
115+@@ -0,0 +1,9 @@
116++{
117++ global:
118++ extern "C++" {
119++ *google*;
120++ };
121++
122++ local:
123++ *;
124++};
125+--- /dev/null
126++++ b/src/libprotoc.map
127+@@ -0,0 +1,9 @@
128++{
129++ global:
130++ extern "C++" {
131++ *google*;
132++ };
133++
134++ local:
135++ *;
136++};
137diff --git a/debian/patches/series b/debian/patches/series
138index 7bb8252..f4d82ca 100644
139--- a/debian/patches/series
140+++ b/debian/patches/series
141@@ -1 +1,2 @@
142 debian-changes
143+Hide-unnecessary-exported-library-symbols.patch

Subscribers

People subscribed via source and target branches

to all changes: