Commit 34626bda authored by boklm's avatar boklm Committed by Georg Koppen
Browse files

Bug 30384: Use 64bit containers to build 32bit Windows Tor Browser

parent 21a73d61
...@@ -22,13 +22,8 @@ replace-with = "vendored-sources" ...@@ -22,13 +22,8 @@ replace-with = "vendored-sources"
directory = "/var/tmp/build/cbindgen/vendor" directory = "/var/tmp/build/cbindgen/vendor"
EOF EOF
[% IF ! c("var/windows-i686") -%] cargo build --release --frozen --target x86_64-unknown-linux-gnu
target=x86_64 mv target/x86_64-unknown-linux-gnu/release/cbindgen $distdir/[% project %]
[% ELSE -%]
target=i686
[% END -%]
cargo build --release --frozen --target $target-unknown-linux-gnu
mv target/$target-unknown-linux-gnu/release/cbindgen $distdir/[% project %]
cd $distdir cd $distdir
[% c('tar', { [% c('tar', {
......
...@@ -65,13 +65,6 @@ targets: ...@@ -65,13 +65,6 @@ targets:
suite: stretch suite: stretch
arch: amd64 arch: amd64
stretch-i386:
var:
minimal_apt_version: 1.4.9
container:
suite: stretch
arch: i386
input_files: input_files:
- URL: 'http://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz' - URL: 'http://cdimage.ubuntu.com/ubuntu-base/releases/[% c("var/ubuntu_version") %]/release/ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
filename: 'container-image_ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz' filename: 'container-image_ubuntu-base-[% c("var/ubuntu_version") %]-base-amd64.tar.gz'
......
#!/bin/bash #!/bin/bash
[% c("var/setarch") -%]
[% c("var/set_default_env") -%] [% c("var/set_default_env") -%]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %] [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
distdir=/var/tmp/dist/[% project %] distdir=/var/tmp/dist/[% project %]
...@@ -11,9 +10,7 @@ mkdir -p [% dest_dir _ '/' _ c('filename') %] ...@@ -11,9 +10,7 @@ mkdir -p [% dest_dir _ '/' _ c('filename') %]
tar -C /var/tmp/dist -xf [% c('input_files_by_name/fxc2') %] tar -C /var/tmp/dist -xf [% c('input_files_by_name/fxc2') %]
export PATH="/var/tmp/dist/fxc2/bin:$PATH" export PATH="/var/tmp/dist/fxc2/bin:$PATH"
# fxc2 requires Wine. # fxc2 requires Wine.
[% IF c("var/windows-x86_64") %] export WINEARCH=[% IF c("var/windows-x86_64") %]win64[% ELSE %]win32[% END %]
export WINEARCH=win64
[% END %]
export HOME=/var/tmp/home export HOME=/var/tmp/home
mkdir -p $HOME mkdir -p $HOME
WINEROOT=$HOME/.wine/drive_c WINEROOT=$HOME/.wine/drive_c
......
...@@ -111,11 +111,15 @@ targets: ...@@ -111,11 +111,15 @@ targets:
arch_deps: arch_deps:
- wine - wine
pre_pkginst: | pre_pkginst: |
[% IF c("var/windows-i686") -%]
# We need this to install wine32
dpkg --add-architecture i386
[% END -%]
echo 'deb http://ftp.debian.org/debian stretch-backports main' >> /etc/apt/sources.list echo 'deb http://ftp.debian.org/debian stretch-backports main' >> /etc/apt/sources.list
post_pkginst: | post_pkginst: |
# We need to have at least 3.0.3 which Mozilla is using in the # We need to have at least 3.0.3 which Mozilla is using in the
# mingw-w64/clang build process # mingw-w64/clang build process
apt-get -y -t stretch-backports install wine apt-get -y -t stretch-backports install wine[% IF c("var/windows-i686") %]32[% END %]
compiler: mingw-w64-clang compiler: mingw-w64-clang
windows-i686: windows-i686:
......
...@@ -24,9 +24,6 @@ export MOZILLA_OFFICIAL=1 ...@@ -24,9 +24,6 @@ export MOZILLA_OFFICIAL=1
mk_add_options BUILD_OFFICIAL=1 mk_add_options BUILD_OFFICIAL=1
ac_add_options --disable-debug ac_add_options --disable-debug
# Until we build on a 64bit host we need to hack around linker errors due to
# memory constraints
ac_add_options --disable-debug-symbols
ac_add_options --enable-optimize ac_add_options --enable-optimize
ac_add_options --enable-strip ac_add_options --enable-strip
ac_add_options --enable-official-branding ac_add_options --enable-official-branding
......
#!/bin/sh #!/bin/sh
[% c("var/set_default_env") -%] [% c("var/set_default_env") -%]
[% c("var/setarch") -%]
[% IF c("var/linux") -%] [% IF c("var/linux") -%]
# Config options for hardening-wrapper # Config options for hardening-wrapper
export DEB_BUILD_HARDENING=1 export DEB_BUILD_HARDENING=1
......
...@@ -8,7 +8,6 @@ var: ...@@ -8,7 +8,6 @@ var:
- build-essential - build-essential
- libmpc-dev - libmpc-dev
setup: | setup: |
[% c("var/setarch") -%]
mkdir -p /var/tmp/dist mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %] tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
export PATH="/var/tmp/dist/gcc/bin:$PATH" export PATH="/var/tmp/dist/gcc/bin:$PATH"
......
#!/bin/bash #!/bin/bash
[% c("var/set_default_env") -%] [% c("var/set_default_env") -%]
[% c("var/setarch") -%]
distdir=/var/tmp/dist/[% project %] distdir=/var/tmp/dist/[% project %]
mkdir -p /var/tmp/dist mkdir -p /var/tmp/dist
......
...@@ -8,7 +8,6 @@ var: ...@@ -8,7 +8,6 @@ var:
use_container: 1 use_container: 1
setup: | setup: |
[% c("var/setarch") -%]
mkdir -p /var/tmp/dist mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf $rootdir/[% c("go_tarfile") %] tar -C /var/tmp/dist -xf $rootdir/[% c("go_tarfile") %]
export GOOS=[% c("var/GOOS") %] export GOOS=[% c("var/GOOS") %]
......
...@@ -24,9 +24,7 @@ tar -xf $rootdir/[% c('input_files_by_name/llvm-mingw') %] ...@@ -24,9 +24,7 @@ tar -xf $rootdir/[% c('input_files_by_name/llvm-mingw') %]
# Adding the wrappers and symlinks we need # Adding the wrappers and symlinks we need
cd $distdir/bin cd $distdir/bin
exception_flags="" exception_flags=""
target=""
[% IF c("var/windows-i686") %] [% IF c("var/windows-i686") %]
target="--target=i686-linux-gnu"
exception_flags="-fsjlj-exceptions" exception_flags="-fsjlj-exceptions"
[% END -%] [% END -%]
compiler_flags="--sysroot \$DIR/../[% c("arch") %]-w64-mingw32 -rtlib=compiler-rt -stdlib=libc++ -fuse-ld=lld $exception_flags -fuse-cxa-atexit -Qunused-arguments" compiler_flags="--sysroot \$DIR/../[% c("arch") %]-w64-mingw32 -rtlib=compiler-rt -stdlib=libc++ -fuse-ld=lld $exception_flags -fuse-cxa-atexit -Qunused-arguments"
...@@ -49,7 +47,7 @@ ln -s llvm-nm [% c("arch") %]-w64-mingw32-nm ...@@ -49,7 +47,7 @@ ln -s llvm-nm [% c("arch") %]-w64-mingw32-nm
ln -s llvm-strip [% c("arch") %]-w64-mingw32-strip ln -s llvm-strip [% c("arch") %]-w64-mingw32-strip
ln -s llvm-readobj [% c("arch") %]-w64-mingw32-readobj ln -s llvm-readobj [% c("arch") %]-w64-mingw32-readobj
ln -s llvm-objcopy [% c("arch") %]-w64-mingw32-objcopy ln -s llvm-objcopy [% c("arch") %]-w64-mingw32-objcopy
./clang $builddir/llvm-mingw/wrappers/windres-wrapper.c $target -O2 -Wl,-s -o [% c("arch") %]-w64-mingw32-windres ./clang $builddir/llvm-mingw/wrappers/windres-wrapper.c -O2 -Wl,-s -o [% c("arch") %]-w64-mingw32-windres
# Building mingw-w64 # Building mingw-w64
export PATH="$distdir/bin:/var/tmp/dist/cmake/bin:$PATH" export PATH="$distdir/bin:/var/tmp/dist/cmake/bin:$PATH"
......
...@@ -12,7 +12,6 @@ var: ...@@ -12,7 +12,6 @@ var:
- build-essential - build-essential
- libmpc-dev - libmpc-dev
setup: | setup: |
[% c("var/setarch") -%]
mkdir -p /var/tmp/dist mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %] tar -C /var/tmp/dist -xf $rootdir/[% c("compiler_tarfile") %]
export PATH="/var/tmp/dist/mingw-w64/bin:$PATH" export PATH="/var/tmp/dist/mingw-w64/bin:$PATH"
......
#!/bin/bash #!/bin/bash
[% c('var/setarch') %]
[% c("var/set_default_env") -%] [% c("var/set_default_env") -%]
distdir=/var/tmp/dist/[% project %] distdir=/var/tmp/dist/[% project %]
mkdir -p $distdir mkdir -p $distdir
tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %] tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
export PATH="/var/tmp/dist/cmake/bin:$PATH" export PATH="/var/tmp/dist/cmake/bin:$PATH"
tar -C /var/tmp/dist -xf [% c('input_files_by_name/prev_rust') %] tar -C /var/tmp/dist -xf [% c('input_files_by_name/prev_rust') %]
cd /var/tmp/dist/rust-[% c('var/prev_version') %]-[% c('var/rust_arch') %]-unknown-linux-gnu cd /var/tmp/dist/rust-[% c('var/prev_version') %]-x86_64-unknown-linux-gnu
./install.sh --prefix=$distdir-rust-old ./install.sh --prefix=$distdir-rust-old
export PATH="$distdir-rust-old/bin:$PATH" export PATH="$distdir-rust-old/bin:$PATH"
......
...@@ -4,14 +4,12 @@ version: 1.34.2 ...@@ -4,14 +4,12 @@ version: 1.34.2
var: var:
prev_version: 1.33.0 prev_version: 1.33.0
rust_arch: '[% c("arch") %]'
container: container:
use_container: 1 use_container: 1
targets: targets:
android: android:
var: var:
rust_arch: x86_64
arch_deps: arch_deps:
- libssl-dev - libssl-dev
- pkg-config - pkg-config
...@@ -30,7 +28,6 @@ targets: ...@@ -30,7 +28,6 @@ targets:
linux: linux:
var: var:
rust_arch: x86_64
deps: deps:
- libc6-dev-i386 - libc6-dev-i386
- lib32stdc++6 - lib32stdc++6
...@@ -98,7 +95,7 @@ input_files: ...@@ -98,7 +95,7 @@ input_files:
sig_ext: asc sig_ext: asc
file_gpg_id: 1 file_gpg_id: 1
gpg_keyring: rust.gpg gpg_keyring: rust.gpg
- URL: 'https://static.rust-lang.org/dist/rust-[% c("var/prev_version") %]-[% c("var/rust_arch") %]-unknown-linux-gnu.tar.xz' - URL: 'https://static.rust-lang.org/dist/rust-[% c("var/prev_version") %]-x86_64-unknown-linux-gnu.tar.xz'
name: prev_rust name: prev_rust
sig_ext: asc sig_ext: asc
file_gpg_id: 1 file_gpg_id: 1
......
#!/bin/bash #!/bin/bash
set -e set -e
[% c("var/set_default_env") -%] [% c("var/set_default_env") -%]
[% c("var/setarch") -%]
distdir=/var/tmp/dist/[% project %] distdir=/var/tmp/dist/[% project %]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %] [% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
......
...@@ -280,9 +280,6 @@ targets: ...@@ -280,9 +280,6 @@ targets:
var: var:
windows-x86_64: 1 windows-x86_64: 1
osname: windows-x86_64 osname: windows-x86_64
container:
arch: amd64
faketime_path: /usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1
# HEASLR is 64 bit only (see bug 12968) # HEASLR is 64 bit only (see bug 12968)
flag_HEASLR: '-Wl,--high-entropy-va' flag_HEASLR: '-Wl,--high-entropy-va'
windows-i686: windows-i686:
...@@ -290,25 +287,18 @@ targets: ...@@ -290,25 +287,18 @@ targets:
var: var:
windows-i686: 1 windows-i686: 1
osname: windows-i686 osname: windows-i686
container:
arch: i386
faketime_path: /usr/lib/i386-linux-gnu/faketime/libfaketime.so.1
setarch: |
if test -z "$RBM_SETARCH"
then
export RBM_SETARCH=1
exec setarch i686 ./build
fi
windows: windows:
var: var:
windows: 1 windows: 1
container: container:
suite: stretch suite: stretch
arch: amd64
configure_opt: '--host=[% c("arch") %]-w64-mingw32 CFLAGS="[% c("var/CFLAGS") %]" LDFLAGS="[% c("var/LDFLAGS") %]"' configure_opt: '--host=[% c("arch") %]-w64-mingw32 CFLAGS="[% c("var/CFLAGS") %]" LDFLAGS="[% c("var/LDFLAGS") %]"'
CFLAGS: '-fstack-protector-strong -fno-strict-overflow -Wno-missing-field-initializers -Wformat -Wformat-security [% c("var/flag_mwindows") %]' CFLAGS: '-fstack-protector-strong -fno-strict-overflow -Wno-missing-field-initializers -Wformat -Wformat-security [% c("var/flag_mwindows") %]'
LDFLAGS: '-Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -Wl,--no-insert-timestamp -lssp -L$gcclibs [% c("var/flag_HEASLR") %] [% c("var/flag_mwindows") %]' LDFLAGS: '-Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -Wl,--no-insert-timestamp -lssp -L$gcclibs [% c("var/flag_HEASLR") %] [% c("var/flag_mwindows") %]'
flag_mwindows: '-mwindows' flag_mwindows: '-mwindows'
compiler: mingw-w64 compiler: mingw-w64
faketime_path: /usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1
deps: deps:
- build-essential - build-essential
- python - python
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment