diff options
Diffstat (limited to 'www-client/firefox/files')
5 files changed, 353 insertions, 0 deletions
diff --git a/www-client/firefox/files/firefox-60.0-blessings-TERM.patch b/www-client/firefox/files/firefox-60.0-blessings-TERM.patch index 3d024a47b99a..975e0cf6fe7b 100644 --- a/www-client/firefox/files/firefox-60.0-blessings-TERM.patch +++ b/www-client/firefox/files/firefox-60.0-blessings-TERM.patch @@ -54,3 +54,17 @@ index 3872b5f..fdceb09 100644 # There was an error setting up the terminal, either curses is # not supported or TERM is incorrectly set. Fall back to dumb. self._does_styling = False + + +--- a/python/mach/mach/logging.py ++++ b/python/mach/mach/logging.py +@@ -93,7 +93,7 @@ + + def set_terminal(self, terminal): + self.terminal = terminal +- self._sgr0 = blessings.tigetstr('sgr0') or '' if terminal and blessings else '' ++ self._sgr0 = terminal.normal if terminal and blessings else '' + + def format(self, record): + f = record.msg.format(**record.params) + diff --git a/www-client/firefox/files/firefox-60.0-do-not-force-lld.patch b/www-client/firefox/files/firefox-60.0-do-not-force-lld.patch new file mode 100644 index 000000000000..a8325bc745b2 --- /dev/null +++ b/www-client/firefox/files/firefox-60.0-do-not-force-lld.patch @@ -0,0 +1,262 @@ +https://hg.mozilla.org/mozilla-central/rev/e8c173a632a4 +https://hg.mozilla.org/mozilla-central/rev/dbeb248015cc +https://hg.mozilla.org/mozilla-central/rev/de7abe2c2b3e + +--- a/build/moz.configure/toolchain.configure ++++ b/build/moz.configure/toolchain.configure +@@ -1331,10 +1331,6 @@ def lto(value, c_compiler): + + # clang and clang-cl + if c_compiler.type in ('clang', 'clang-cl'): +- # Until Bug 1457168 is fixed, we have to hardcode -fuse-ld=lld here +- if c_compiler.type == 'clang': +- flags.append("-fuse-ld=lld") +- + if len(value) and value[0].lower() == 'full': + flags.append("-flto") + ldflags.append("-flto") +@@ -1362,8 +1358,6 @@ add_old_configure_assignment('MOZ_LTO', lto.enabled) + add_old_configure_assignment('MOZ_LTO_CFLAGS', lto.flags) + add_old_configure_assignment('MOZ_LTO_LDFLAGS', lto.ldflags) + +-imply_option('--enable-linker', 'lld', when='--enable-lto') +- + # ASAN + # ============================================================== + +@@ -1566,7 +1560,7 @@ set_config('CARGO_INCREMENTAL', cargo_incremental) + + @depends(target) + def is_linker_option_enabled(target): +- if target.kernel not in ('Darwin', 'WINNT', 'SunOS'): ++ if target.kernel not in ('WINNT', 'SunOS'): + return True + + +@@ -1578,21 +1572,40 @@ option('--enable-gold', + imply_option('--enable-linker', 'gold', when='--enable-gold') + + js_option('--enable-linker', nargs=1, +- help='Select the linker {bfd, gold, lld, lld-*}', ++ help='Select the linker {bfd, gold, ld64, lld, lld-*}', + when=is_linker_option_enabled) + + + @depends('--enable-linker', c_compiler, developer_options, '--enable-gold', +- extra_toolchain_flags, when=is_linker_option_enabled) ++ extra_toolchain_flags, target, lto.enabled, ++ when=is_linker_option_enabled) + @checking('for linker', lambda x: x.KIND) + @imports('os') + @imports('shutil') + def select_linker(linker, c_compiler, developer_options, enable_gold, +- toolchain_flags): +- +- linker = linker[0] if linker else None ++ toolchain_flags, target, lto): ++ ++ if linker: ++ linker = linker[0] ++ elif lto and c_compiler.type == 'clang' and target.kernel != 'Darwin': ++ # If no linker was explicitly given, and building with clang for non-macOS, ++ # prefer lld. For macOS, we prefer ld64, or whatever the default linker is. ++ linker = 'lld' ++ else: ++ linker = None + +- if linker not in ('bfd', 'gold', 'lld', None) and not linker.startswith("lld-"): ++ def is_valid_linker(linker): ++ if target.kernel == 'Darwin': ++ valid_linkers = ('ld64', 'lld') ++ else: ++ valid_linkers = ('bfd', 'gold', 'lld') ++ if linker in valid_linkers: ++ return True ++ if 'lld' in valid_linkers and linker.startswith('lld-'): ++ return True ++ return False ++ ++ if linker and not is_valid_linker(linker): + # Check that we are trying to use a supported linker + die('Unsupported linker ' + linker) + +@@ -1602,13 +1615,34 @@ def select_linker(linker, c_compiler, developer_options, enable_gold, + + def try_linker(linker): + # Generate the compiler flag +- linker_flag = ["-fuse-ld=" + linker] if linker else [] ++ if linker == 'ld64': ++ linker_flag = ['-fuse-ld=ld'] ++ elif linker: ++ linker_flag = ["-fuse-ld=" + linker] ++ else: ++ linker_flag = [] + cmd = cmd_base + linker_flag + version_check + if toolchain_flags: + cmd += toolchain_flags + +- cmd_output = check_cmd_output(*cmd).decode('utf-8') +- if 'GNU ld' in cmd_output: ++ # ld64 doesn't have anything to print out a version. It does print out ++ # "ld64: For information on command line options please use 'man ld'." ++ # but that would require doing two attempts, one with --version, that ++ # would fail, and another with --help. ++ # Instead, abuse its LD_PRINT_OPTIONS feature to detect a message ++ # specific to it on stderr when it fails to process --version. ++ env = dict(os.environ) ++ env['LD_PRINT_OPTIONS'] = '1' ++ retcode, stdout, stderr = get_cmd_output(*cmd, env=env) ++ cmd_output = stdout.decode('utf-8') ++ stderr = stderr.decode('utf-8') ++ if retcode == 1 and 'Logging ld64 options' in stderr: ++ kind = 'ld64' ++ ++ elif retcode != 0: ++ return None ++ ++ elif 'GNU ld' in cmd_output: + # We are using the normal linker + kind = 'bfd' + +@@ -1627,13 +1661,21 @@ def select_linker(linker, c_compiler, developer_options, enable_gold, + ) + + result = try_linker(linker) ++ if result is None: ++ if linker: ++ die("Could not use {} as linker".format(linker)) ++ die("Failed to find a linker") + + if (linker is None and enable_gold.origin == 'default' and + developer_options and result.KIND == 'bfd'): +- gold = try_linker('gold') +- +- if gold.KIND == 'gold': +- result = gold ++ # try and use lld if available. ++ tried = try_linker('lld') ++ if tried is None or tried.KIND != 'lld': ++ tried = try_linker('gold') ++ if tried is None or tried.KIND != 'gold': ++ tried = None ++ if tried: ++ result = tried + + # If an explicit linker was given, error out if what we found is different. + if linker and not linker.startswith(result.KIND): +@@ -1644,7 +1686,7 @@ def select_linker(linker, c_compiler, developer_options, enable_gold, + + set_config('LD_IS_BFD', depends(select_linker.KIND) + (lambda x: x == 'bfd' or None)) +-set_config('LINKER_LDFLAGS', select_linker.LINKER_FLAG) ++add_old_configure_assignment('LINKER_LDFLAGS', select_linker.LINKER_FLAG) + + + js_option('--enable-clang-plugin', env='ENABLE_CLANG_PLUGIN', +--- a/build/moz.configure/util.configure ++++ b/build/moz.configure/util.configure +@@ -19,20 +19,13 @@ def configure_error(message): + their inputs from moz.configure usage.''' + raise ConfigureError(message) + +-# A wrapper to obtain a process' output that returns the output generated +-# by running the given command if it exits normally, and streams that +-# output to log.debug and calls die or the given error callback if it +-# does not. +- + ++# A wrapper to obtain a process' output and return code. ++# Returns a tuple (retcode, stdout, stderr). + @imports(_from='__builtin__', _import='unicode') + @imports('subprocess') +-@imports('sys') +-@imports(_from='mozbuild.configure.util', _import='LineIO') + @imports(_from='mozbuild.shellutil', _import='quote') +-def check_cmd_output(*args, **kwargs): +- onerror = kwargs.pop('onerror', None) +- ++def get_cmd_output(*args, **kwargs): + # subprocess on older Pythons can't handle unicode keys or values in + # environment dicts. Normalize automagically so callers don't have to + # deal with this. +@@ -49,12 +42,24 @@ def check_cmd_output(*args, **kwargs): + + kwargs['env'] = normalized_env + ++ log.debug('Executing: `%s`', quote(*args)) ++ proc = subprocess.Popen(args, stdout=subprocess.PIPE, ++ stderr=subprocess.PIPE, **kwargs) ++ stdout, stderr = proc.communicate() ++ return proc.wait(), stdout, stderr ++ ++ ++# A wrapper to obtain a process' output that returns the output generated ++# by running the given command if it exits normally, and streams that ++# output to log.debug and calls die or the given error callback if it ++# does not. ++@imports(_from='mozbuild.configure.util', _import='LineIO') ++@imports(_from='mozbuild.shellutil', _import='quote') ++def check_cmd_output(*args, **kwargs): ++ onerror = kwargs.pop('onerror', None) ++ + with log.queue_debug(): +- log.debug('Executing: `%s`', quote(*args)) +- proc = subprocess.Popen(args, stdout=subprocess.PIPE, +- stderr=subprocess.PIPE, **kwargs) +- stdout, stderr = proc.communicate() +- retcode = proc.wait() ++ retcode, stdout, stderr = get_cmd_output(*args, **kwargs) + if retcode == 0: + return stdout + +--- a/js/src/old-configure.in ++++ b/js/src/old-configure.in +@@ -63,6 +63,8 @@ dnl ======================================================== + USE_PTHREADS= + _PTHREAD_LDFLAGS="" + ++LDFLAGS="$LDFLAGS $LINKER_LDFLAGS" ++ + MOZ_DEFAULT_COMPILER + + if test -z "$JS_STANDALONE"; then +--- a/old-configure.in ++++ b/old-configure.in +@@ -78,6 +78,8 @@ dnl ======================================================== + MOZ_USE_PTHREADS= + _PTHREAD_LDFLAGS="" + ++LDFLAGS="$LDFLAGS $LINKER_LDFLAGS" ++ + MOZ_DEFAULT_COMPILER + + if test "$COMPILE_ENVIRONMENT"; then +--- a/python/mozbuild/mozbuild/frontend/context.py ++++ b/python/mozbuild/mozbuild/frontend/context.py +@@ -384,8 +384,6 @@ class LinkFlags(BaseCompileFlags): + + self.flag_variables = ( + ('OS', self._os_ldflags(), ('LDFLAGS',)), +- ('LINKER', context.config.substs.get('LINKER_LDFLAGS'), +- ('LDFLAGS',)), + ('DEFFILE', None, ('LDFLAGS',)), + ('MOZBUILD', None, ('LDFLAGS',)), + ('FIX_LINK_PATHS', context.config.substs.get('MOZ_FIX_LINK_PATHS'), +--- a/python/mozbuild/mozbuild/test/frontend/test_emitter.py ++++ b/python/mozbuild/mozbuild/test/frontend/test_emitter.py +@@ -242,7 +242,6 @@ class TestEmitterBasic(unittest.TestCase): + def test_link_flags(self): + reader = self.reader('link-flags', extra_substs={ + 'OS_LDFLAGS': ['-Wl,rpath-link=/usr/lib'], +- 'LINKER_LDFLAGS': ['-fuse-ld=gold'], + 'MOZ_OPTIMIZE': '', + 'MOZ_OPTIMIZE_LDFLAGS': ['-Wl,-dead_strip'], + 'MOZ_DEBUG_LDFLAGS': ['-framework ExceptionHandling'], +@@ -250,7 +249,6 @@ class TestEmitterBasic(unittest.TestCase): + sources, ldflags, lib, compile_flags = self.read_topsrcdir(reader) + self.assertIsInstance(ldflags, ComputedFlags) + self.assertEqual(ldflags.flags['OS'], reader.config.substs['OS_LDFLAGS']) +- self.assertEqual(ldflags.flags['LINKER'], reader.config.substs['LINKER_LDFLAGS']) + self.assertEqual(ldflags.flags['MOZBUILD'], ['-Wl,-U_foo', '-framework Foo', '-x']) + self.assertEqual(ldflags.flags['OPTIMIZE'], []) + diff --git a/www-client/firefox/files/firefox-60.0-missing-errno_h-in-SandboxOpenedFiles_cpp.patch b/www-client/firefox/files/firefox-60.0-missing-errno_h-in-SandboxOpenedFiles_cpp.patch new file mode 100644 index 000000000000..c746c73940ef --- /dev/null +++ b/www-client/firefox/files/firefox-60.0-missing-errno_h-in-SandboxOpenedFiles_cpp.patch @@ -0,0 +1,27 @@ +https://bugs.gentoo.org/667096 + +https://bugzilla.mozilla.org/show_bug.cgi?id=1480554 +--- a/security/sandbox/linux/SandboxOpenedFiles.cpp ++++ b/security/sandbox/linux/SandboxOpenedFiles.cpp +@@ -4,16 +4,17 @@ + * 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 "SandboxOpenedFiles.h" + + #include "mozilla/Move.h" + #include "SandboxLogging.h" + ++#include <errno.h> + #include <fcntl.h> + #include <unistd.h> + + namespace mozilla { + + // The default move constructor almost works, but Atomic isn't + // move-constructable and the fd needs some special handling. + SandboxOpenedFile::SandboxOpenedFile(SandboxOpenedFile&& aMoved) + + + + diff --git a/www-client/firefox/files/firefox-60.0-rust-1.29-comp.patch b/www-client/firefox/files/firefox-60.0-rust-1.29-comp.patch new file mode 100644 index 000000000000..6fbd13fe639a --- /dev/null +++ b/www-client/firefox/files/firefox-60.0-rust-1.29-comp.patch @@ -0,0 +1,37 @@ +https://bugs.gentoo.org/666898 + +https://bugzilla.mozilla.org/show_bug.cgi?id=1479540 +--- a/build/moz.configure/init.configure ++++ b/build/moz.configure/init.configure +@@ -572,17 +572,26 @@ option('--target', nargs=1, + @imports(_from='__builtin__', _import='KeyError') + @imports(_from='__builtin__', _import='ValueError') + def split_triplet(triplet, allow_unknown=False): + # The standard triplet is defined as + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM + # There is also a quartet form: + # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM + # But we can consider the "KERNEL-OPERATING_SYSTEM" as one. +- cpu, manufacturer, os = triplet.split('-', 2) ++ # Additionally, some may omit "unknown" when the manufacturer ++ # is not specified and emit ++ # CPU_TYPE-OPERATING_SYSTEM ++ parts = triplet.split('-', 2) ++ if len(parts) == 3: ++ cpu, _, os = parts ++ elif len(parts) == 2: ++ cpu, os = parts ++ else: ++ die("Unexpected triplet string: %s" % triplet) + + # Autoconf uses config.sub to validate and canonicalize those triplets, + # but the granularity of its results has never been satisfying to our + # use, so we've had our own, different, canonicalization. We've also + # historically not been very consistent with how we use the canonicalized + # values. Hopefully, this will help us make things better. + # The tests are inherited from our decades-old autoconf-based configure, + # which can probably be improved/cleaned up because they are based on a + + + + diff --git a/www-client/firefox/files/firefox-60.0-sandbox-lto.patch b/www-client/firefox/files/firefox-60.0-sandbox-lto.patch new file mode 100644 index 000000000000..990cb4fbee77 --- /dev/null +++ b/www-client/firefox/files/firefox-60.0-sandbox-lto.patch @@ -0,0 +1,13 @@ +https://bugs.gentoo.org/666580 + +--- a/security/sandbox/linux/moz.build ++++ b/security/sandbox/linux/moz.build +@@ -101,7 +101,7 @@ if CONFIG['CC_TYPE'] in ('clang', 'gcc'): + # forcing there to be only one partition. + for f in CONFIG['OS_CXXFLAGS']: + if f.startswith('-flto') and CONFIG['CC_TYPE'] != 'clang': +- LDFLAGS += ['--param lto-partitions=1'] ++ LDFLAGS += ['--param=lto-partitions=1'] + + DEFINES['NS_NO_XPCOM'] = True + DisableStlWrapping() |