summaryrefslogtreecommitdiffstats
path: root/third_party/instrumented_libraries/patches
diff options
context:
space:
mode:
authorearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-27 15:51:54 +0000
committerearthdok@chromium.org <earthdok@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-27 15:51:54 +0000
commit848e8e4616cd71d9fb4c220b31a20bc176f17c5d (patch)
tree5f71027124c1d60f218c22e0c75501ec232991cb /third_party/instrumented_libraries/patches
parent10f7c534e2017eb8614bd6c02a4043188bad199b (diff)
downloadchromium_src-848e8e4616cd71d9fb4c220b31a20bc176f17c5d.zip
chromium_src-848e8e4616cd71d9fb4c220b31a20bc176f17c5d.tar.gz
chromium_src-848e8e4616cd71d9fb4c220b31a20bc176f17c5d.tar.bz2
Instrumented libraries: improve handling of custom patches.
- pass the patch as a command line argument to the build script, instead of applying it through run_before_build, - add each patch and run_before_build script to inputs for its corresponding library, - move patches and scripts to their own subdirectories, - also, fix a small error in the build configuration for libappindicator1. BUG=313751 R=glider@chromium.org NOTRY=true TEST=compile Review URL: https://codereview.chromium.org/361473002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@280338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/instrumented_libraries/patches')
-rw-r--r--third_party/instrumented_libraries/patches/libcups2.diff31
-rw-r--r--third_party/instrumented_libraries/patches/libfontconfig.diff13
-rw-r--r--third_party/instrumented_libraries/patches/libgdk-pixbuf2.0-0.diff14
-rw-r--r--third_party/instrumented_libraries/patches/libgtk2.0-0.diff41
-rw-r--r--third_party/instrumented_libraries/patches/nss.diff30
-rw-r--r--third_party/instrumented_libraries/patches/pulseaudio.diff16
-rw-r--r--third_party/instrumented_libraries/patches/zlib1g.diff12
7 files changed, 157 insertions, 0 deletions
diff --git a/third_party/instrumented_libraries/patches/libcups2.diff b/third_party/instrumented_libraries/patches/libcups2.diff
new file mode 100644
index 0000000..49b262f
--- /dev/null
+++ b/third_party/instrumented_libraries/patches/libcups2.diff
@@ -0,0 +1,31 @@
+diff -rupN ./man/Makefile ../cups-1.5.3-patched/man/Makefile
+--- ./man/Makefile 2014-01-31 20:19:55.000000000 +0400
++++ ../cups-1.5.3-patched/man/Makefile 2014-01-31 20:21:56.449781676 +0400
+@@ -69,6 +69,12 @@ MAN8 = cupsaccept.$(MAN8EXT) \
+
+ LANGUAGES=de fr
+
++# Man pages build may fail. We don't need those in instrumented builds anyway.
++MAN1 =
++MAN5 =
++MAN7 =
++MAN8 =
++
+ #
+ # Make everything...
+ #
+diff -rupN ./man/Makefile.l10n ../cups-1.5.3-patched/man/Makefile.l10n
+--- ./man/Makefile.l10n 2014-01-31 20:19:55.000000000 +0400
++++ ../cups-1.5.3-patched/man/Makefile.l10n 2014-01-31 20:22:13.889535988 +0400
+@@ -57,6 +57,11 @@ MAN8 = cupsaccept.$(MAN8EXT) \
+ lpmove.$(MAN8EXT) \
+ lpc.$(MAN8EXT)
+
++# Man pages build may fail. We don't need those in instrumented builds anyway.
++MAN1 =
++MAN5 =
++MAN7 =
++MAN8 =
+
+ #
+ # Make everything...
diff --git a/third_party/instrumented_libraries/patches/libfontconfig.diff b/third_party/instrumented_libraries/patches/libfontconfig.diff
new file mode 100644
index 0000000..19f85f7
--- /dev/null
+++ b/third_party/instrumented_libraries/patches/libfontconfig.diff
@@ -0,0 +1,13 @@
+diff -rupN ./src/fcpat.c ../fontconfig-2.8.0-patched/src/fcpat.c
+--- ./src/fcpat.c 2009-11-17 01:46:18.000000000 +0300
++++ ../fontconfig-2.8.0-patched/src/fcpat.c 2014-01-27 20:11:36.185213935 +0400
+@@ -37,6 +37,9 @@ FcPatternCreate (void)
+ p = (FcPattern *) malloc (sizeof (FcPattern));
+ if (!p)
+ return 0;
++ // Silence Valgrind/MemorySanitizer. There is uninitialized padding at the
++ // end of this structure. When serialized to file, this will cause a report.
++ memset(p, 0, sizeof(*p));
+ FcMemAlloc (FC_MEM_PATTERN, sizeof (FcPattern));
+ p->num = 0;
+ p->size = 0;
diff --git a/third_party/instrumented_libraries/patches/libgdk-pixbuf2.0-0.diff b/third_party/instrumented_libraries/patches/libgdk-pixbuf2.0-0.diff
new file mode 100644
index 0000000..5bc3963
--- /dev/null
+++ b/third_party/instrumented_libraries/patches/libgdk-pixbuf2.0-0.diff
@@ -0,0 +1,14 @@
+diff -rupN ./gdk-pixbuf/Makefile.am ../gdk-pixbuf-2.26.1-patched/gdk-pixbuf/Makefile.am
+--- ./gdk-pixbuf/Makefile.am 2012-04-14 22:11:34.000000000 +0400
++++ ../gdk-pixbuf-2.26.1-patched/gdk-pixbuf/Makefile.am 2014-04-17 19:37:22.105253318 +0400
+@@ -782,7 +782,9 @@ loaders.cache: $(loader_LTLIBRARIES) gdk
+ LOADERS=`echo libpixbufloader-*.la` ; \
+ if test "x$$LOADERS" != 'xlibpixbufloader-*.la' ; then \
+ echo "Writing a loaders.cache file to use when running examples before installing gdk-pixbuf."; \
+- $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders $$LOADERS > ./loaders.cache ;\
++ # Use the system-installed gdk-pixbuf-query-loaders. The just-built one \
++ # won't work. \
++ gdk-pixbuf-query-loaders $$LOADERS > ./loaders.cache ;\
+ else \
+ echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \
+ touch loaders.cache; \
diff --git a/third_party/instrumented_libraries/patches/libgtk2.0-0.diff b/third_party/instrumented_libraries/patches/libgtk2.0-0.diff
new file mode 100644
index 0000000..71a0224
--- /dev/null
+++ b/third_party/instrumented_libraries/patches/libgtk2.0-0.diff
@@ -0,0 +1,41 @@
+diff -rupN ./gtk/gtkmain.c ../gtk+2.0-2.24.10-patched/gtk/gtkmain.c
+--- ./gtk/gtkmain.c 2014-05-29 19:39:07.000000000 +0400
++++ ../gtk+2.0-2.24.10-patched/gtk/gtkmain.c 2014-05-29 19:44:00.368263970 +0400
+@@ -759,7 +759,7 @@ _overlay_scrollbar_init (void)
+ return;
+
+ /* default extension library to use for this release */
+- gchar *path = "/usr/lib/liboverlay-scrollbar-0.2.so.0";
++ gchar *path = "liboverlay-scrollbar-0.2.so.0";
+
+ module = g_module_open (path, G_MODULE_BIND_LOCAL);
+ if (module == NULL)
+diff -rupN ./gtk/gtkmenushell.h ../gtk+2.0-2.24.10-patched/gtk/gtkmenushell.h
+--- ./gtk/gtkmenushell.h 2011-08-16 06:30:52.000000000 +0400
++++ ../gtk+2.0-2.24.10-patched/gtk/gtkmenushell.h 2014-05-29 19:42:28.029449496 +0400
+@@ -135,7 +135,9 @@ void _gtk_menu_shell_update_mnemonic
+ void _gtk_menu_shell_set_keyboard_mode (GtkMenuShell *menu_shell,
+ gboolean keyboard_mode);
+ gboolean _gtk_menu_shell_get_keyboard_mode (GtkMenuShell *menu_shell);
+-
++// https://bugs.launchpad.net/bugs/945135
++gboolean ubuntu_gtk_menu_shell_activate_mnemonic (GtkMenuShell *shell, GtkWidget *item);
++gboolean ubuntu_gtk_menu_shell_activate_first (GtkMenuShell *menu_shell, gboolean search_sensitive);
+ G_END_DECLS
+
+ #endif /* __GTK_MENU_SHELL_H__ */
+diff -rupN ./gtk/Makefile.am ../gtk+2.0-2.24.10-patched/gtk/Makefile.am
+--- ./gtk/Makefile.am 2014-05-29 19:39:07.000000000 +0400
++++ ../gtk+2.0-2.24.10-patched/gtk/Makefile.am 2014-05-29 19:42:28.029449496 +0400
+@@ -1391,8 +1391,10 @@ stamp-icons: $(STOCK_ICONS)
+ if CROSS_COMPILING
+ gtk_update_icon_cache_program = $(GTK_UPDATE_ICON_CACHE)
+ else
++# Use the system-installed, uninstrumented gtk-update-icon-cache. The
++# just-built one cannot be used because it doesn't have the right RPATH set.
+ gtk_update_icon_cache_program = \
+- ./gtk-update-icon-cache
++ gtk-update-icon-cache
+ endif
+
+ gtkbuiltincache.h: @REBUILD@ stamp-icons
diff --git a/third_party/instrumented_libraries/patches/nss.diff b/third_party/instrumented_libraries/patches/nss.diff
new file mode 100644
index 0000000..24adde7
--- /dev/null
+++ b/third_party/instrumented_libraries/patches/nss.diff
@@ -0,0 +1,30 @@
+diff -rupN ./nss/lib/freebl/Makefile ../nss-3.15.4-patched/nss/lib/freebl/Makefile
+--- ./nss/lib/freebl/Makefile 2014-01-03 23:59:10.000000000 +0400
++++ ../nss-3.15.4-patched/nss/lib/freebl/Makefile 2014-06-27 00:07:28.017558175 +0400
+@@ -179,18 +179,20 @@ endif # Darwin
+
+ ifeq ($(OS_TARGET),Linux)
+ ifeq ($(CPU_ARCH),x86_64)
+- ASFILES = arcfour-amd64-gas.s mpi_amd64_gas.s
++# Disable inline asm in instrumented builds.
++# ASFILES = arcfour-amd64-gas.s mpi_amd64_gas.s
+ ASFLAGS += -m64 -fPIC -Wa,--noexecstack
+- DEFINES += -DNSS_BEVAND_ARCFOUR -DMPI_AMD64 -DMP_ASSEMBLY_MULTIPLY
+- DEFINES += -DNSS_USE_COMBA
++# DEFINES += -DNSS_BEVAND_ARCFOUR -DMPI_AMD64 -DMP_ASSEMBLY_MULTIPLY
++# DEFINES += -DNSS_USE_COMBA
+ DEFINES += -DMP_CHAR_STORE_SLOW -DMP_IS_LITTLE_ENDIAN
+ # DEFINES += -DMPI_AMD64_ADD
+ # comment the next two lines to turn off intel HW accelleration
+- DEFINES += -DUSE_HW_AES
+- ASFILES += intel-aes.s intel-gcm.s
++# DEFINES += -DUSE_HW_AES
++# ASFILES += intel-aes.s intel-gcm.s
++# This is just intrinsics and should be fine.
+ EXTRA_SRCS += intel-gcm-wrap.c
+ INTEL_GCM = 1
+- MPI_SRCS += mpi_amd64.c mp_comba.c
++# MPI_SRCS += mpi_amd64.c mp_comba.c
+ endif
+ ifeq ($(CPU_ARCH),x86)
+ ASFILES = mpi_x86.s
diff --git a/third_party/instrumented_libraries/patches/pulseaudio.diff b/third_party/instrumented_libraries/patches/pulseaudio.diff
new file mode 100644
index 0000000..fc2ca0d
--- /dev/null
+++ b/third_party/instrumented_libraries/patches/pulseaudio.diff
@@ -0,0 +1,16 @@
+diff -rupN ./src/modules/bluetooth/sbc/sbc_primitives_mmx.h ../pulseaudio-1.1-patched/src/modules/bluetooth/sbc/sbc_primitives_mmx.h
+--- ./src/modules/bluetooth/sbc/sbc_primitives_mmx.h 2011-10-20 16:54:16.000000000 +0400
++++ ../pulseaudio-1.1-patched/src/modules/bluetooth/sbc/sbc_primitives_mmx.h 2014-01-30 16:57:43.113946495 +0400
+@@ -29,8 +29,11 @@
+
+ #include "sbc_primitives.h"
+
++// The inline asm causes errors in clang builds. We don't want inline asm in
++// instrumented builds anyway.
+ #if defined(__GNUC__) && (defined(__i386__) || defined(__amd64__)) && \
+- !defined(SBC_HIGH_PRECISION) && (SCALE_OUT_BITS == 15)
++ !defined(SBC_HIGH_PRECISION) && (SCALE_OUT_BITS == 15) && \
++ !defined(__clang__)
+
+ #define SBC_BUILD_WITH_MMX_SUPPORT
+
diff --git a/third_party/instrumented_libraries/patches/zlib1g.diff b/third_party/instrumented_libraries/patches/zlib1g.diff
new file mode 100644
index 0000000..18a6a33
--- /dev/null
+++ b/third_party/instrumented_libraries/patches/zlib1g.diff
@@ -0,0 +1,12 @@
+diff -rupN ./configure ../zlib-1.2.3.4.dfsg-patched/configure
+--- ./configure 2009-12-24 18:09:43.000000000 +0300
++++ ../zlib-1.2.3.4.dfsg-patched/configure 2014-06-03 17:53:45.082074669 +0400
+@@ -72,6 +72,8 @@ cflags=${CFLAGS-"-O3"}
+ # to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
+ case "$cc" in
+ *gcc*) gcc=1 ;;
++ # Use the version script for clang builds as well.
++ *clang*) gcc=1 ;;
+ esac
+
+ if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then