[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser-build/master] Bug 40305: Update Linux toolchain to switch to mozilla91



commit c2c853e787c5d736f37bed8fc3f7f3bece3ed95a
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
Date:   Thu Jul 8 16:59:17 2021 +0200

    Bug 40305: Update Linux toolchain to switch to mozilla91
---
 projects/clang/build               | 21 +++++++++++----------
 projects/clang/config              |  3 +++
 projects/firefox/build             |  8 +++++---
 projects/lucetc/build              |  2 +-
 projects/lucetc/config             |  7 ++++---
 projects/rust/build                |  3 +++
 projects/rust/config               |  3 +++
 projects/wasi-sysroot/build        | 11 +++++++----
 projects/wasi-sysroot/config       |  3 +--
 projects/wasi-sysroot/no-git.patch | 28 ----------------------------
 rbm.conf                           |  3 +++
 11 files changed, 41 insertions(+), 51 deletions(-)

diff --git a/projects/clang/build b/projects/clang/build
index 608d80c..41669b9 100644
--- a/projects/clang/build
+++ b/projects/clang/build
@@ -4,14 +4,13 @@ distdir=/var/tmp/dist/[% project %]
 mkdir -p /var/tmp/dist
 tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
 export PATH="/var/tmp/dist/cmake/bin:$PATH"
-[% IF c("var/linux") || c("var/android") %]
-  [% IF c("var/linux") %]
-    # We need a link to our GCC, otherwise the system cc gets used which points
-    # to /usr/bin/gcc.
-    [% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc'),
-                                hardened_gcc => 0 }) %]
-    ln -s gcc /var/tmp/dist/gcc/bin/cc
-  [% END %]
+[% IF c("var/linux") %]
+  # We need a link to our GCC, otherwise the system cc gets used which points
+  # to /usr/bin/gcc.
+  [% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc'),
+                              hardened_gcc => 0 }) %]
+  ln -s gcc /var/tmp/dist/gcc/bin/cc
+  [% pc('python', 'var/setup', { python_tarfile => c('input_files_by_name/python') }) %]
 [% END -%]
 [% IF c("var/linux") || c("var/android") || c("var/windows") -%]
   tar -C /var/tmp/dist -xf [% c('input_files_by_name/binutils') %]
@@ -28,13 +27,15 @@ cd build
 [% IF ! c("var/ff91esr") %]
   cmake .. -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$distdir \
                                -DCMAKE_BUILD_TYPE:STRING=Release \
-       [% IF c("var/rlbox") -%]-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly \[% END -%]
+       [% IF c("var/rlbox") -%]-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly[% END %] \
                                $LLVM_HOME
 [% ELSE %]
   cmake ../llvm -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=$distdir \
                                     -DCMAKE_BUILD_TYPE=Release \
+            [% IF c("var/android") -%]
                                     -DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" \
-            [% IF c("var/rlbox") -%]-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly \[% END -%]
+            [% END -%]
+            [% IF c("var/rlbox") -%]-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly[% END %] \
                                     -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;libcxx;libcxxabi;lld"
 [% END -%]
 make -j[% c("buildconf/num_procs") %]
diff --git a/projects/clang/config b/projects/clang/config
index 3ce6d97..038a44b 100644
--- a/projects/clang/config
+++ b/projects/clang/config
@@ -36,3 +36,6 @@ input_files:
   - project: llvm-project
     name: clang-source
     enable: '[% c("var/ff91esr") %]'
+  - project: python
+    name: python
+    enable: '[% c("var/linux") %]'
diff --git a/projects/firefox/build b/projects/firefox/build
index eb2a663..732da0f 100644
--- a/projects/firefox/build
+++ b/projects/firefox/build
@@ -49,7 +49,7 @@ export LLVM_CONFIG="/var/tmp/dist/clang/bin/llvm-config"
     rtdir=/var/tmp/dist/macosx-toolchain/clang/lib/clang/[% pc("clang", "version") %]/lib/wasi
   [% END-%]
   mkdir -p $rtdir
-  cp /var/tmp/dist/wasi-sysroot/lib/clang/9.0.0/lib/wasi/libclang_rt.builtins-wasm32.a $rtdir
+  cp /var/tmp/dist/wasi-sysroot/lib/clang/11.0.0/lib/wasi/libclang_rt.builtins-wasm32.a $rtdir
   tar -C /var/tmp/dist -xf [% c('input_files_by_name/lucetc') %]
   export PATH="/var/tmp/dist/lucetc/bin:$PATH"
   export WASM_SANDBOXED_LIBRARIES=graphite,ogg
