[tor-commits] [tor-browser-build/master] Bug 34230: Update Windows toolchain for Firefox 78 ESR

sysrqb at torproject.org sysrqb at torproject.org
Fri Jul 17 03:48:22 UTC 2020


commit e26758540bb98e8dc3f9b94e06acd0b75f1a4aa8
Author: Georg Koppen <gk at torproject.org>
Date:   Tue Jun 30 07:09:10 2020 +0000

    Bug 34230: Update Windows toolchain for Firefox 78 ESR
    
    The sort patch is not needed anymore as the reproducibility issue
    got fixed with commit 1405ac457b8b583215cf92d73fbe4479f7c86029 in
    libcxx.
    
    --enable-strip is gone for Windows, see:
    https://hg.mozilla.org/mozilla-central/rev/943fe6210744.
    
    We rebase the libunwind related patch for 32bit Windows for
    compatibility with Rust 1.41.1, too.
---
 projects/firefox/mozconfig-windows-i686   |  1 -
 projects/firefox/mozconfig-windows-x86_64 |  1 -
 projects/firefox/nsis-uninstall.patch     | 18 +++----
 projects/llvm-mingw/config                |  2 +-
 projects/mingw-w64-clang/build            |  1 -
 projects/mingw-w64-clang/config           |  5 +-
 projects/mingw-w64-clang/sort.patch       | 22 --------
 projects/mingw-w64/config                 |  6 +--
 projects/rust/unwind.patch                | 85 ++++++++++++++++---------------
 9 files changed, 56 insertions(+), 85 deletions(-)

diff --git a/projects/firefox/mozconfig-windows-i686 b/projects/firefox/mozconfig-windows-i686
index 8cb2850..a2364e9 100644
--- a/projects/firefox/mozconfig-windows-i686
+++ b/projects/firefox/mozconfig-windows-i686
@@ -23,7 +23,6 @@ export MOZILLA_OFFICIAL=1
 
 ac_add_options --disable-debug
 ac_add_options --enable-optimize
-ac_add_options --enable-strip
 ac_add_options --enable-official-branding
 
 ac_add_options --enable-tor-browser-update
diff --git a/projects/firefox/mozconfig-windows-x86_64 b/projects/firefox/mozconfig-windows-x86_64
index d35dc18..188b3c5 100644
--- a/projects/firefox/mozconfig-windows-x86_64
+++ b/projects/firefox/mozconfig-windows-x86_64
@@ -23,7 +23,6 @@ export MOZILLA_OFFICIAL=1
 
 ac_add_options --disable-debug
 ac_add_options --enable-optimize
-ac_add_options --enable-strip
 ac_add_options --enable-official-branding
 
 ac_add_options --enable-tor-browser-update
diff --git a/projects/firefox/nsis-uninstall.patch b/projects/firefox/nsis-uninstall.patch
index 60e4e3d..93d56aa 100644
--- a/projects/firefox/nsis-uninstall.patch
+++ b/projects/firefox/nsis-uninstall.patch
@@ -1,13 +1,9 @@
-From e338a77c64c0afb72e857c7daa63346d35ad3891 Mon Sep 17 00:00:00 2001
+From 67c1d7d66d99494102832e12059a84fa439c88e0 Mon Sep 17 00:00:00 2001
 From: Sukhbir Singh <sukhbir at torproject.org>
 Date: Tue, 12 Jun 2018 21:58:24 -0400
-Subject: [PATCH 1/1] Bug 26205: Don't build the uninstaller for Windows during
+Subject: [PATCH] Bug 26205: Don't build the uninstaller for Windows during
  Firefox compilation
 
----
- browser/Makefile.in           | 4 ----
- browser/installer/Makefile.in | 4 ----
- 2 files changed, 8 deletions(-)
 
 diff --git a/browser/Makefile.in b/browser/Makefile.in
 index 2eb9e708f68e..0c9442183942 100644
@@ -25,7 +21,7 @@ index 2eb9e708f68e..0c9442183942 100644
  	$(MAKE) -C installer/windows maintenanceservice_installer
  endif
 diff --git a/browser/installer/Makefile.in b/browser/installer/Makefile.in
-index 1bf11252ee06..dee6d5434106 100644
+index 0325f0ffab9a..a5a9488623a3 100644
 --- a/browser/installer/Makefile.in
 +++ b/browser/installer/Makefile.in
 @@ -98,10 +98,6 @@ ifdef NECKO_WIFI
@@ -36,9 +32,9 @@ index 1bf11252ee06..dee6d5434106 100644
 -DEFINES += -DHAVE_MAKENSISU=1
 -endif
 -
- ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
- MOZ_PKG_MAC_DSSTORE=$(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/dsstore
- MOZ_PKG_MAC_BACKGROUND=$(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/background.png
+ ifdef MOZ_DEFAULT_BROWSER_AGENT
+ DEFINES += -DMOZ_DEFAULT_BROWSER_AGENT=1
+ endif
 -- 
-2.18.0.rc2
+2.27.0
 
diff --git a/projects/llvm-mingw/config b/projects/llvm-mingw/config
index b1ebf42..eaaed6e 100644
--- a/projects/llvm-mingw/config
+++ b/projects/llvm-mingw/config
@@ -1,5 +1,5 @@
 # vim: filetype=yaml sw=2
 version: '[% c("abbrev") %]'
-git_hash: c3a16814bd26aa6702e1e5b482a3d9044bb0f725
+git_hash: 9f8e5cebd6dbbb7546e8917e6c59284699a48d26
 git_url: https://github.com/mstorsjo/llvm-mingw.git
 filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
diff --git a/projects/mingw-w64-clang/build b/projects/mingw-w64-clang/build
index 302975d..ecb0e2c 100644
--- a/projects/mingw-w64-clang/build
+++ b/projects/mingw-w64-clang/build
@@ -172,7 +172,6 @@ make -j[% c("buildconf/num_procs") %] VERBOSE=1
 
 # libcxx
 cd $builddir/libcxx
-patch -p1 < $rootdir/sort.patch
 mkdir build && cd build
 cmake -DCMAKE_BUILD_TYPE=Release \
       -DCMAKE_INSTALL_PREFIX=$distdir/[% c("arch") %]-w64-mingw32 \
diff --git a/projects/mingw-w64-clang/config b/projects/mingw-w64-clang/config
index 11480b9..9ae0e61 100644
--- a/projects/mingw-w64-clang/config
+++ b/projects/mingw-w64-clang/config
@@ -1,9 +1,9 @@
 # vim: filetype=yaml sw=2
 filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
 git_url: https://git.code.sf.net/p/mingw-w64/mingw-w64
-git_hash: 0a1d495478d8ed1a94fc77b9dbb428b7e0372588
+git_hash: 1b373beec6d07478ffba33726bb3bb21f32e4411
 version: '[% c("abbrev") %]'
-llvm_version: 8.0.1
+llvm_version: 9.0.1
 gpg_keyring: clang.gpg
 sig_ext: sig
 
@@ -36,4 +36,3 @@ input_files:
   - project: llvm-mingw
     name: llvm-mingw
   - filename: mingw-winrt.patch
-  - filename: sort.patch
diff --git a/projects/mingw-w64-clang/sort.patch b/projects/mingw-w64-clang/sort.patch
deleted file mode 100644
index e9143b0..0000000
--- a/projects/mingw-w64-clang/sort.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 9eeb3b9ea13b25591c9081a5f05a1904d367d523 Mon Sep 17 00:00:00 2001
-From: Georg Koppen <gk at torproject.org>
-Date: Wed, 11 Sep 2019 13:25:54 +0000
-Subject: [PATCH] sorted
-
-
-diff --git a/utils/merge_archives.py b/utils/merge_archives.py
-index 58d92f0e2..597ca2471 100755
---- a/utils/merge_archives.py
-+++ b/utils/merge_archives.py
-@@ -124,7 +124,7 @@ def main():
-         execute_command_verbose([ar_exe, 'x', arc], cwd=temp_directory_root,
-                                 verbose=args.verbose)
- 
--    files = glob.glob(os.path.join(temp_directory_root, '*.o*'))
-+    files = sorted(glob.glob(os.path.join(temp_directory_root, '*.o*')))
-     if not files:
-         print_and_exit('Failed to glob for %s' % temp_directory_root)
-     cmd = [ar_exe, 'qcs', args.output] + files
--- 
-2.23.0
-
diff --git a/projects/mingw-w64/config b/projects/mingw-w64/config
index 1ccbcdf..b0ace13 100644
--- a/projects/mingw-w64/config
+++ b/projects/mingw-w64/config
@@ -1,12 +1,12 @@
 # vim: filetype=yaml sw=2
 filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.gz'
 git_url: https://git.code.sf.net/p/mingw-w64/mingw-w64
-git_hash: 0a1d495478d8ed1a94fc77b9dbb428b7e0372588
+git_hash: 1b373beec6d07478ffba33726bb3bb21f32e4411
 version: '[% c("abbrev") %]'
 var:
   container:
     use_container: 1
-  gcc_version: 9.2.0
+  gcc_version: 9.3.0
   deps:
     - automake
     - build-essential
@@ -30,6 +30,6 @@ targets:
 input_files:
   - project: container-image
   - URL: 'https://ftp.gnu.org/gnu/gcc/gcc-[% c("var/gcc_version") %]/gcc-[% c("var/gcc_version") %].tar.xz'
-    sha256sum: ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206
+    sha256sum: 71e197867611f6054aa1119b13a0c0abac12834765fe2d81f35ac57f84f742d1
   - name: binutils
     project: binutils
diff --git a/projects/rust/unwind.patch b/projects/rust/unwind.patch
index 7b22dcb..c25d9d2 100644
--- a/projects/rust/unwind.patch
+++ b/projects/rust/unwind.patch
@@ -1,4 +1,4 @@
-From b3bea7008ece7a5bdf9b5a5dcc95e82febad1854 Mon Sep 17 00:00:00 2001
+From 212ea02a0743a3bd4fcab1288682d3d780da960b Mon Sep 17 00:00:00 2001
 From: Bjorn Neergaard <bjorn at neersighted.com>
 Date: Sat, 9 Feb 2019 19:39:23 +0000
 Subject: [PATCH] Fix cross-compiling i686-pc-windows-gnu from Linux
@@ -32,61 +32,58 @@ rethinking of how iOS is special-cased above, to avoid further
 duplication. Input on how to best structure this file is requested.
 
 diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
-index 249a183189..df08d6eb0c 100644
+index 831053bc0f7..13ec5da3e3d 100644
 --- a/src/bootstrap/compile.rs
 +++ b/src/bootstrap/compile.rs
-@@ -162,7 +162,12 @@ pub fn std_cargo(builder: &Builder<'_>,
-             .arg("--features")
-             .arg("compiler-builtins-mem");
-     } else {
--        let features = builder.std_features();
-+        let mut features = builder.std_features();
-+
+@@ -208,6 +208,11 @@ pub fn std_cargo(builder: &Builder<'_>,
+         let mut features = builder.std_features();
+         features.push_str(&compiler_builtins_c_feature);
+ 
 +        // FIXME: Temporary detection of SJLJ MinGW compilers.
 +        if builder.config.build.contains("linux") && target == "i686-pc-windows-gnu" {
 +            features.push_str(" sjlj_eh");
 +        }
- 
++
          if compiler.stage != 0 && builder.config.sanitizers {
              // This variable is used by the sanitizer runtime crates, e.g.
+             // rustc_lsan, to build the sanitizer runtime from C code
 diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml
-index 7d60a17042..d876d0b89a 100644
+index a22e162bbff..e1c8f164916 100644
 --- a/src/libstd/Cargo.toml
 +++ b/src/libstd/Cargo.toml
-@@ -71,3 +71,4 @@ wasm-bindgen-threads = []
- # https://github.com/rust-lang-nursery/stdsimd/blob/master/crates/std_detect/Cargo.toml
+@@ -78,6 +78,7 @@ panic_immediate_abort = ["core/panic_immediate_abort"]
+ # https://github.com/rust-lang/stdarch/blob/master/crates/std_detect/Cargo.toml
  std_detect_file_io = []
  std_detect_dlsym_getauxval = []
 +sjlj_eh = ["unwind/sjlj_eh"]
+ 
+ [package.metadata.fortanix-sgx]
+ # Maximum possible number of threads when testing
+diff --git a/src/libtest/Cargo.toml b/src/libtest/Cargo.toml
+index 170fbb984cf..b1b0be71067 100644
+--- a/src/libtest/Cargo.toml
++++ b/src/libtest/Cargo.toml
+@@ -29,3 +29,4 @@ llvm-libunwind = ["std/llvm-libunwind"]
+ panic-unwind = ["std/panic_unwind"]
+ panic_immediate_abort = ["std/panic_immediate_abort"]
+ profiler = ["std/profiler"]
++sjlj_eh = ["std/sjlj_eh"]
 diff --git a/src/libunwind/Cargo.toml b/src/libunwind/Cargo.toml
-index 2378b0a315..0b5979ed62 100644
+index 77bcfffd506..9d9fc5fbff5 100644
 --- a/src/libunwind/Cargo.toml
 +++ b/src/libunwind/Cargo.toml
-@@ -16,3 +16,6 @@ doc = false
- core = { path = "../libcore" }
- libc = { version = "0.2.43", features = ['rustc-dep-of-std'], default-features = false }
- compiler_builtins = "0.1.0"
-+
-+[features]
+@@ -26,3 +26,4 @@ cc = { version = "1.0.1" }
+ 
+ [features]
+ llvm-libunwind = []
 +sjlj_eh = []
 diff --git a/src/libunwind/libunwind.rs b/src/libunwind/libunwind.rs
-index 339b554ed6..ec2f93ed60 100644
+index 0b39503c0d0..ec8681c2985 100644
 --- a/src/libunwind/libunwind.rs
 +++ b/src/libunwind/libunwind.rs
-@@ -1,10 +1,5 @@
- #![allow(nonstandard_style)]
- 
--macro_rules! cfg_if {
--    ( $( if #[cfg( $meta:meta )] { $($it1:item)* } else { $($it2:item)* } )* ) =>
--        ( $( $( #[cfg($meta)] $it1)* $( #[cfg(not($meta))] $it2)* )* )
--}
--
- use libc::{c_int, c_void, uintptr_t};
- 
- #[repr(C)]
-@@ -73,8 +68,8 @@ pub enum _Unwind_Context {}
- pub type _Unwind_Exception_Cleanup_Fn = extern "C" fn(unwind_code: _Unwind_Reason_Code,
-                                                       exception: *mut _Unwind_Exception);
+@@ -74,8 +74,8 @@ pub type _Unwind_Exception_Cleanup_Fn = extern "C" fn(unwind_code: _Unwind_Reaso
+                any(target_os = "fuchsia", target_os = "linux")),
+            link(name = "unwind", kind = "static"))]
  extern "C" {
 -    #[unwind(allowed)]
 -    pub fn _Unwind_Resume(exception: *mut _Unwind_Exception) -> !;
@@ -95,15 +92,15 @@ index 339b554ed6..ec2f93ed60 100644
      pub fn _Unwind_DeleteException(exception: *mut _Unwind_Exception);
      pub fn _Unwind_GetLanguageSpecificData(ctx: *mut _Unwind_Context) -> *mut c_void;
      pub fn _Unwind_GetRegionStart(ctx: *mut _Unwind_Context) -> _Unwind_Ptr;
-@@ -206,26 +201,52 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm
-         pc
-     }
- }
-+} // cfg_if!
+@@ -216,32 +216,50 @@ if #[cfg(all(any(target_os = "ios", target_os = "netbsd", not(target_arch = "arm
+ } // cfg_if!
  
+ cfg_if::cfg_if! {
 -if #[cfg(not(all(target_os = "ios", target_arch = "arm")))] {
 -    // Not 32-bit iOS
-+cfg_if! {
+-    #[cfg_attr(all(feature = "llvm-libunwind",
+-                   any(target_os = "fuchsia", target_os = "linux")),
+-               link(name = "unwind", kind = "static"))]
 +if #[cfg(all(target_os = "ios", target_arch = "arm"))] {
 +    // 32-bit iOS uses SjLj and does not provide _Unwind_Backtrace()
      extern "C" {
@@ -132,6 +129,9 @@ index 339b554ed6..ec2f93ed60 100644
      }
 -} else {
 -    // 32-bit iOS uses SjLj and does not provide _Unwind_Backtrace()
+-    #[cfg_attr(all(feature = "llvm-libunwind",
+-                   any(target_os = "fuchsia", target_os = "linux")),
+-               link(name = "unwind", kind = "static"))]
 -    extern "C" {
 -        #[unwind(allowed)]
 -        pub fn _Unwind_SjLj_RaiseException(e: *mut _Unwind_Exception) -> _Unwind_Reason_Code;
@@ -157,6 +157,7 @@ index 339b554ed6..ec2f93ed60 100644
 +    }
  }
  } // cfg_if!
+ 
 -- 
-2.23.0.rc0
+2.27.0
 





More information about the tor-commits mailing list