diff options
author | Zeno Albisser <zeno.albisser@digia.com> | 2014-04-24 15:21:34 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-24 22:39:06 +0200 |
commit | f9b035b6066fe6ac176c83b019a99e95e6570254 (patch) | |
tree | cf6b7a47eac0d9b55d5f6b918e9ccb181e765e6f /patches | |
parent | ffb769b385f11aa9598fd11893fe5c267c5ab01c (diff) |
Add patches for eLinux.
Change-Id: I31d023c857fd45d54500670d4c7ce473442afd40
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'patches')
5 files changed, 296 insertions, 0 deletions
diff --git a/patches/chromium/0021-Do-not-directly-override-libc-symbols-from-the-libra.patch b/patches/chromium/0021-Do-not-directly-override-libc-symbols-from-the-libra.patch new file mode 100644 index 000000000..aa27eb92b --- /dev/null +++ b/patches/chromium/0021-Do-not-directly-override-libc-symbols-from-the-libra.patch @@ -0,0 +1,129 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zeno Albisser <zeno.albisser@digia.com> +Date: Wed, 23 Apr 2014 16:54:47 +0200 +Subject: Do not directly override libc symbols from the library. + +Instead we export _override symbols and add the symbol +renaming directly into the QtWebEngineProcess source. + +Change-Id: I209a7dcf42772bb993e966f253dd2d1c7013dceb +Reviewed-by: Andras Becsi <andras.becsi@digia.com> +--- + content/zygote/zygote_main_linux.cc | 14 -------------- + sandbox/linux/services/libc_urandom_override.cc | 22 +--------------------- + 2 files changed, 1 insertion(+), 35 deletions(-) + +diff --git a/content/zygote/zygote_main_linux.cc b/content/zygote/zygote_main_linux.cc +index 8e91c2f..2e5cc7e 100644 +--- a/content/zygote/zygote_main_linux.cc ++++ b/content/zygote/zygote_main_linux.cc +@@ -181,8 +181,6 @@ static void InitLibcLocaltimeFunctions() { + // references to localtime() will resolve to this function. Notice that we need + // to set visibility attribute to "default" to export the symbol, as it is set + // to "hidden" by default in chrome per build/common.gypi. +-__attribute__ ((__visibility__("default"))) +-struct tm* localtime_override(const time_t* timep) __asm__ ("localtime"); + + __attribute__ ((__visibility__("default"))) + struct tm* localtime_override(const time_t* timep) { +@@ -199,10 +197,6 @@ struct tm* localtime_override(const time_t* timep) { + } + } + +-// Use same trick to override localtime64(), localtime_r() and localtime64_r(). +-__attribute__ ((__visibility__("default"))) +-struct tm* localtime64_override(const time_t* timep) __asm__ ("localtime64"); +- + __attribute__ ((__visibility__("default"))) + struct tm* localtime64_override(const time_t* timep) { + if (g_am_zygote_or_renderer) { +@@ -219,10 +213,6 @@ struct tm* localtime64_override(const time_t* timep) { + } + + __attribute__ ((__visibility__("default"))) +-struct tm* localtime_r_override(const time_t* timep, +- struct tm* result) __asm__ ("localtime_r"); +- +-__attribute__ ((__visibility__("default"))) + struct tm* localtime_r_override(const time_t* timep, struct tm* result) { + if (g_am_zygote_or_renderer) { + ProxyLocaltimeCallToBrowser(*timep, result, NULL, 0); +@@ -235,10 +225,6 @@ struct tm* localtime_r_override(const time_t* timep, struct tm* result) { + } + + __attribute__ ((__visibility__("default"))) +-struct tm* localtime64_r_override(const time_t* timep, +- struct tm* result) __asm__ ("localtime64_r"); +- +-__attribute__ ((__visibility__("default"))) + struct tm* localtime64_r_override(const time_t* timep, struct tm* result) { + if (g_am_zygote_or_renderer) { + ProxyLocaltimeCallToBrowser(*timep, result, NULL, 0); +diff --git a/sandbox/linux/services/libc_urandom_override.cc b/sandbox/linux/services/libc_urandom_override.cc +index c5c49ba..6e8e129 100644 +--- a/sandbox/linux/services/libc_urandom_override.cc ++++ b/sandbox/linux/services/libc_urandom_override.cc +@@ -121,8 +121,6 @@ static void InitLibcFileIOFunctions() { + // the code below defines fopen_override() function with asm name + // "fopen", so that all references to fopen() will resolve to this + // function. +-__attribute__ ((__visibility__("default"))) +-FILE* fopen_override(const char* path, const char* mode) __asm__ ("fopen"); + + __attribute__ ((__visibility__("default"))) + FILE* fopen_override(const char* path, const char* mode) { +@@ -141,7 +139,7 @@ FILE* fopen_override(const char* path, const char* mode) { + } + + __attribute__ ((__visibility__("default"))) +-FILE* fopen64(const char* path, const char* mode) { ++FILE* fopen64_override(const char* path, const char* mode) { + if (g_override_urandom && strcmp(path, kUrandomDevPath) == 0) { + int fd = HANDLE_EINTR(dup(base::GetUrandomFD())); + if (fd < 0) { +@@ -162,11 +160,6 @@ FILE* fopen64(const char* path, const char* mode) { + #if HAVE_XSTAT + + __attribute__ ((__visibility__("default"))) +-int xstat_override(int version, +- const char *path, +- struct stat *buf) __asm__ ("__xstat"); +- +-__attribute__ ((__visibility__("default"))) + int xstat_override(int version, const char *path, struct stat *buf) { + if (g_override_urandom && strcmp(path, kUrandomDevPath) == 0) { + int result = __fxstat(version, base::GetUrandomFD(), buf); +@@ -179,11 +172,6 @@ int xstat_override(int version, const char *path, struct stat *buf) { + } + + __attribute__ ((__visibility__("default"))) +-int xstat64_override(int version, +- const char *path, +- struct stat64 *buf) __asm__ ("__xstat64"); +- +-__attribute__ ((__visibility__("default"))) + int xstat64_override(int version, const char *path, struct stat64 *buf) { + if (g_override_urandom && strcmp(path, kUrandomDevPath) == 0) { + int result = __fxstat64(version, base::GetUrandomFD(), buf); +@@ -198,10 +186,6 @@ int xstat64_override(int version, const char *path, struct stat64 *buf) { + #else + + __attribute__ ((__visibility__("default"))) +-int stat_override(const char *path, +- struct stat *buf) __asm__ ("stat"); +- +-__attribute__ ((__visibility__("default"))) + int stat_override(const char *path, struct stat *buf) { + if (g_override_urandom && strcmp(path, kUrandomDevPath) == 0) { + int result = fstat(base::GetUrandomFD(), buf); +@@ -214,10 +198,6 @@ int stat_override(const char *path, struct stat *buf) { + } + + __attribute__ ((__visibility__("default"))) +-int stat64_override(const char *path, +- struct stat64 *buf) __asm__ ("stat64"); +- +-__attribute__ ((__visibility__("default"))) + int stat64_override(const char *path, struct stat64 *buf) { + if (g_override_urandom && strcmp(path, kUrandomDevPath) == 0) { + int result = fstat64(base::GetUrandomFD(), buf); diff --git a/patches/chromium/0022-Adjust-gyp-defines-for-eLinux.patch b/patches/chromium/0022-Adjust-gyp-defines-for-eLinux.patch new file mode 100644 index 000000000..936623496 --- /dev/null +++ b/patches/chromium/0022-Adjust-gyp-defines-for-eLinux.patch @@ -0,0 +1,120 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zeno Albisser <zeno.albisser@digia.com> +Date: Wed, 23 Apr 2014 17:01:18 +0200 +Subject: Adjust gyp defines for eLinux. + +- Add Raspberry PI chipset to list of defined platforms. +- Make sure to include sources for xdg support. +- Do not use pkg-config-wrapper, as our sysroot pkg-config + already returns absolute paths. +- Use openssl for eLinux. +- Use fontconfig and freetype2 for eLinux. + +Change-Id: I8dd21c480922f32ac7111ea5582d82c249414caa +Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> +--- + base/atomicops_internals_arm_gcc.h | 2 +- + base/base.gyp | 2 +- + base/base.gypi | 7 +++++++ + build/linux/system.gyp | 2 +- + net/net.gyp | 2 +- + skia/skia_chrome.gypi | 2 +- + skia/skia_library.gypi | 2 +- + 7 files changed, 13 insertions(+), 6 deletions(-) + +diff --git a/base/atomicops_internals_arm_gcc.h b/base/atomicops_internals_arm_gcc.h +index 9f4fe2e..1964041 100644 +--- a/base/atomicops_internals_arm_gcc.h ++++ b/base/atomicops_internals_arm_gcc.h +@@ -53,7 +53,7 @@ inline void MemoryBarrier() { + #if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \ + defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \ + defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \ +- defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \ ++ defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || \ + defined(__ARM_ARCH_6KZ__) || defined(__ARM_ARCH_6T2__) + + inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr, +diff --git a/base/base.gyp b/base/base.gyp +index 407d49d..b5af9d7 100644 +--- a/base/base.gyp ++++ b/base/base.gyp +@@ -35,7 +35,7 @@ + ], + }, + 'conditions': [ +- ['desktop_linux == 1 or chromeos == 1', { ++ ['desktop_linux == 1 or chromeos == 1 or qt_os == "embedded_linux"', { + 'conditions': [ + ['chromeos==1', { + 'sources/': [ ['include', '_chromeos\\.cc$'] ] +diff --git a/base/base.gypi b/base/base.gypi +index 11edab0..26aacaf 100644 +--- a/base/base.gypi ++++ b/base/base.gypi +@@ -722,6 +722,13 @@ + 'atomicops_internals_x86_gcc.cc', + ], + }], ++ # We need to include xdg for embedded linux, ++ # but we indeed do not want atomicops for x86. ++ ['qt_os == "embedded_linux"', { ++ 'sources/': [ ++ ['include', '^nix/'], ++ ], ++ }], + ['<(use_glib)==0 or >(nacl_untrusted_build)==1', { + 'sources!': [ + 'message_loop/message_pump_glib.cc', +diff --git a/build/linux/system.gyp b/build/linux/system.gyp +index 1451afb..92c74805b 100644 +--- a/build/linux/system.gyp ++++ b/build/linux/system.gyp +@@ -5,7 +5,7 @@ + { + 'variables': { + 'conditions': [ +- ['sysroot!=""', { ++ ['sysroot!="" and qt_os!="embedded_linux"', { + 'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"', + }, { + 'pkg-config': 'pkg-config' +diff --git a/net/net.gyp b/net/net.gyp +index c2d618e..69f4827 100644 +--- a/net/net.gyp ++++ b/net/net.gyp +@@ -1366,7 +1366,7 @@ + '../build/linux/system.gyp:gio', + ], + }], +- [ 'desktop_linux == 1 or chromeos == 1', { ++ [ 'desktop_linux == 1 or chromeos == 1 or qt_os == "embedded_linux"', { + 'conditions': [ + ['use_openssl==1', { + 'dependencies': [ +diff --git a/skia/skia_chrome.gypi b/skia/skia_chrome.gypi +index 6dcc665..5559f57 100644 +--- a/skia/skia_chrome.gypi ++++ b/skia/skia_chrome.gypi +@@ -117,7 +117,7 @@ + 'target_conditions': [ + # Pull in specific linux files for android (which have been filtered out + # by file name rules). +- [ 'OS == "android"', { ++ [ 'OS == "android" or qt_os == "embedded_linux"', { + 'sources/': [ + ['include', 'ext/platform_device_linux\\.cc$'], + ], +diff --git a/skia/skia_library.gypi b/skia/skia_library.gypi +index b957fa6..effde33 100644 +--- a/skia/skia_library.gypi ++++ b/skia/skia_library.gypi +@@ -270,7 +270,7 @@ + '../third_party/skia/src/opts/opts_check_SSE2.cpp' + ], + }], +- [ 'desktop_linux == 1 or chromeos == 1', { ++ [ 'desktop_linux == 1 or chromeos == 1 or qt_os=="embedded_linux"', { + 'dependencies': [ + '../build/linux/system.gyp:fontconfig', + '../build/linux/system.gyp:freetype2', diff --git a/patches/chromium/third_party/openssl/0001-Use-chacha_vec.c-to-avoid-hard-soft-float-mismatch.patch b/patches/chromium/third_party/openssl/0001-Use-chacha_vec.c-to-avoid-hard-soft-float-mismatch.patch new file mode 100644 index 000000000..08740fa16 --- /dev/null +++ b/patches/chromium/third_party/openssl/0001-Use-chacha_vec.c-to-avoid-hard-soft-float-mismatch.patch @@ -0,0 +1,45 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Zeno Albisser <zeno.albisser@digia.com> +Date: Wed, 23 Apr 2014 17:03:10 +0200 +Subject: Use chacha_vec.c to avoid hard/soft float mismatch. + +But fall back to chacha_vec_arm.S when arm_neon_optional +is used. + +Change-Id: I8dd21c480922f32ac7111ea5582d82c249414caa +Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> +--- + openssl.gypi | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/openssl.gypi b/openssl.gypi +index 856b72e..d9cf5d8 100644 +--- a/openssl.gypi ++++ b/openssl.gypi +@@ -566,7 +566,6 @@ + 'openssl/crypto/aes/asm/aes-armv4.S', + 'openssl/crypto/bn/asm/armv4-gf2m.S', + 'openssl/crypto/bn/asm/armv4-mont.S', +- 'openssl/crypto/chacha/chacha_vec_arm.S', + 'openssl/crypto/modes/asm/ghash-armv4.S', + 'openssl/crypto/poly1305/poly1305_arm.c', + 'openssl/crypto/poly1305/poly1305_arm_asm.S', +@@ -574,6 +573,18 @@ + 'openssl/crypto/sha/asm/sha256-armv4.S', + 'openssl/crypto/sha/asm/sha512-armv4.S', + ], ++ 'conditions': [ ++ ['arm_neon_optional==1 and arm_tune=="cortex-a8"', { ++ 'openssl_arm_sources+': [ ++ 'openssl/crypto/chacha/chacha_vec_arm.S', ++ ], ++ }, ++ { ++ 'openssl_arm_sources+': [ ++ 'openssl/crypto/chacha/chacha_vec.c', ++ ], ++ }], ++ ], + 'openssl_arm_defines': [ + 'OPENSSL_BN_ASM_GF2m', + 'OPENSSL_BN_ASM_MONT', diff --git a/patches/patch-chromium.sh b/patches/patch-chromium.sh index d210d2b4d..074563775 100755 --- a/patches/patch-chromium.sh +++ b/patches/patch-chromium.sh @@ -56,6 +56,7 @@ for MODULE in \ /third_party/WebKit \ /third_party/libjingle/source/talk \ /third_party/libvpx \ + /third_party/openssl \ /tools/gyp \ /tools/grit \ /v8 diff --git a/patches/update-patches.sh b/patches/update-patches.sh index 7fa303d52..bbe34ef11 100755 --- a/patches/update-patches.sh +++ b/patches/update-patches.sh @@ -49,6 +49,7 @@ for MODULE in \ /third_party/WebKit \ /third_party/libjingle/source/talk \ /third_party/libvpx \ + /third_party/openssl \ /tools/gyp \ /tools/grit \ /v8 |