diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-10-12 10:47:20 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-10-12 10:47:20 +0000 |
commit | 2df82e3d3d783c51aaba69c49ddb00a9f25ab138 (patch) | |
tree | c729c1aba3f4aded953cc04247a9255250507c7d | |
parent | 69c09e1e4a0b3ff3e0b26151807922bd7b44e607 (diff) | |
download | aports-2df82e3d3d783c51aaba69c49ddb00a9f25ab138.tar.bz2 aports-2df82e3d3d783c51aaba69c49ddb00a9f25ab138.tar.xz |
main/xulrunner: fix musl build
Based heavily on GregorR's musl-pkgsrc-patches firefox patch,
but slightly differs at places to suit Alpine needs.
-rw-r--r-- | main/xulrunner/APKBUILD | 32 | ||||
-rw-r--r-- | main/xulrunner/firefox-musl.patch | 485 | ||||
-rw-r--r-- | main/xulrunner/fix-ipc.patch | 103 | ||||
-rw-r--r-- | main/xulrunner/fix-media.patch | 11 | ||||
-rw-r--r-- | main/xulrunner/fix-netwerk.patch | 62 | ||||
-rw-r--r-- | main/xulrunner/fix-tools.patch | 117 | ||||
-rw-r--r-- | main/xulrunner/get_nproc.patch | 2 | ||||
-rw-r--r-- | main/xulrunner/mozconfig | 9 |
8 files changed, 810 insertions, 11 deletions
diff --git a/main/xulrunner/APKBUILD b/main/xulrunner/APKBUILD index 5125e75f5c..6a32863bee 100644 --- a/main/xulrunner/APKBUILD +++ b/main/xulrunner/APKBUILD @@ -54,6 +54,12 @@ source="ftp://ftp.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgve get_nproc.patch stat.patch moz-libc-filename.patch + + fix-ipc.patch + fix-media.patch + fix-netwerk.patch + fix-tools.patch + stab.h " @@ -73,6 +79,8 @@ prepare() { done cp "${srcdir}/mozconfig" .mozconfig || return 1 + sed -e "s/#${CLIBC}#//g" -i .mozconfig + cp "$srcdir"/stab.h toolkit/crashreporter/google-breakpad/src/ } @@ -117,32 +125,44 @@ dev() { } md5sums="06a4c0fe8d3a979aea2fce8d0fdbf328 firefox-24.0.source.tar.bz2 -b348970fea1377bb4e9a5271f23cedcb mozconfig +4332546696b520412b0dcf2ba8931c06 mozconfig f43c1f0ae57aa8289b130c6de8caf3ce 0002-Use-C99-math-isfinite.patch e8b3a22d670241bb5c038729ac49a975 0003-xulrunner-jemalloc-aslr.patch d3d1e831185da3a3e9ddf56c33449c70 uclibc-malloc_usable_size.patch 507742325de8687529e4e81e31132ddf getchar.patch -9d7d00c019b6bdb0473ff0e63836430f get_nproc.patch +2f9e38b58c68295d5ee175e132d8ed2a get_nproc.patch 623cd16618c57f037ab4132dfe8694b0 stat.patch 10600ca1b36ff177bf4e301056553cf4 moz-libc-filename.patch +a070f213f0e52d7873b46206dd96159c fix-ipc.patch +aa0fd1152f24b5edb46ff807c1eadad8 fix-media.patch +41520f6c013807e6af2c377276efb843 fix-netwerk.patch +af742df21c2912bd458d018f52f68482 fix-tools.patch 4383d038b8d8411ea46f4a109197c19e stab.h" sha256sums="86a6efa501e1b106b597a8506757f3a2db9d3a5cfcc61ea29a9ad0c834bea83b firefox-24.0.source.tar.bz2 -c6d7723640ef3f6c0207a35c4403a81cce05b6f4db286666be93e336efd53866 mozconfig +a5ab8c12da5f266458e7f456205a58ea3bedcce717dae9e2087cf59db9598a64 mozconfig 2f319883300f2aef180bfb80221151fcbb29344a5a0a086d6ad1d80005daf039 0002-Use-C99-math-isfinite.patch 324d5cd26858ad21bb4680db8635fb3fd014bf00a637bf9fb2b118c2925fc5e7 0003-xulrunner-jemalloc-aslr.patch 70d93003a95d3a89bd3193d46a278f094a6b983aa660781e4090d58cf1c488a2 uclibc-malloc_usable_size.patch d14357bf44f702d94b8d3ed79bdf81f6271370745c1ac8fa83522bd98be4adc4 getchar.patch -ce7417acd8ed04adb533532814472de7cae279bbbeffb57b8a99af523f397623 get_nproc.patch +7724b729cb81b0cbd4a51d529ba8b73dcd25229d46ccb89b9cef2c38d867098b get_nproc.patch 41d55a1d807c84e624da8c258410e8689559d108a4dc56118c6c4755dee514df stat.patch b2f72d12a2df3bc84d2582d70ec9fc26099bc87c26c303ec5c08ac2e26fe35db moz-libc-filename.patch +e6e7aa8d8875f4ed6d8acfc9668f906d8a290d24e25c58d6d5c3ecc5ab3d6778 fix-ipc.patch +df20d6e1d6fbccc2f002b92904e1cf1ad5a7f76fd119256f16d31aa3eac6802b fix-media.patch +9681d00c44f6b3873eb97d0a7277c04710da956aa4d08c100cf62c24d03d6a5d fix-netwerk.patch +10bf85bbe8a336b0edfe9216b4d281464cef7194c05984a82a2a9ba5b459406a fix-tools.patch 960d82bbfdc88c95f5cb4f2e1c1bf23dae7519b3b7203914d7b3ddbff1ba4c28 stab.h" sha512sums="541a26eb939a2cf9a2ec4f4469fdc12008f097c4f615cb196299cbdb855931df5aea288f842dce57e2bb0069ec76e2a748823474e30a6077a9138db5ddb3ee46 firefox-24.0.source.tar.bz2 -1f7759c3b1953d01c19c5d6b320d5b0eeec9d875ae1310be5f3e79032f0dc8c7290ece807bae5dfea6e6a3ff52507bccf9bd463b8933087409f43125b125930e mozconfig +4e3a392276d82a1006351a673b853bd6e7a57f4ae9ec5806edd9e7c8d51edcbaeb32111423088231a7e887490b755ec9701508fe58564fe69dda7eee7b147551 mozconfig 9a6666a3b637549411ea562c9d0d6d617ed48327d0f9e4e64d27f43774c218e6c5cf5fa99d4b339a5a0f89b854a18079392eba0dafc3419adbd4cdd5d71d3f26 0002-Use-C99-math-isfinite.patch 46caf196a9f68614c42b793befc7dc85438d30ce47c06ccc925aae14728d67b0d29192edba430c0a6237192e6d51db26dfc6e6190bc01937a828effd8136f37b 0003-xulrunner-jemalloc-aslr.patch 9845400d4a3c5cc4f0c7a80292c555f8192ba5093f59baed86d63c575aa50d73597588a6236948c25619e9dbaad72508abd91edf16374904d0d8345a94755ffc uclibc-malloc_usable_size.patch 18f0696bf4d032c83041110b83ae6531b48474a778fc1deade3b06ba2ae1bfcc9891059287bfb78317c2f5ddc88f5b7ce957312acdb63d4902a57e0b40eb6520 getchar.patch -f4efb791283b30876d5877623c8d1f7ff2295fd8d004ddd3d221d6ee2701e704ed0221a48130d9ae6c94b097c4e01e5dfe03342345c098571a2408c9a5c755ab get_nproc.patch +7ecb250f47df178aacdaf630c3240362a32e13d400461d7799f1fc2d25fbc47043c03ef19ffdeab517e6f9812fe81007460f1485bde243a9d16053dcee37779e get_nproc.patch e975bc5a0f77e29a2afb848cd0c164f9c0edabf0d96472d6b23e2b08fa2bbe3b51ee63c16c986e7fc9bc243c666b23c37d0b939cbf4c258b9dce5c3ee77d6f55 stat.patch 136e3fc82b77562f53b09e5aa1d81f9db43196b6a1a9bbf271651d022837cb565a6807ce62ce7e99cc40db87edbba2b8b6c198761ac6ebee091c0615e10067dd moz-libc-filename.patch +4e30548d00c6133c63b7036012a1938e5ff1d4fa3b20ba69782956f8d1fa00dcc36e055f40ebc2238f03d3e791b2f15e3c342b3801f0b0a3536acd35d71f9fc3 fix-ipc.patch +f35540af4e1a905110dac6356edb4b6aef056c04bdbd2db454860827f28f1990526a6774fbab478580ba68bf2be25d22ffc5a0114373202a93129fc3eb0b14af fix-media.patch +0b96397441a1d42a23e322cdbfcad22ad5b5bc59c7265a7e1a3c4c26381a16a28f31165eb13147ce29174eb5c08ffe885c6df9a1e7b966e0b9c27637830f50ea fix-netwerk.patch +6ffbe4d6e9e01cfd1ea949db1f030816fba916544ae3b082959e3b5ad275ea033ead590d66ca453f85943bed55e192a29d476bda31d3a6888fa4eb1123bf6234 fix-tools.patch 0b3f1e4b9fdc868e4738b5c81fd6c6128ce8885b260affcb9a65ff9d164d7232626ce1291aaea70132b3e3124f5e13fef4d39326b8e7173e362a823722a85127 stab.h" diff --git a/main/xulrunner/firefox-musl.patch b/main/xulrunner/firefox-musl.patch new file mode 100644 index 0000000000..1835d327b2 --- /dev/null +++ b/main/xulrunner/firefox-musl.patch @@ -0,0 +1,485 @@ +diff -r 06549f98901b ipc/chromium/src/base/debug_util_posix.cc +--- ipc/chromium/src/base/debug_util_posix.cc Fri Aug 02 14:36:52 2013 +0000 ++++ ipc/chromium/src/base/debug_util_posix.cc Fri Aug 02 14:42:20 2013 +0000 +@@ -5,7 +5,7 @@ + #include "build/build_config.h" + #include "base/debug_util.h" + +-#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID)) ++#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && defined(__GLIBC__)) + + #include <errno.h> + #include <fcntl.h> +diff -r 06549f98901b ipc/chromium/src/base/file_util.h +--- ipc/chromium/src/base/file_util.h Fri Aug 02 14:36:52 2013 +0000 ++++ ipc/chromium/src/base/file_util.h Fri Aug 02 14:42:20 2013 +0000 +@@ -16,7 +16,11 @@ + #include <sys/stat.h> + #elif defined(OS_POSIX) + #include <sys/types.h> ++#ifndef __GLIBC__ ++#define NO_FTS ++#else + #include <fts.h> ++#endif + #include <sys/stat.h> + #endif + +@@ -466,7 +470,7 @@ + #if defined(OS_WIN) + WIN32_FIND_DATA find_data_; + HANDLE find_handle_; +-#elif defined(ANDROID) ++#elif defined(NO_FTS) + void *fts_; + #elif defined(OS_POSIX) + FTS* fts_; +diff -r 06549f98901b ipc/chromium/src/base/file_util_posix.cc +--- ipc/chromium/src/base/file_util_posix.cc Fri Aug 02 14:36:52 2013 +0000 ++++ ipc/chromium/src/base/file_util_posix.cc Fri Aug 02 14:42:20 2013 +0000 +@@ -8,13 +8,16 @@ + #include <errno.h> + #include <fcntl.h> + #include <fnmatch.h> +-#ifndef ANDROID ++#ifndef __GLIBC__ ++#define NO_FTS ++#endif ++#ifndef NO_FTS + #include <fts.h> + #endif + #include <libgen.h> + #include <stdio.h> + #include <string.h> +-#include <sys/errno.h> ++#include <errno.h> + #include <sys/mman.h> + #define _DARWIN_USE_64_BIT_INODE // Use 64-bit inode data structures + #include <sys/stat.h> +@@ -121,7 +124,7 @@ + if (!recursive) + return (rmdir(path_str) == 0); + +-#ifdef ANDROID ++#ifdef NO_FTS + // XXX Need ftsless impl for bionic + return false; + #else +@@ -194,7 +197,7 @@ + return false; + } + +-#ifdef ANDROID ++#ifdef NO_FTS + // XXX Need ftsless impl for bionic + return false; + #else +@@ -613,7 +616,7 @@ + } + + FileEnumerator::~FileEnumerator() { +-#ifndef ANDROID ++#ifndef NO_FTS + if (fts_) + fts_close(fts_); + #endif +@@ -625,7 +628,7 @@ + if (!is_in_find_op_) + return; + +-#ifndef ANDROID ++#ifndef NO_FTS + memcpy(&(info->stat), fts_ent_->fts_statp, sizeof(info->stat)); + info->filename.assign(fts_ent_->fts_name); + #endif +@@ -636,7 +639,7 @@ + // large directories with many files this can be quite deep. + // TODO(erikkay) - get rid of this recursive pattern + FilePath FileEnumerator::Next() { +-#ifdef ANDROID ++#ifdef NO_FTS + return FilePath(); + #else + if (!is_in_find_op_) { +diff -r 06549f98901b ipc/chromium/src/base/time_posix.cc +--- ipc/chromium/src/base/time_posix.cc Fri Aug 02 14:36:52 2013 +0000 ++++ ipc/chromium/src/base/time_posix.cc Fri Aug 02 14:42:20 2013 +0000 +@@ -65,8 +65,10 @@ + timestruct.tm_wday = exploded.day_of_week; // mktime/timegm ignore this + timestruct.tm_yday = 0; // mktime/timegm ignore this + timestruct.tm_isdst = -1; // attempt to figure it out ++#ifdef __GLIBC__ + timestruct.tm_gmtoff = 0; // not a POSIX field, so mktime/timegm ignore + timestruct.tm_zone = NULL; // not a POSIX field, so mktime/timegm ignore ++#endif + + time_t seconds; + #ifdef ANDROID +diff -r 06549f98901b media/libcubeb/src/Makefile.in +--- media/libcubeb/src/Makefile.in Fri Aug 02 14:36:52 2013 +0000 ++++ media/libcubeb/src/Makefile.in Fri Aug 02 14:42:20 2013 +0000 +@@ -53,7 +53,7 @@ + DEFINES += -DUSE_SNDIO + endif + +-ifdef MOZ_ALSA ++ifdef MOZ_ALSA_LIBS + CSRCS += \ + cubeb_alsa.c \ + $(NULL) +diff -r 06549f98901b media/libcubeb/src/cubeb_alsa.c +--- media/libcubeb/src/cubeb_alsa.c Fri Aug 02 14:36:52 2013 +0000 ++++ media/libcubeb/src/cubeb_alsa.c Fri Aug 02 14:42:20 2013 +0000 +@@ -6,6 +6,7 @@ + */ + #undef NDEBUG + #define _BSD_SOURCE ++#define _POSIX_C_SOURCE 200112L + #define _XOPEN_SOURCE 500 + #include <pthread.h> + #include <sys/time.h> +diff -r 06549f98901b media/mtransport/third_party/nICEr/src/stun/addrs.c +--- media/mtransport/third_party/nICEr/src/stun/addrs.c Fri Aug 02 14:36:52 2013 +0000 ++++ media/mtransport/third_party/nICEr/src/stun/addrs.c Fri Aug 02 14:42:20 2013 +0000 +@@ -63,7 +63,7 @@ + #include <net/if_dl.h> + #include <net/if_types.h> + #include <sys/sockio.h> +-#else ++#elif 0 + #include <linux/if.h> + #endif + #include <net/route.h> +diff -r 06549f98901b media/webrtc/trunk/testing/gtest/src/gtest.cc +--- media/webrtc/trunk/testing/gtest/src/gtest.cc Fri Aug 02 14:36:52 2013 +0000 ++++ media/webrtc/trunk/testing/gtest/src/gtest.cc Fri Aug 02 14:42:20 2013 +0000 +@@ -48,6 +48,8 @@ + #include <sstream> + #include <vector> + ++#include <sys/socket.h> ++ + #if GTEST_OS_LINUX + + // TODO(kenton@google.com): Use autoconf to detect availability of +diff -r 06549f98901b media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc +--- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc Fri Aug 02 14:36:52 2013 +0000 ++++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc Fri Aug 02 14:42:20 2013 +0000 +@@ -38,7 +38,7 @@ + WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, + "Available number of cores:%d", number_of_cores_); + +-#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK) ++#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK) && defined(__GLIBC__) + number_of_cores_ = get_nprocs(); + WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, + "Available number of cores:%d", number_of_cores_); +diff -r 06549f98901b media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc +--- media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc Fri Aug 02 14:36:52 2013 +0000 ++++ media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc Fri Aug 02 14:42:20 2013 +0000 +@@ -264,7 +264,7 @@ + + // CPU_ZERO and CPU_SET are not available in NDK r7, so disable + // SetAffinity on Android for now. +-#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK))) ++#if defined(__FreeBSD__) || defined(__NetBSD__) || (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)) && (!defined(WEBRTC_GONK)) && defined(__GLIBC__)) + bool ThreadPosix::SetAffinity(const int* processor_numbers, + const unsigned int amount_of_processors) { + if (!processor_numbers || (amount_of_processors == 0)) { +diff -r 06549f98901b netwerk/sctp/src/netinet/sctp_bsd_addr.c +--- netwerk/sctp/src/netinet/sctp_bsd_addr.c Fri Aug 02 14:36:52 2013 +0000 ++++ netwerk/sctp/src/netinet/sctp_bsd_addr.c Fri Aug 02 14:42:20 2013 +0000 +@@ -49,11 +49,9 @@ + #include <netinet/sctp_sysctl.h> + #include <netinet/sctp_indata.h> + #if !defined(__Userspace_os_Windows) ++#include <unistd.h> + #if defined(ANDROID) +-#include <unistd.h> + #include <ifaddrs-android-ext.h> +-#else +-#include <sys/unistd.h> + #endif + #endif + +diff -r 06549f98901b netwerk/sctp/src/netinet/sctp_os_userspace.h +--- netwerk/sctp/src/netinet/sctp_os_userspace.h Fri Aug 02 14:36:52 2013 +0000 ++++ netwerk/sctp/src/netinet/sctp_os_userspace.h Fri Aug 02 14:42:20 2013 +0000 +@@ -381,9 +381,8 @@ + }; + + #else /* !defined(Userspace_os_Windows) */ +-#include <sys/cdefs.h> /* needed? added from old __FreeBSD__ */ + #include <sys/socket.h> +-#if defined(__Userspace_os_FreeBSD) || defined(__Userspace_os_OpenBSD) || defined(ANDROID) || defined(__Userspace_os_NetBSD) ++#if defined(__Userspace_os_FreeBSD) || defined(__Userspace_os_OpenBSD) || defined(ANDROID) || defined(__Userspace_os_NetBSD) || 1 + #include <pthread.h> + #endif + typedef pthread_mutex_t userland_mutex_t; +@@ -408,7 +407,7 @@ + /* #include <sys/param.h> in FreeBSD defines MSIZE */ + /* #include <sys/ktr.h> */ + /* #include <sys/systm.h> */ +-#if defined(__Userspace_os_Windows) ++#if defined(__Userspace_os_Windows) || 1 + #include <user_queue.h> + #else + #include <sys/queue.h> +diff -r 06549f98901b netwerk/sctp/src/netinet/sctp_pcb.c +--- netwerk/sctp/src/netinet/sctp_pcb.c Fri Aug 02 14:36:52 2013 +0000 ++++ netwerk/sctp/src/netinet/sctp_pcb.c Fri Aug 02 14:42:20 2013 +0000 +@@ -30,6 +30,8 @@ + * THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#define _BSD_SOURCE /* for IPPORT_RESERVED */ ++ + #ifdef __FreeBSD__ + #include <sys/cdefs.h> + __FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 246687 2013-02-11 21:02:49Z tuexen $"); +@@ -69,11 +71,10 @@ + #endif + #if defined(__Userspace__) + #if !defined(__Userspace_os_Windows) ++#include <netdb.h> ++#include <unistd.h> + #if defined(ANDROID) +-#include <unistd.h> + #include <ifaddrs-android-ext.h> +-#else +-#include <sys/unistd.h> + #endif + #endif + #include <user_socketvar.h> +diff -r 06549f98901b netwerk/sctp/src/user_queue.h +--- netwerk/sctp/src/user_queue.h Fri Aug 02 14:36:52 2013 +0000 ++++ netwerk/sctp/src/user_queue.h Fri Aug 02 14:42:20 2013 +0000 +@@ -31,9 +31,6 @@ + #ifndef _USER_QUEUE_H_ + #define _USER_QUEUE_H_ + +-#if !defined (__Userspace_os_Windows) +-#include <sys/cdefs.h> +-#endif + /* + * This file defines four types of data structures: singly-linked lists, + * singly-linked tail queues, lists and tail queues. +diff -r 06549f98901b toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc +--- toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc Fri Aug 02 14:36:52 2013 +0000 ++++ toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc Fri Aug 02 14:42:20 2013 +0000 +@@ -46,6 +46,9 @@ + #include <sys/stat.h> + #include <unistd.h> + ++// [Gregor] POSIX specifies dirname/basename as in libgen.h ++#include <libgen.h> ++ + #include <iostream> + #include <set> + #include <string> +diff -r 06549f98901b toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc +--- toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc Fri Aug 02 14:36:52 2013 +0000 ++++ toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc Fri Aug 02 14:42:20 2013 +0000 +@@ -41,6 +41,10 @@ + + #include "common/using_std_string.h" + ++#ifndef N_UNDF ++#define N_UNDF 0 ++#endif ++ + using std::vector; + + namespace google_breakpad { +diff -r 06549f98901b toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h +--- toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h Fri Aug 02 14:36:52 2013 +0000 ++++ toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h Fri Aug 02 14:42:20 2013 +0000 +@@ -53,7 +53,7 @@ + #include <config.h> + #endif + +-#ifdef HAVE_A_OUT_H ++#if 0 + #include <a.out.h> + #endif + #ifdef HAVE_MACH_O_NLIST_H +diff -r 06549f98901b toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h +--- toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h Fri Aug 02 14:36:52 2013 +0000 ++++ toolkit/crashreporter/google-breakpad/src/third_party/lss/linux_syscall_support.h Fri Aug 02 14:42:20 2013 +0000 +@@ -2813,7 +2813,7 @@ + LSS_INLINE _syscall6(void*, mmap, void*, s, + size_t, l, int, p, + int, f, int, d, +- __off64_t, o) ++ off_t, o) + + LSS_INLINE _syscall4(int, newfstatat, int, d, + const char *, p, +diff -r 06549f98901b toolkit/library/Makefile.in +--- toolkit/library/Makefile.in Fri Aug 02 14:36:52 2013 +0000 ++++ toolkit/library/Makefile.in Fri Aug 02 14:42:20 2013 +0000 +@@ -427,7 +427,7 @@ + + + ifdef MOZ_CUBEB +-ifdef MOZ_ALSA ++ifdef MOZ_ALSA_LIBS + EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) + endif + ifdef MOZ_PULSEAUDIO +diff -r 06549f98901b toolkit/mozapps/update/common/updatedefines.h +--- toolkit/mozapps/update/common/updatedefines.h Fri Aug 02 14:36:52 2013 +0000 ++++ toolkit/mozapps/update/common/updatedefines.h Fri Aug 02 14:42:20 2013 +0000 +@@ -106,8 +106,10 @@ + #ifdef SOLARIS + # include <sys/stat.h> + #else ++#if !defined(__linux__) || defined(__GLIBC__) + # include <fts.h> + #endif ++#endif + # include <dirent.h> + + #ifdef XP_MACOSX +diff -r 06549f98901b toolkit/mozapps/update/updater/updater.cpp +--- toolkit/mozapps/update/updater/updater.cpp Fri Aug 02 14:36:52 2013 +0000 ++++ toolkit/mozapps/update/updater/updater.cpp Fri Aug 02 14:42:20 2013 +0000 +@@ -3369,6 +3369,7 @@ + int add_dir_entries(const NS_tchar *dirpath, ActionList *list) + { + int rv = OK; ++#if !defined(__linux__) || defined(__GLIBC__) + FTS *ftsdir; + FTSENT *ftsdirEntry; + NS_tchar searchpath[MAXPATHLEN]; +@@ -3471,6 +3472,7 @@ + } + + fts_close(ftsdir); ++#endif + + return rv; + } +diff -r 06549f98901b toolkit/xre/nsSigHandlers.cpp +--- toolkit/xre/nsSigHandlers.cpp Fri Aug 02 14:36:52 2013 +0000 ++++ toolkit/xre/nsSigHandlers.cpp Fri Aug 02 14:42:20 2013 +0000 +@@ -15,6 +15,7 @@ + #include <signal.h> + #include <stdio.h> + #include <string.h> ++#include <sys/types.h> + #include "prthread.h" + #include "plstr.h" + #include "prenv.h" +@@ -152,7 +153,7 @@ + status->__invalid = status->__denorm = status->__zdiv = status->__ovrfl = status->__undfl = + status->__precis = status->__stkflt = status->__errsumm = 0; + +- __uint32_t *mxcsr = &uc->uc_mcontext->__fs.__fpu_mxcsr; ++ u_int32_t *mxcsr = &uc->uc_mcontext->__fs.__fpu_mxcsr; + *mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */ + *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */ + #endif +@@ -172,13 +173,13 @@ + *sw &= ~FPU_STATUS_FLAGS; + #endif + #if defined(__amd64__) +- __uint16_t *cw = &uc->uc_mcontext.fpregs->cwd; ++ u_int16_t *cw = &uc->uc_mcontext.fpregs->cwd; + *cw |= FPU_EXCEPTION_MASK; + +- __uint16_t *sw = &uc->uc_mcontext.fpregs->swd; ++ u_int16_t *sw = &uc->uc_mcontext.fpregs->swd; + *sw &= ~FPU_STATUS_FLAGS; + +- __uint32_t *mxcsr = &uc->uc_mcontext.fpregs->mxcsr; ++ u_int32_t *mxcsr = &uc->uc_mcontext.fpregs->mxcsr; + *mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */ + *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */ + #endif +@@ -187,24 +188,24 @@ + ucontext_t *uc = (ucontext_t *)context; + + #if defined(__i386) +- uint32_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[0]; ++ u_int32_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[0]; + *cw |= FPU_EXCEPTION_MASK; + +- uint32_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[1]; ++ u_int32_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[1]; + *sw &= ~FPU_STATUS_FLAGS; + + /* address of the instruction that caused the exception */ +- uint32_t *ip = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[3]; ++ u_int32_t *ip = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.state[3]; + uc->uc_mcontext.gregs[REG_PC] = *ip; + #endif + #if defined(__amd64__) +- uint16_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.cw; ++ u_int16_t *cw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.cw; + *cw |= FPU_EXCEPTION_MASK; + +- uint16_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.sw; ++ u_int16_t *sw = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.sw; + *sw &= ~FPU_STATUS_FLAGS; + +- uint32_t *mxcsr = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.mxcsr; ++ u_int32_t *mxcsr = &uc->uc_mcontext.fpregs.fp_reg_set.fpchip_state.mxcsr; + *mxcsr |= SSE_EXCEPTION_MASK; /* disable all SSE exceptions */ + *mxcsr &= ~SSE_STATUS_FLAGS; /* clear all pending SSE exceptions */ + #endif +diff -r 06549f98901b tools/profiler/platform-linux.cc +--- tools/profiler/platform-linux.cc Fri Aug 02 14:36:52 2013 +0000 ++++ tools/profiler/platform-linux.cc Fri Aug 02 14:42:20 2013 +0000 +@@ -66,7 +66,7 @@ + + #define SIGNAL_SAVE_PROFILE SIGUSR2 + +-#if defined(__GLIBC__) ++#if 1 + // glibc doesn't implement gettid(2). + #include <sys/syscall.h> + pid_t gettid() +@@ -181,7 +181,7 @@ + // Convert ms to us and subtract 100 us to compensate delays + // occuring during signal delivery. + // TODO measure and confirm this. +- const useconds_t interval = sampler_->interval_ * 1000 - 100; ++ const unsigned long interval = sampler_->interval_ * 1000 - 100; + //int result = usleep(interval); + usleep(interval); + } +diff -r 06549f98901b tools/profiler/platform.h +--- tools/profiler/platform.h Fri Aug 02 14:36:52 2013 +0000 ++++ tools/profiler/platform.h Fri Aug 02 14:42:20 2013 +0000 +@@ -29,6 +29,8 @@ + #ifndef TOOLS_PLATFORM_H_ + #define TOOLS_PLATFORM_H_ + ++#include <sys/types.h> ++ + // Uncomment this line to force desktop logging + //#define SPS_FORCE_LOG + +diff -r 06549f98901b tools/profiler/shared-libraries-linux.cc +--- tools/profiler/shared-libraries-linux.cc Fri Aug 02 14:36:52 2013 +0000 ++++ tools/profiler/shared-libraries-linux.cc Fri Aug 02 14:42:20 2013 +0000 +@@ -14,7 +14,7 @@ + #include "platform.h" + #include "shared-libraries.h" + +-#ifndef __GLIBC__ ++#if 0 + /* a crapy version of getline, because it's not included in bionic */ + static ssize_t getline(char **lineptr, size_t *n, FILE *stream) + { +@@ -35,7 +35,9 @@ + #ifdef ANDROID + #include "ElfLoader.h" // dl_phdr_info + #else ++extern "C" { // [Gregor] musl bug + #include <link.h> // dl_phdr_info ++} + #endif + #include <features.h> + #include <dlfcn.h> diff --git a/main/xulrunner/fix-ipc.patch b/main/xulrunner/fix-ipc.patch new file mode 100644 index 0000000000..98590c9a02 --- /dev/null +++ b/main/xulrunner/fix-ipc.patch @@ -0,0 +1,103 @@ +--- mozilla-release/ipc.orig/chromium/src/base/debug_util_posix.cc ++++ mozilla-release/ipc/chromium/src/base/debug_util_posix.cc +@@ -5,7 +5,7 @@ + #include "build/build_config.h" + #include "base/debug_util.h" + +-#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID)) ++#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && defined(__GLIBC__)) + + #include <errno.h> + #include <fcntl.h> +--- mozilla-release/ipc.orig/chromium/src/base/file_util.h ++++ mozilla-release/ipc/chromium/src/base/file_util.h +@@ -14,11 +14,16 @@ + #include <windows.h> + #elif defined(ANDROID) + #include <sys/stat.h> ++#define NO_FTS + #elif defined(OS_POSIX) + #include <sys/types.h> +-#include <fts.h> + #include <sys/stat.h> ++#ifdef __GLIBC__ ++#include <fts.h> ++#else ++#define NO_FTS + #endif ++#endif + + #include <stdio.h> + +@@ -466,7 +471,7 @@ + #if defined(OS_WIN) + WIN32_FIND_DATA find_data_; + HANDLE find_handle_; +-#elif defined(ANDROID) ++#elif defined(NO_FTS) + void *fts_; + #elif defined(OS_POSIX) + FTS* fts_; +--- mozilla-release/ipc.orig/chromium/src/base/file_util_posix.cc ++++ mozilla-release/ipc/chromium/src/base/file_util_posix.cc +@@ -8,13 +8,13 @@ + #include <errno.h> + #include <fcntl.h> + #include <fnmatch.h> +-#ifndef ANDROID ++#ifndef NO_FTS + #include <fts.h> + #endif + #include <libgen.h> + #include <stdio.h> + #include <string.h> +-#include <sys/errno.h> ++#include <errno.h> + #include <sys/mman.h> + #define _DARWIN_USE_64_BIT_INODE // Use 64-bit inode data structures + #include <sys/stat.h> +@@ -121,7 +121,7 @@ + if (!recursive) + return (rmdir(path_str) == 0); + +-#ifdef ANDROID ++#ifdef NO_FTS + // XXX Need ftsless impl for bionic + return false; + #else +@@ -194,7 +194,7 @@ + return false; + } + +-#ifdef ANDROID ++#ifdef NO_FTS + // XXX Need ftsless impl for bionic + return false; + #else +@@ -613,7 +613,7 @@ + } + + FileEnumerator::~FileEnumerator() { +-#ifndef ANDROID ++#ifndef NO_FTS + if (fts_) + fts_close(fts_); + #endif +@@ -625,7 +625,7 @@ + if (!is_in_find_op_) + return; + +-#ifndef ANDROID ++#ifndef NO_FTS + memcpy(&(info->stat), fts_ent_->fts_statp, sizeof(info->stat)); + info->filename.assign(fts_ent_->fts_name); + #endif +@@ -636,7 +636,7 @@ + // large directories with many files this can be quite deep. + // TODO(erikkay) - get rid of this recursive pattern + FilePath FileEnumerator::Next() { +-#ifdef ANDROID ++#ifdef NO_FTS + return FilePath(); + #else + if (!is_in_find_op_) { diff --git a/main/xulrunner/fix-media.patch b/main/xulrunner/fix-media.patch new file mode 100644 index 0000000000..0f93cb6e05 --- /dev/null +++ b/main/xulrunner/fix-media.patch @@ -0,0 +1,11 @@ +--- mozilla-release/media.orig/mtransport/third_party/nICEr/src/stun/addrs.c ++++ mozilla-release/media/mtransport/third_party/nICEr/src/stun/addrs.c +@@ -59,8 +59,6 @@ + #include <net/if_dl.h> + #include <net/if_types.h> + #include <sys/sockio.h> +-#else +-#include <linux/if.h> + #endif + #include <net/route.h> + diff --git a/main/xulrunner/fix-netwerk.patch b/main/xulrunner/fix-netwerk.patch new file mode 100644 index 0000000000..f3f684d7f0 --- /dev/null +++ b/main/xulrunner/fix-netwerk.patch @@ -0,0 +1,62 @@ +--- mozilla-release/netwerk.orig/sctp/src/netinet/sctp_bsd_addr.c ++++ mozilla-release/netwerk/sctp/src/netinet/sctp_bsd_addr.c +@@ -52,8 +52,6 @@ + #if defined(ANDROID) + #include <unistd.h> + #include <ifaddrs-android-ext.h> +-#else +-#include <sys/unistd.h> + #endif + #endif + +--- mozilla-release/netwerk.orig/sctp/src/netinet/sctp_os_userspace.h ++++ mozilla-release/netwerk/sctp/src/netinet/sctp_os_userspace.h +@@ -381,11 +381,8 @@ + }; + + #else /* !defined(Userspace_os_Windows) */ +-#include <sys/cdefs.h> /* needed? added from old __FreeBSD__ */ + #include <sys/socket.h> +-#if defined(__Userspace_os_FreeBSD) || defined(__Userspace_os_OpenBSD) || defined(ANDROID) + #include <pthread.h> +-#endif + typedef pthread_mutex_t userland_mutex_t; + typedef pthread_cond_t userland_cond_t; + typedef pthread_t userland_thread_t; +--- mozilla-release/netwerk.orig/sctp/src/netinet/sctp_pcb.c ++++ mozilla-release/netwerk/sctp/src/netinet/sctp_pcb.c +@@ -30,6 +30,8 @@ + * THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#define _BSD_SOURCE /* for IPPORT_RESERVED */ ++ + #ifdef __FreeBSD__ + #include <sys/cdefs.h> + __FBSDID("$FreeBSD: head/sys/netinet/sctp_pcb.c 246687 2013-02-11 21:02:49Z tuexen $"); +@@ -69,11 +71,10 @@ + #endif + #if defined(__Userspace__) + #if !defined(__Userspace_os_Windows) +-#if defined(ANDROID) ++#include <netdb.h> + #include <unistd.h> ++#if defined(ANDROID) + #include <ifaddrs-android-ext.h> +-#else +-#include <sys/unistd.h> + #endif + #endif + #include <user_socketvar.h> +--- mozilla-release/netwerk.orig/sctp/src/user_queue.h ++++ mozilla-release/netwerk/sctp/src/user_queue.h +@@ -31,9 +31,6 @@ + #ifndef _USER_QUEUE_H_ + #define _USER_QUEUE_H_ + +-#if !defined (__Userspace_os_Windows) +-#include <sys/cdefs.h> +-#endif + /* + * This file defines four types of data structures: singly-linked lists, + * singly-linked tail queues, lists and tail queues. diff --git a/main/xulrunner/fix-tools.patch b/main/xulrunner/fix-tools.patch new file mode 100644 index 0000000000..1d0051bb3f --- /dev/null +++ b/main/xulrunner/fix-tools.patch @@ -0,0 +1,117 @@ +--- mozilla-release/tools.orig/profiler/local_debug_info_symbolizer.cc ++++ mozilla-release/tools/profiler/local_debug_info_symbolizer.cc +@@ -3,6 +3,7 @@ + * 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/. */ + ++#include <sys/types.h> + #include "PlatformMacros.h" + #include "nsAutoPtr.h" + +--- mozilla-release/tools.orig/profiler/platform-linux.cc ++++ mozilla-release/tools/profiler/platform-linux.cc +@@ -73,7 +73,7 @@ + + #define SIGNAL_SAVE_PROFILE SIGUSR2 + +-#if defined(__GLIBC__) ++#if 1 + // glibc doesn't implement gettid(2). + #include <sys/syscall.h> + pid_t gettid() +@@ -278,7 +278,7 @@ + // Convert ms to us and subtract 100 us to compensate delays + // occuring during signal delivery. + // TODO measure and confirm this. +- const useconds_t interval = ++ const unsigned long interval = + SamplerRegistry::sampler->interval() * 1000 - 100; + //int result = usleep(interval); + usleep(interval); +--- mozilla-release/tools.orig/profiler/platform.h ++++ mozilla-release/tools/profiler/platform.h +@@ -29,6 +29,8 @@ + #ifndef TOOLS_PLATFORM_H_ + #define TOOLS_PLATFORM_H_ + ++#include <sys/types.h> ++ + #ifdef ANDROID + #include <android/log.h> + #else +--- mozilla-release/tools.orig/profiler/shared-libraries-linux.cc ++++ mozilla-release/tools/profiler/shared-libraries-linux.cc +@@ -14,7 +14,7 @@ + #include "platform.h" + #include "shared-libraries.h" + +-#ifndef __GLIBC__ ++#ifdef ANDRIOD + /* a crapy version of getline, because it's not included in bionic */ + static ssize_t getline(char **lineptr, size_t *n, FILE *stream) + { +--- mozilla-release/toolkit.orig/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc ++++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc +@@ -45,6 +45,7 @@ + #include <sys/mman.h> + #include <sys/stat.h> + #include <unistd.h> ++#include <libgen.h> + + #include <iostream> + #include <set> +--- mozilla-release/toolkit.orig/crashreporter/google-breakpad/src/common/stabs_reader.cc ++++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.cc +@@ -41,6 +41,10 @@ + + #include "common/using_std_string.h" + ++#ifndef N_UNDF ++#define N_UNDF 0 ++#endif ++ + using std::vector; + + namespace google_breakpad { +--- mozilla-release/toolkit.orig/crashreporter/google-breakpad/src/common/stabs_reader.h ++++ mozilla-release/toolkit/crashreporter/google-breakpad/src/common/stabs_reader.h +@@ -53,9 +53,6 @@ + #include <config.h> + #endif + +-#ifdef HAVE_A_OUT_H +-#include <a.out.h> +-#endif + #ifdef HAVE_MACH_O_NLIST_H + #include <mach-o/nlist.h> + #endif +--- mozilla-release/toolkit.orig/mozapps/update/common/updatedefines.h ++++ mozilla-release/toolkit/mozapps/update/common/updatedefines.h +@@ -105,7 +105,7 @@ + + #ifdef SOLARIS + # include <sys/stat.h> +-#else ++#elif defined(__GLIBC__) + # include <fts.h> + #endif + # include <dirent.h> +--- mozilla-release/toolkit.orig/mozapps/update/updater/updater.cpp ++++ mozilla-release/toolkit/mozapps/update/updater/updater.cpp +@@ -43,6 +43,7 @@ + #include <stdarg.h> + + #include <sys/types.h> ++#include <sys/param.h> + #include <sys/stat.h> + #include <fcntl.h> + #include <limits.h> +@@ -3328,7 +3329,7 @@ + return rv; + } + +-#elif defined(SOLARIS) ++#elif defined(SOLARIS) || !defined(__GLIBC__) + int add_dir_entries(const NS_tchar *dirpath, ActionList *list) + { + int rv = OK; diff --git a/main/xulrunner/get_nproc.patch b/main/xulrunner/get_nproc.patch index 3e58a9a001..6ee7fd3233 100644 --- a/main/xulrunner/get_nproc.patch +++ b/main/xulrunner/get_nproc.patch @@ -14,7 +14,7 @@ "Available number of cores:%d", number_of_cores_); -#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK) -+#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK) && !defined(__UCLIBC__) ++#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && !defined(WEBRTC_GONK) && defined(__GLIBC__) && !defined(__UCLIBC__) number_of_cores_ = get_nprocs(); WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, "Available number of cores:%d", number_of_cores_); diff --git a/main/xulrunner/mozconfig b/main/xulrunner/mozconfig index 975cc33889..12799059a9 100644 --- a/main/xulrunner/mozconfig +++ b/main/xulrunner/mozconfig @@ -28,19 +28,20 @@ ac_add_options --enable-pango ac_add_options --enable-svg ac_add_options --enable-canvas ac_add_options --disable-javaxpcom -ac_add_options --enable-crashreporter ac_add_options --enable-safe-browsing ac_add_options --enable-startup-notification ac_add_options --enable-extensions=default -ac_add_options --enable-jemalloc -ac_add_options --enable-replace-malloc ac_add_options --disable-elf-hack ac_add_options --enable-gio ac_add_options --enable-gstreamer +#uclibc#ac_add_options --enable-jemalloc +#uclibc#ac_add_options --enable-replace-malloc +#uclibc#ac_add_options --enable-crashreporter +#musl#ac_add_options --disable-jemalloc +#musl#ac_add_options --disable-crashreporter export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 -export MOZ_JEMALLOC=1 mk_add_options BUILD_OFFICIAL=1 mk_add_options MOZILLA_OFFICIAL=1 |