Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
michael@0 | 1 | #!/bin/bash |
michael@0 | 2 | |
michael@0 | 3 | gcc_version=4.7.3 |
michael@0 | 4 | binutils_version=2.23.1 |
michael@0 | 5 | this_path=$(readlink -f $(dirname $0)) |
michael@0 | 6 | gcc_bt_patch=${this_path}/gcc-bt.patch |
michael@0 | 7 | gcc_pr55650_patch=${this_path}/gcc48-pr55650.patch |
michael@0 | 8 | make_flags='-j12' |
michael@0 | 9 | |
michael@0 | 10 | root_dir=$(mktemp -d) |
michael@0 | 11 | cd $root_dir |
michael@0 | 12 | |
michael@0 | 13 | if test -z $TMPDIR; then |
michael@0 | 14 | TMPDIR=/tmp/ |
michael@0 | 15 | fi |
michael@0 | 16 | |
michael@0 | 17 | wget -c -P $TMPDIR ftp://ftp.gnu.org/gnu/binutils/binutils-$binutils_version.tar.bz2 || exit 1 |
michael@0 | 18 | tar xjf $TMPDIR/binutils-$binutils_version.tar.bz2 |
michael@0 | 19 | mkdir binutils-objdir |
michael@0 | 20 | cd binutils-objdir |
michael@0 | 21 | ../binutils-$binutils_version/configure --prefix /tools/gcc/ --enable-gold --enable-plugins --disable-nls || exit 1 |
michael@0 | 22 | make $make_flags || exit 1 |
michael@0 | 23 | make install $make_flags DESTDIR=$root_dir || exit 1 |
michael@0 | 24 | cd .. |
michael@0 | 25 | |
michael@0 | 26 | wget -c -P $TMPDIR ftp://ftp.gnu.org/gnu/gcc/gcc-$gcc_version/gcc-$gcc_version.tar.bz2 || exit 1 |
michael@0 | 27 | tar xjf $TMPDIR/gcc-$gcc_version.tar.bz2 |
michael@0 | 28 | cd gcc-$gcc_version |
michael@0 | 29 | |
michael@0 | 30 | ./contrib/download_prerequisites |
michael@0 | 31 | |
michael@0 | 32 | # gcc 4.7 doesn't dump a stack on ICE so hack that in |
michael@0 | 33 | patch -p1 < $gcc_bt_patch || exit 1 |
michael@0 | 34 | |
michael@0 | 35 | patch -p0 < $gcc_pr55650_patch || exit 1 |
michael@0 | 36 | |
michael@0 | 37 | cd .. |
michael@0 | 38 | mkdir gcc-objdir |
michael@0 | 39 | cd gcc-objdir |
michael@0 | 40 | ../gcc-$gcc_version/configure --prefix=/tools/gcc --enable-languages=c,c++ --disable-nls --disable-gnu-unique-object --enable-__cxa_atexit --with-arch-32=pentiumpro || exit 1 |
michael@0 | 41 | make $make_flags || exit 1 |
michael@0 | 42 | make $make_flags install DESTDIR=$root_dir || exit 1 |
michael@0 | 43 | |
michael@0 | 44 | cd $root_dir/tools |
michael@0 | 45 | tar caf $root_dir/gcc.tar.xz gcc/ |