diff options
-rwxr-xr-x | third_party/instrumented_libraries/download_build_install.py | 21 | ||||
-rw-r--r-- | third_party/instrumented_libraries/instrumented_libraries.gyp | 95 |
2 files changed, 94 insertions, 22 deletions
diff --git a/third_party/instrumented_libraries/download_build_install.py b/third_party/instrumented_libraries/download_build_install.py index 7fddba2..eb450ab 100755 --- a/third_party/instrumented_libraries/download_build_install.py +++ b/third_party/instrumented_libraries/download_build_install.py @@ -111,10 +111,12 @@ def destdir_configure_make_install(parsed_arguments, environment, run_shell_commands(build_and_install_in_destdir, parsed_arguments.verbose, environment) fix_rpaths(destdir) - shell_call( + run_shell_commands([ # Now move the contents of the temporary destdir to their final place. - 'cp %s/* %s/ -rdf' % (destdir, install_prefix), - parsed_arguments.verbose, environment) + # We only care for the contents of lib/. + 'mkdir -p %s/lib' % install_prefix, + 'cp %s/lib/* %s/lib/ -rdf' % (destdir, install_prefix)], + parsed_arguments.verbose, environment) def nss_make_and_copy(parsed_arguments, environment, install_prefix): @@ -176,10 +178,12 @@ def libcap2_make_install(parsed_arguments, environment, install_prefix): (parsed_arguments.jobs, ' '.join(install_args)), parsed_arguments.verbose, environment) fix_rpaths(destdir) - shell_call([ + run_shell_commands([ # Now move the contents of the temporary destdir to their final place. - 'cp %s/* %s/ -rdf' % (destdir, install_prefix)], - parsed_arguments.verbose, environment) + # We only care for the contents of lib/. + 'mkdir -p %s/lib' % install_prefix, + 'cp %s/lib/* %s/lib/ -rdf' % (destdir, install_prefix)], + parsed_arguments.verbose, environment) def libpci3_make_install(parsed_arguments, environment, install_prefix): @@ -220,10 +224,9 @@ def libpci3_make_install(parsed_arguments, environment, install_prefix): ' '.join(install_args + paths))], parsed_arguments.verbose, environment) fix_rpaths(destdir) - # Now move the contents of the temporary destdir to their final place. + # Now install the DSOs to their final place. run_shell_commands([ - 'cp %s/* %s/ -rd' % (destdir, install_prefix), - 'mkdir -p %s/lib/' % install_prefix, + 'mkdir -p %s/lib' % install_prefix, 'install -m 644 lib/libpci.so* %s/lib/' % install_prefix, 'ln -sf libpci.so.%s %s/lib/libpci.so.3' % (version, install_prefix)], parsed_arguments.verbose, environment) diff --git a/third_party/instrumented_libraries/instrumented_libraries.gyp b/third_party/instrumented_libraries/instrumented_libraries.gyp index 195ce30..572846a 100644 --- a/third_party/instrumented_libraries/instrumented_libraries.gyp +++ b/third_party/instrumented_libraries/instrumented_libraries.gyp @@ -31,6 +31,11 @@ 'target_defaults': { 'build_method': 'destdir', + # Every package must have --disable-static in configure flags to avoid + # building unnecessary static libs. Ideally we should add it here. + # Unfortunately, zlib1g doesn't support that flag and for some reason it + # can't be removed with a GYP exclusion list. So instead we add that flag + # manually to every package but zlib1g. 'extra_configure_flags': [], 'jobs': '<(instrumented_libraries_jobs)', 'package_cflags': [ @@ -178,36 +183,46 @@ { 'package_name': 'freetype', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'run_before_build': 'scripts/freetype.sh', 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libcairo2', 'dependencies=': [], - 'extra_configure_flags': ['--disable-gtk-doc'], + 'extra_configure_flags': [ + '--disable-gtk-doc', + '--disable-static', + ], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libdbus-1-3', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libdbus-glib-1-2', 'dependencies=': [], - # Use system dbus-binding-tool. The just-built one is instrumented but - # doesn't have the correct RPATH, and will crash. - 'extra_configure_flags': ['--with-dbus-binding-tool=dbus-binding-tool'], + 'extra_configure_flags': [ + # Use system dbus-binding-tool. The just-built one is instrumented but + # doesn't have the correct RPATH, and will crash. + '--with-dbus-binding-tool=dbus-binding-tool', + '--disable-static', + ], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libexpat1', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libffi6', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { @@ -216,6 +231,7 @@ 'extra_configure_flags': [ '--disable-docs', '--sysconfdir=/etc/', + '--disable-static', # From debian/rules. '--with-add-fonts=/usr/X11R6/lib/X11/fonts,/usr/local/share/fonts', ], @@ -236,7 +252,7 @@ # From debian/rules. '--enable-noexecstack', '--enable-ld-version-script', - '--enable-static', + '--disable-static', # http://crbug.com/344505 '--disable-asm' ], @@ -249,6 +265,7 @@ '--disable-gtk-doc', '--disable-gtk-doc-html', '--disable-gtk-doc-pdf', + '--disable-static', ], 'asan_blacklist': 'blacklists/asan/libglib2.0-0.txt', 'msan_blacklist': 'blacklists/msan/libglib2.0-0.txt', @@ -258,6 +275,7 @@ { 'package_name': 'libgpg-error0', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { @@ -265,6 +283,7 @@ 'dependencies=': [], 'extra_configure_flags': [ '--enable-64bit', + '--disable-static', # TSan reports data races on debug variables. '--disable-debug', ], @@ -274,6 +293,7 @@ { 'package_name': 'libp11-kit0', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], # Required on Trusty due to autoconf version mismatch. 'run_before_build': 'scripts/autoreconf.sh', 'includes': ['standard_instrumented_package_target.gypi'], @@ -284,6 +304,7 @@ 'extra_configure_flags': [ '--enable-utf8', '--enable-unicode-properties', + '--disable-static', ], 'includes': ['standard_instrumented_package_target.gypi'], }, @@ -291,6 +312,7 @@ 'package_name': 'libpixman-1-0', 'dependencies=': [], 'extra_configure_flags': [ + '--disable-static', # From debian/rules. '--disable-gtk', '--disable-silent-rules', @@ -301,12 +323,16 @@ { 'package_name': 'libpng12-0', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libx11-6', 'dependencies=': [], - 'extra_configure_flags': ['--disable-specs'], + 'extra_configure_flags': [ + '--disable-specs', + '--disable-static', + ], 'msan_blacklist': 'blacklists/msan/libx11-6.txt', # Required on Trusty due to autoconf version mismatch. 'run_before_build': 'scripts/autoreconf.sh', @@ -315,12 +341,16 @@ { 'package_name': 'libxau6', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libxcb1', 'dependencies=': [], - 'extra_configure_flags': ['--disable-build-docs'], + 'extra_configure_flags': [ + '--disable-build-docs', + '--disable-static', + ], 'conditions': [ ['"<(_ubuntu_release)"=="precise"', { # Backport fix for https://bugs.freedesktop.org/show_bug.cgi?id=54671 @@ -334,33 +364,43 @@ { 'package_name': 'libxcomposite1', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libxcursor1', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libxdamage1', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libxdmcp6', 'dependencies=': [], - 'extra_configure_flags': ['--disable-docs'], + 'extra_configure_flags': [ + '--disable-docs', + '--disable-static', + ], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libxext6', 'dependencies=': [], - 'extra_configure_flags': ['--disable-specs'], + 'extra_configure_flags': [ + '--disable-specs', + '--disable-static', + ], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libxfixes3', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { @@ -369,38 +409,47 @@ 'extra_configure_flags': [ '--disable-specs', '--disable-docs', + '--disable-static', ], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libxinerama1', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libxrandr2', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libxrender1', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libxss1', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'libxtst6', 'dependencies=': [], - 'extra_configure_flags': ['--disable-specs'], + 'extra_configure_flags': [ + '--disable-specs', + '--disable-static', + ], 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'zlib1g', 'dependencies=': [], + # --disable-static is not supported 'patch': 'patches/zlib1g.diff', 'includes': ['standard_instrumented_package_target.gypi'], }, @@ -427,6 +476,7 @@ }], ], 'extra_configure_flags': [ + '--disable-static', # From debian/rules. '--enable-x11', '--disable-hal-compat', @@ -440,6 +490,7 @@ { 'package_name': 'libasound2', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'run_before_build': 'scripts/libasound2.sh', 'includes': ['standard_instrumented_package_target.gypi'], }, @@ -449,6 +500,7 @@ 'patch': 'patches/libcups2.diff', 'jobs': 1, 'extra_configure_flags': [ + '--disable-static', # All from debian/rules. '--localedir=/usr/share/cups/locale', '--enable-slp', @@ -457,7 +509,6 @@ '--enable-gnutls', '--disable-openssl', '--enable-threads', - '--enable-static', '--enable-debug', '--enable-dbus', '--with-dbusdir=/etc/dbus-1', @@ -479,6 +530,7 @@ 'package_name': 'pango1.0', 'dependencies=': [], 'extra_configure_flags': [ + '--disable-static', # Avoid https://bugs.gentoo.org/show_bug.cgi?id=425620 '--enable-introspection=no', # Pango is normally used with dynamically loaded modules. However, @@ -492,6 +544,7 @@ { 'package_name': 'libcap2', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'build_method': 'custom_libcap', 'includes': ['standard_instrumented_package_target.gypi'], }, @@ -499,6 +552,7 @@ 'package_name': 'udev', 'dependencies=': [], 'extra_configure_flags': [ + '--disable-static', # Without this flag there's a linking step that doesn't honor LDFLAGS # and fails. # TODO(earthdok): find a better fix. @@ -511,6 +565,7 @@ 'package_name': 'libtasn1-3', 'dependencies=': [], 'extra_configure_flags': [ + '--disable-static', # From debian/rules. '--enable-ld-version-script', ], @@ -520,6 +575,7 @@ 'package_name': 'libtasn1-6', 'dependencies=': [], 'extra_configure_flags': [ + '--disable-static', # From debian/rules. '--enable-ld-version-script', ], @@ -528,8 +584,7 @@ { 'package_name': 'libgnome-keyring0', 'extra_configure_flags': [ - # Build static libs (from debian/rules). - '--enable-static', + '--disable-static', '--enable-tests=no', # Make the build less problematic. '--disable-introspection', @@ -542,6 +597,7 @@ 'package_name': 'libgtk2.0-0', 'package_cflags': ['-Wno-return-type'], 'extra_configure_flags': [ + '--disable-static', # From debian/rules. '--prefix=/usr', '--sysconfdir=/etc', @@ -563,6 +619,7 @@ { 'package_name': 'libgdk-pixbuf2.0-0', 'extra_configure_flags': [ + '--disable-static', # From debian/rules. '--with-libjasper', '--with-x11', @@ -576,6 +633,7 @@ { 'package_name': 'libpci3', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'build_method': 'custom_libpci3', 'jobs': 1, 'includes': ['standard_instrumented_package_target.gypi'], @@ -583,6 +641,7 @@ { 'package_name': 'libdbusmenu-glib4', 'extra_configure_flags': [ + '--disable-static', # From debian/rules. '--disable-scrollkeeper', '--enable-gtk-doc', @@ -599,6 +658,7 @@ { 'package_name': 'overlay-scrollbar', 'extra_configure_flags': [ + '--disable-static', '--with-gtk=2', ], 'dependencies=': [], @@ -608,6 +668,7 @@ { 'package_name': 'libgconf-2-4', 'extra_configure_flags': [ + '--disable-static', # From debian/rules. (Even though --with-gtk=3.0 doesn't make sense.) '--with-gtk=3.0', '--disable-orbit', @@ -620,6 +681,7 @@ { 'package_name': 'libappindicator1', 'extra_configure_flags': [ + '--disable-static', # See above. '--disable-introspection', ], @@ -631,6 +693,7 @@ { 'package_name': 'libdbusmenu', 'extra_configure_flags': [ + '--disable-static', # From debian/rules. '--disable-scrollkeeper', '--with-gtk=2', @@ -645,6 +708,7 @@ { 'package_name': 'atk1.0', 'extra_configure_flags': [ + '--disable-static', # See above. '--disable-introspection', ], @@ -654,12 +718,14 @@ { 'package_name': 'libunity9', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], 'run_before_build': 'scripts/autogen.sh', 'includes': ['standard_instrumented_package_target.gypi'], }, { 'package_name': 'dee', 'extra_configure_flags': [ + '--disable-static', # See above. '--disable-introspection', ], @@ -671,6 +737,7 @@ 'package_name': 'harfbuzz', 'package_cflags': ['-Wno-c++11-narrowing'], 'extra_configure_flags': [ + '--disable-static', # From debian/rules. '--with-graphite2=yes', '--with-gobject', @@ -683,6 +750,7 @@ { 'package_name': 'brltty', 'extra_configure_flags': [ + '--disable-static', # From debian/rules. '--without-viavoice', '--without-theta', @@ -703,6 +771,7 @@ { 'package_name': 'libva1', 'dependencies=': [], + 'extra_configure_flags': ['--disable-static'], # Backport a use-after-free fix: # http://cgit.freedesktop.org/libva/diff/va/va.c?h=staging&id=d4988142a3f2256e38c5c5cdcdfc1b4f5f3c1ea9 'patch': 'patches/libva1.diff', |