diff options
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | build/autoconf/config.guess | 7 | ||||
-rw-r--r-- | ipc/chromium/src/build/build_config.h | 2 | ||||
-rw-r--r-- | js/src/gc/Memory.cpp | 6 | ||||
-rw-r--r-- | js/src/jsapi-tests/testGCAllocator.cpp | 7 | ||||
-rw-r--r-- | media/webrtc/trunk/build/build_config.h | 2 | ||||
-rw-r--r-- | media/webrtc/trunk/webrtc/typedefs.h | 2 | ||||
-rw-r--r-- | memory/mozjemalloc/jemalloc.c | 29 | ||||
-rw-r--r-- | netwerk/protocol/http/UserAgentOverrides.jsm | 23 | ||||
-rw-r--r-- | netwerk/protocol/http/moz.build | 4 | ||||
-rw-r--r-- | python/mozbuild/mozbuild/mach_commands.py | 15 | ||||
-rw-r--r-- | toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h | 2 | ||||
-rw-r--r-- | xpcom/reflect/xptcall/md/unix/moz.build | 4 |
13 files changed, 69 insertions, 36 deletions
@@ -36,4 +36,4 @@ improvement patches upstream to its origin to mutually improve the platform and a future for XUL. ## Looking for Pale Moon and Basilisk? -As of [`Issue #969`](https://github.com/MoonchildProductions/UXP/issues/969), release versions `29.0.0` and `2020.03.04` respectively, they have been split off into their own dedicated repositories located at [`MoonchildProductions/Pale-Moon`](https://github.com/MoonchildProductions/Pale-Moon) and [`MoonchildProductions/Basilisk`](https://github.com/MoonchildProductions/Basilisk). +As of [`Issue #969`](https://github.com/MoonchildProductions/UXP/issues/969), release versions `28.9.0` and `2020.03.04` respectively, they have been split off into their own dedicated repositories located at [`MoonchildProductions/Pale-Moon`](https://github.com/MoonchildProductions/Pale-Moon) and [`MoonchildProductions/Basilisk`](https://github.com/MoonchildProductions/Basilisk). diff --git a/build/autoconf/config.guess b/build/autoconf/config.guess index d5d667d4a..28d509201 100755 --- a/build/autoconf/config.guess +++ b/build/autoconf/config.guess @@ -842,6 +842,13 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW32_NT*:*) + if [ "$PLATFORM" = "X64" ]; then + echo x86_64-pc-mingw32 + else + echo ${UNAME_MACHINE}-pc-mingw32 + fi + exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; diff --git a/ipc/chromium/src/build/build_config.h b/ipc/chromium/src/build/build_config.h index 7e6beb37a..7a41701c2 100644 --- a/ipc/chromium/src/build/build_config.h +++ b/ipc/chromium/src/build/build_config.h @@ -85,7 +85,7 @@ #elif defined(__ppc__) || defined(__powerpc__) #define ARCH_CPU_PPC 1 #define ARCH_CPU_32_BITS 1 -#elif defined(__sparc64__) +#elif defined(__sparc__) && defined(__arch64__) #define ARCH_CPU_SPARC 1 #define ARCH_CPU_64_BITS 1 #elif defined(__sparc__) diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp index 418984057..17c964da0 100644 --- a/js/src/gc/Memory.cpp +++ b/js/src/gc/Memory.cpp @@ -423,7 +423,7 @@ MapMemoryAt(void* desired, size_t length, int prot = PROT_READ | PROT_WRITE, // possibly be correct on AMD64, but for Solaris/illumos it is. { -#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__) || (defined(__sun) && defined(__x86_64__)) +#if defined(__ia64__) || defined(__aarch64__) || (defined(__sun) && defined(__x86_64__)) || (defined(__sparc__) && defined(__arch64__) && (defined(__NetBSD__) || defined(__linux__))) MOZ_ASSERT((0xffff800000000000ULL & (uintptr_t(desired) + length - 1)) == 0); #endif void* region = mmap(desired, length, prot, flags, fd, offset); @@ -446,7 +446,7 @@ static inline void* MapMemory(size_t length, int prot = PROT_READ | PROT_WRITE, int flags = MAP_PRIVATE | MAP_ANON, int fd = -1, off_t offset = 0) { -#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) +#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__NetBSD__)) /* * The JS engine assumes that all allocated pointers have their high 17 bits clear, * which ia64's mmap doesn't support directly. However, we can emulate it by passing @@ -473,7 +473,7 @@ MapMemory(size_t length, int prot = PROT_READ | PROT_WRITE, return nullptr; } return region; -#elif defined(__aarch64__) || (defined(__sun) && defined(__x86_64__)) +#elif defined(__aarch64__) || (defined(__sun) && defined(__x86_64__)) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) /* * There might be similar virtual address issue on arm64 which depends on * hardware and kernel configurations. But the work around is slightly diff --git a/js/src/jsapi-tests/testGCAllocator.cpp b/js/src/jsapi-tests/testGCAllocator.cpp index d203019ec..c7f430cb0 100644 --- a/js/src/jsapi-tests/testGCAllocator.cpp +++ b/js/src/jsapi-tests/testGCAllocator.cpp @@ -302,7 +302,8 @@ void unmapPages(void* p, size_t size) { } void* mapMemoryAt(void* desired, size_t length) { -#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) || defined(__aarch64__) +#if defined(__ia64__) || defined(__aarch64__) || \ + (defined(__sparc__) && defined(__arch64__) && (defined(__NetBSD__) || defined(__linux__))) MOZ_RELEASE_ASSERT(0xffff800000000000ULL & (uintptr_t(desired) + length - 1) == 0); #endif void* region = mmap(desired, length, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); @@ -324,7 +325,7 @@ mapMemory(size_t length) int fd = -1; off_t offset = 0; // The test code must be aligned with the implementation in gc/Memory.cpp. -#if defined(__ia64__) || (defined(__sparc64__) && defined(__NetBSD__)) +#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__NetBSD__)) void* region = mmap((void*)0x0000070000000000, length, prot, flags, fd, offset); if (region == MAP_FAILED) return nullptr; @@ -334,7 +335,7 @@ mapMemory(size_t length) return nullptr; } return region; -#elif defined(__aarch64__) +#elif defined(__aarch64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) const uintptr_t start = UINT64_C(0x0000070000000000); const uintptr_t end = UINT64_C(0x0000800000000000); const uintptr_t step = js::gc::ChunkSize; diff --git a/media/webrtc/trunk/build/build_config.h b/media/webrtc/trunk/build/build_config.h index 55ed38c2c..8966586a7 100644 --- a/media/webrtc/trunk/build/build_config.h +++ b/media/webrtc/trunk/build/build_config.h @@ -129,7 +129,7 @@ #define ARCH_CPU_PPC 1 #define ARCH_CPU_32_BITS 1 #define ARCH_CPU_BIG_ENDIAN 1 -#elif defined(__sparc64__) +#elif defined(__sparc__) && defined(__arch64__) #define ARCH_CPU_SPARC_FAMILY 1 #define ARCH_CPU_SPARC 1 #define ARCH_CPU_64_BITS 1 diff --git a/media/webrtc/trunk/webrtc/typedefs.h b/media/webrtc/trunk/webrtc/typedefs.h index 99ea82a99..fa669b886 100644 --- a/media/webrtc/trunk/webrtc/typedefs.h +++ b/media/webrtc/trunk/webrtc/typedefs.h @@ -61,7 +61,7 @@ #define WEBRTC_ARCH_BIG_ENDIAN #define WEBRTC_BIG_ENDIAN #endif -#elif defined(__sparc64__) +#elif defined(__sparc__) && defined(__arch64__) #define WEBRTC_ARCH_SPARC 1 #define WEBRTC_ARCH_64_BITS 1 #define WEBRTC_ARCH_BIG_ENDIAN diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c index 50ba22889..47a5a9f5c 100644 --- a/memory/mozjemalloc/jemalloc.c +++ b/memory/mozjemalloc/jemalloc.c @@ -1966,7 +1966,7 @@ static void * pages_map(void *addr, size_t size) { void *ret; -#if defined(__ia64__) +#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) /* * The JS engine assumes that all allocated pointers have their high 17 bits clear, * which ia64's mmap doesn't support directly. However, we can emulate it by passing @@ -1987,6 +1987,28 @@ pages_map(void *addr, size_t size) } #endif +#if defined(__sparc__) && defined(__arch64__) && defined(__linux__) + const uintptr_t start = 0x0000070000000000ULL; + const uintptr_t end = 0x0000800000000000ULL; + + /* Copied from js/src/gc/Memory.cpp and adapted for this source */ + + uintptr_t hint; + void* region = MAP_FAILED; + for (hint = start; region == MAP_FAILED && hint + size <= end; hint += chunksize) { + region = mmap((void*)hint, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON, -1, 0); + if (region != MAP_FAILED) { + if (((size_t) region + (size - 1)) & 0xffff800000000000) { + if (munmap(region, size)) { + MOZ_ASSERT(errno == ENOMEM); + } + region = MAP_FAILED; + } + } + } + ret = region; +#else + /* * We don't use MAP_FIXED here, because it can cause the *replacement* * of existing mappings, and we only want to create new mappings. @@ -1995,10 +2017,11 @@ pages_map(void *addr, size_t size) MAP_PRIVATE | MAP_ANON, -1, 0); assert(ret != NULL); +#endif if (ret == MAP_FAILED) { ret = NULL; } -#if defined(__ia64__) +#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) /* * If the allocated memory doesn't have its upper 17 bits clear, consider it * as out of memory. @@ -2031,7 +2054,7 @@ pages_map(void *addr, size_t size) MozTagAnonymousMemory(ret, size, "jemalloc"); } -#if defined(__ia64__) +#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__)) assert(ret == NULL || (!check_placement && ret != NULL) || (check_placement && ret == addr)); #else diff --git a/netwerk/protocol/http/UserAgentOverrides.jsm b/netwerk/protocol/http/UserAgentOverrides.jsm index 425bdfd72..e106f817a 100644 --- a/netwerk/protocol/http/UserAgentOverrides.jsm +++ b/netwerk/protocol/http/UserAgentOverrides.jsm @@ -2,6 +2,10 @@ * 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/. */ +#ifdef XP_WIN +#define UA_SPARE_PLATFORM +#endif + "use strict"; this.EXPORTED_SYMBOLS = [ "UserAgentOverrides" ]; @@ -18,9 +22,14 @@ const PREF_OVERRIDES_ENABLED = "general.useragent.site_specific_overrides"; const DEFAULT_UA = Cc["@mozilla.org/network/protocol;1?name=http"] .getService(Ci.nsIHttpProtocolHandler) .userAgent; -const OS_SLICE = Cc["@mozilla.org/network/protocol;1?name=http"] +const OSCPU = Cc["@mozilla.org/network/protocol;1?name=http"] + .getService(Ci.nsIHttpProtocolHandler) + .oscpu; +#ifndef UA_SPARE_PLATFORM +const PLATFORM = Cc["@mozilla.org/network/protocol;1?name=http"] .getService(Ci.nsIHttpProtocolHandler) - .oscpu + ";"; + .platform; +#endif const MAX_OVERRIDE_FOR_HOST_CACHE_SIZE = 250; XPCOMUtils.defineLazyServiceGetter(this, "ppmm", @@ -37,12 +46,20 @@ var gOverrideFunctions = [ function (aHttpChannel) { return UserAgentOverrides.getOverrideForURI(aHttpChannel.URI); } ]; var gBuiltUAs = new Map; +var gOSSlice; this.UserAgentOverrides = { init: function uao_init() { if (gInitialized) return; + gOSSlice = OSCPU + ";"; +#ifndef UA_SPARE_PLATFORM + if (PLATFORM != "") { + gOSSlice = PLATFORM + "; " + gOSSlice; + } +#endif + gPrefBranch = Services.prefs.getBranch("general.useragent.override."); gPrefBranch.addObserver("", buildOverrides, false); @@ -151,7 +168,7 @@ function getUserAgentFromOverride(override) if (search && replace) { userAgent = DEFAULT_UA.replace(new RegExp(search, "g"), replace); } else { - userAgent = override.replace(/%OS_SLICE%/g, OS_SLICE); + userAgent = override.replace(/%OS_SLICE%/g, gOSSlice); } gBuiltUAs.set(override, userAgent); return userAgent; diff --git a/netwerk/protocol/http/moz.build b/netwerk/protocol/http/moz.build index 37e801f2f..a1b57876b 100644 --- a/netwerk/protocol/http/moz.build +++ b/netwerk/protocol/http/moz.build @@ -99,9 +99,9 @@ IPDL_SOURCES += [ 'PHttpChannel.ipdl', ] -EXTRA_JS_MODULES += ['UserAgentOverrides.jsm'] +EXTRA_JS_MODULES += ['UserAgentUpdates.jsm'] -EXTRA_PP_JS_MODULES += ['UserAgentUpdates.jsm'] +EXTRA_PP_JS_MODULES += ['UserAgentOverrides.jsm'] include('/ipc/chromium/chromium-config.mozbuild') diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index 5933a5aa9..6e57ab5ae 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -541,21 +541,6 @@ class Build(MachCommandBase): # as when doing OSX Universal builds) pass - # Check if there are any unpreprocessed files in '@MOZ_OBJDIR@/dist/bin' - # See python/mozbuild/mozbuild/preprocessor.py#L293-L309 for the list of directives - # We skip if, ifdef, ifndef, else, elif, elifdef and elifndef, because they are never used alone - # - # The original version of this script only worked with GNU grep because of the --include flag. - # Not a problem in and of itself, except that it didn't take TOOLCHAIN_PREFIX and simply assumed - # all operating systems use GNU grep as the system grep (often it's called ggrep or something). - # This script is a bit slower, but should do the same thing on all Unix platforms. - - grepcmd = 'find ' + self.topobjdir + '/dist/bin' + ' -name \'\*.{css,dtd,html,js,jsm,xhtml,xml,xul,manifest,properties,rdf}\' ' + '| xargs grep -E "^(#|%)(define|endif|error|expand|filter|include|literal|undef|unfilter)" '\ - + '| awk "/\.css:%/ || (!/\.css/ && /:#/)"' - grepresult = subprocess.Popen(grepcmd, stdout=subprocess.PIPE, shell=True).communicate()[0] - if grepresult: - print('\nERROR: preprocessor was not applied to the following files:\n\n' + grepresult) - return status @Command('configure', category='build', diff --git a/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h b/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h index 7956d076d..b05f2f853 100644 --- a/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h +++ b/toolkit/components/protobuf/src/google/protobuf/stubs/platform_macros.h @@ -67,7 +67,7 @@ #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 #elif defined(sparc) #define GOOGLE_PROTOBUF_ARCH_SPARC 1 -#ifdef SOLARIS_64BIT_ENABLED +#ifdef __arch64__ #define GOOGLE_PROTOBUF_ARCH_64_BIT 1 #else #define GOOGLE_PROTOBUF_ARCH_32_BIT 1 diff --git a/xpcom/reflect/xptcall/md/unix/moz.build b/xpcom/reflect/xptcall/md/unix/moz.build index 8ee7b3181..c5d968608 100644 --- a/xpcom/reflect/xptcall/md/unix/moz.build +++ b/xpcom/reflect/xptcall/md/unix/moz.build @@ -177,7 +177,7 @@ if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'powerpc': 'xptcstubs_ppc_openbsd.cpp', ] -if CONFIG['OS_ARCH'] == 'Linux' and 'sparc' in CONFIG['OS_TEST']: +if CONFIG['OS_ARCH'] == 'Linux' and CONFIG['OS_TEST'] == 'sparc': SOURCES += [ 'xptcinvoke_asm_sparc_linux_GCC3.s', 'xptcinvoke_sparc_solaris.cpp', @@ -205,7 +205,7 @@ if CONFIG['OS_ARCH'] == 'OpenBSD' and CONFIG['OS_TEST'] == 'sparc': # files for 64-bit SPARC with no ill effects, so basically the entire mess that # was there before is no longer needed. -if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD', 'SunOS') and CONFIG['OS_TEST'] == 'sparc64': +if CONFIG['OS_ARCH'] in ('OpenBSD', 'FreeBSD', 'SunOS', 'Linux') and CONFIG['OS_TEST'] == 'sparc64': SOURCES += [ 'xptcinvoke_asm_sparc64_openbsd.s', 'xptcinvoke_sparc64_openbsd.cpp', |