@@ -108,6 +108,8 @@ tar -C browser/extensions -xf $rootdir/[% c('input_files_by_name/tor-launcher')
 rm -f configure
 rm -f js/src/configure
 
+export MACH_USE_SYSTEM_PYTHON=1
+
 # Android does not support --enable-bundled-fonts option
 ./mach configure --with-tor-browser-version=[% c("var/torbrowser_version") %] --with-distribution-id=org.torproject --enable-update-channel=[% c("var/channel") %] --enable-bundled-fonts --with-branding=[% c("var/branding_directory") %]
 
@@ -200,10 +202,10 @@ cd $distdir
     # No need for an unstripped geckodriver
     strip geckodriver
   [% END %]
-  mkdir -p $distdir/Debug/Browser/gtk2
+  mkdir -p $distdir/Debug/Browser
   # Strip and generate debuginfo for the firefox binary that we keep, all *.so
   # files, the plugin-container, and the updater (see ticket #10126)
-  for LIB in Browser/*.so Browser/gtk2/*.so Browser/firefox.real Browser/plugin-container Browser/updater
+  for LIB in Browser/*.so Browser/firefox.real Browser/plugin-container Browser/updater
   do
       objcopy --only-keep-debug $LIB Debug/$LIB
       strip $LIB
diff --git a/projects/lucetc/build b/projects/lucetc/build
index e06c272..5ff071f 100644
--- a/projects/lucetc/build
+++ b/projects/lucetc/build
@@ -35,7 +35,7 @@ tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
 # Now prepare the offline build
 # Move the directory for hardcoding the path in .cargo/config
 mv /var/tmp/build/[% project %]-[% c('version') %] $builddir
-tar -C $builddir -xjf lucetc-vendor.tar.bz2
+tar -C $builddir -xf [% c('input_files_by_name/lucetc-vendor') %]
 cd $builddir
 # .cargo exists already, let's just add to it
 cat >> .cargo/config << 'EOF'
diff --git a/projects/lucetc/config b/projects/lucetc/config
index 9c96214..8de3a8e 100644
--- a/projects/lucetc/config
+++ b/projects/lucetc/config
@@ -1,7 +1,7 @@
 # vim: filetype=yaml sw=2
 filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
 version: '[% c("abbrev") %]'
-git_hash: a0a1ce981638109f1f76cd1eecf17a0436a20055
+git_hash: d582d76bf0d17984501f3933688bf7a1eb5cf208
 git_url: https://github.com/PLSysSec/lucet_sandbox_compiler/
 git_submodule: 1
 
@@ -28,8 +28,9 @@ input_files:
   - name: wasi-sysroot
     project: wasi-sysroot
   # Use `make cargo_vendor-lucetc` to re-generate the vendor tarball
-  - URL: https://people.torproject.org/~gk/mirrors/sources/lucetc-vendor.tar.bz2
-    sha256sum: 12ba97fca12177e7ed5b5409fcfdbd31dc7db2e82282768d99dee5bcb1b1246a
+  - name: lucetc-vendor
+    URL: 'https://people.torproject.org/~boklm/mirrors/sources/lucetc-vendor-[% c("version") %].tar.bz2'
+    sha256sum: 6b044ed76bc8870040174c8fbfa49c3a791b3aba7d32dd00cad541025eb16077
   - filename: Remove-march-native-from-COMMON_CFLAGS.patch
 
 steps:
diff --git a/projects/rust/build b/projects/rust/build
index 3d68e61..722aacc 100644
--- a/projects/rust/build
+++ b/projects/rust/build
@@ -14,6 +14,9 @@ cd /var/tmp/dist/rust-[% c('var/previous_version') %]-x86_64-unknown-linux-gnu
 export PATH="$distdir-rust-old/bin:$PATH"
 
 [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
+[% IF c("var/linux") -%]
+  [% pc('python', 'var/setup', { python_tarfile => c('input_files_by_name/python') }) %]
+[% END -%]
 
 [% IF c("var/osx") %]
   # We need to clear `CC` and `LDFLAGS` as they are used for the host platform
diff --git a/projects/rust/config b/projects/rust/config
index 55bf544..1e79687 100644
--- a/projects/rust/config
+++ b/projects/rust/config
@@ -96,6 +96,9 @@ input_files:
     sig_ext: asc
     file_gpg_id: 1
     gpg_keyring: rust.gpg
+  - project: python
+    name: python
+    enable: '[% c("var/linux") %]'
   - filename: unwind.patch
     enable: '[% c("var/windows-i686") %]'
   - filename: 43909.patch
diff --git a/projects/wasi-sysroot/build b/projects/wasi-sysroot/build
index e66d1e0..8ab9524 100644
--- a/projects/wasi-sysroot/build
+++ b/projects/wasi-sysroot/build
@@ -21,13 +21,16 @@ tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
 
 mv /var/tmp/build/[% project %]-[% c('version') %] $builddir
 cd $builddir
-# We have no .git in our tar ball but the Makefile depends on that. Just
-# hard-code the version for now.
-patch -p1 < $rootdir/no-git.patch
+# We have no .git in our tar ball but the script version.sh used by
+# the Makefile depends on that. We replace the script.
+cat > 'version.sh' << EOF
+#!/bin/sh
+echo '[% c("abbrev") %]'
+EOF
 
 # XXX: We don't want to use the clang 9.0 wasi-sdk would use, see:
 # https://bugzilla.mozilla.org/show_bug.cgi?id=1605708
-make -j[% c("buildconf/num_procs") %] PREFIX=$distdir/[% project %]
+make -j[% c("buildconf/num_procs") %] PREFIX=$distdir/[% project %] DESTDIR=/
 
 cd $distdir
 [% c('tar', {
diff --git a/projects/wasi-sysroot/config b/projects/wasi-sysroot/config
index 683f682..96bf873 100644
--- a/projects/wasi-sysroot/config
+++ b/projects/wasi-sysroot/config
@@ -1,7 +1,7 @@
 # vim: filetype=yaml sw=2
 filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
 version: '[% c("abbrev") %]'
-git_hash: 5225b05436ce57f01fe649f411f3ff701246628b
+git_hash: b36c433738f0c29160a5ac1c1cee1b1b884bf4a0
 git_url: https://github.com/CraneStation/wasi-sdk
 git_submodule: 1
 
@@ -27,4 +27,3 @@ input_files:
     project: cmake
   - name: ninja
     project: ninja
-  - filename: no-git.patch
diff --git a/projects/wasi-sysroot/no-git.patch b/projects/wasi-sysroot/no-git.patch
deleted file mode 100644
index 27c3446..0000000
--- a/projects/wasi-sysroot/no-git.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 55a106779cd012f9cf5d6f46a7a3523de9ba93c3 Mon Sep 17 00:00:00 2001
-From: Georg Koppen <gk@xxxxxxxxxxxxxx>
-Date: Sat, 7 Dec 2019 16:12:42 +0000
-Subject: [PATCH] No .git in our tarball
-
-
-diff --git a/Makefile b/Makefile
-index f09a901..dc114cb 100644
---- a/Makefile
-+++ b/Makefile
-@@ -6,11 +6,11 @@ LLVM_PROJ_DIR?=$(ROOT_DIR)/src/llvm-project
- PREFIX?=/opt/wasi-sdk
- 
- CLANG_VERSION=$(shell ./llvm_version.sh $(LLVM_PROJ_DIR))
--VERSION:=$(shell ./version.sh)
--DEBUG_PREFIX_MAP=-fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v$(VERSION)
-+#VERSION:=$(shell ./version.sh)
-+DEBUG_PREFIX_MAP=-fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v8.1g5225b05436ce
- 
- default: build
--	@echo "Use -fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v$(VERSION)"
-+	@echo "Use -fdebug-prefix-map=$(ROOT_DIR)=wasisdk://v8.1g5225b05436ce"
- 
- clean:
- 	rm -rf build $(PREFIX)
--- 
-2.24.0
-
diff --git a/rbm.conf b/rbm.conf
index d231de1..79f7917 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -369,13 +369,16 @@ targets:
   torbrowser-linux-x86_64:
     - linux-x86_64
     - linux
+    - ff91esr
   torbrowser-linux-x86_64-asan:
     - linux-asan
     - linux-x86_64
     - linux
+    - ff91esr
   torbrowser-linux-i686:
     - linux-i686
     - linux
+    - ff91esr
   linux-x86_64:
     arch: x86_64
     var:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits