Bug 1582574 - Make minidump_stackwalk toolchain binary compatible with both older and newer Debian/Ubuntu. r=froydnj
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 25 Sep 2019 22:03:16 +0000
changeset 494996 382a41b6d4767b25c4d61196d865eaa1f6a1d0bb
parent 494995 f59ec3966f5f3242b18a188b52217496ec65b42a
child 494997 e79b84e42250763cf51680a7314d614ad0e3006f
push id114131
push userdluca@mozilla.com
push dateThu, 26 Sep 2019 09:47:34 +0000
treeherdermozilla-inbound@1dc1a755079a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1582574
milestone71.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1582574 - Make minidump_stackwalk toolchain binary compatible with both older and newer Debian/Ubuntu. r=froydnj Differential Revision: https://phabricator.services.mozilla.com/D46538
tools/crashreporter/minidump_stackwalk/curl-compat/curl-compat.c
tools/crashreporter/minidump_stackwalk/curl-compat/moz.build
tools/crashreporter/minidump_stackwalk/moz.build
new file mode 100644
--- /dev/null
+++ b/tools/crashreporter/minidump_stackwalk/curl-compat/curl-compat.c
@@ -0,0 +1,10 @@
+/* Any copyright is dedicated to the public domain.
+   http://creativecommons.org/publicdomain/zero/1.0/ */
+
+void curl_easy_cleanup() {}
+void curl_easy_escape() {}
+void curl_easy_getinfo() {}
+void curl_easy_init() {}
+void curl_easy_perform() {}
+void curl_easy_setopt() {}
+void curl_free() {}
new file mode 100644
--- /dev/null
+++ b/tools/crashreporter/minidump_stackwalk/curl-compat/moz.build
@@ -0,0 +1,20 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# This creates a fake libcurl.so that exposes enough of the curl ABI that
+# linking minidump_stackwalk against it works. Because the fake libcurl.so
+# comes with no symbol versions, the resulting minidump_stackwalk doesn't
+# require specific symbol versions, making it binary compatible with any
+# libcurl.so.4 that provide the symbols, independently of the symbol version
+# they use. That means it works on systems before and after the switch to
+# openssl 1.1. That includes older and newer Ubuntu and Debian systems.
+SharedLibrary('curl')
+
+NoVisibilityFlags()
+
+DIST_INSTALL = False
+
+SOURCES += ['curl-compat.c']
+
+LDFLAGS += ['-Wl,-soname,libcurl.so.4']
--- a/tools/crashreporter/minidump_stackwalk/moz.build
+++ b/tools/crashreporter/minidump_stackwalk/moz.build
@@ -21,14 +21,17 @@ if CONFIG['OS_TARGET'] == 'WINNT':
         DEFINES['__USE_MINGW_ANSI_STDIO'] = True
 
         LDFLAGS += [
             '-static-libgcc',
             '-static-libstdc++',
         ]
 
     OS_LIBS += ['wininet']
+elif CONFIG['OS_TARGET'] == 'Linux':
+    USE_LIBS += ['curl']
+    DIRS += ['curl-compat']
 else:
     OS_LIBS += ['curl']
 
 DisableStlWrapping()
 
 include('/toolkit/crashreporter/crashreporter.mozbuild')