Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: third_party/binutils/build-all.sh

Issue 1670073003: Link binutils with tcmalloc_minimal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: a comment Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/binutils/README.chromium ('k') | third_party/binutils/build-one.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 # Script to build binutils for both i386 and AMD64 Linux architectures. 6 # Script to build binutils for both i386 and AMD64 Linux architectures.
7 # Must be run on an AMD64 supporting machine which has debootstrap and sudo 7 # Must be run on an AMD64 supporting machine which has debootstrap and sudo
8 # installed. 8 # installed.
9 # Uses Ubuntu Lucid chroots as build environment. 9 # Uses Ubuntu Lucid chroots as build environment.
10 10
(...skipping 17 matching lines...) Expand all
28 # Verify the signature 28 # Verify the signature
29 wget -c -q http://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.bz2.sig 29 wget -c -q http://ftp.gnu.org/gnu/binutils/binutils-$VERSION.tar.bz2.sig
30 if ! gpg --verify binutils-$VERSION.tar.bz2.sig; then 30 if ! gpg --verify binutils-$VERSION.tar.bz2.sig; then
31 echo "GPG Signature failed to verify." 31 echo "GPG Signature failed to verify."
32 echo "" 32 echo ""
33 echo "You may need to import the vendor GPG key with:" 33 echo "You may need to import the vendor GPG key with:"
34 echo "# gpg --keyserver pgp.mit.edu --recv-key 4AE55E93" 34 echo "# gpg --keyserver pgp.mit.edu --recv-key 4AE55E93"
35 exit 1 35 exit 1
36 fi 36 fi
37 37
38 if [ ! -d gperftools ]; then
39 git clone --branch gperftools-2.4 https://github.com/gperftools/gperftools
40 fi
38 41
39 # Extract the source 42 # Extract the source
40 rm -rf binutils-$VERSION 43 rm -rf binutils-$VERSION
41 tar jxf binutils-$VERSION.tar.bz2 44 tar jxf binutils-$VERSION.tar.bz2
42 45
43 # Patch the source 46 # Patch the source
44 ( 47 (
45 cd binutils-$VERSION 48 cd binutils-$VERSION
46 echo "unlock-thin.patch" 49 echo "unlock-thin.patch"
47 echo "==================================" 50 echo "=================================="
(...skipping 14 matching lines...) Expand all
62 65
63 for ARCH in i386 amd64; do 66 for ARCH in i386 amd64; do
64 if [ ! -d precise-chroot-$ARCH ]; then 67 if [ ! -d precise-chroot-$ARCH ]; then
65 # Refresh sudo credentials 68 # Refresh sudo credentials
66 sudo -v 69 sudo -v
67 70
68 # Create the chroot 71 # Create the chroot
69 echo "" 72 echo ""
70 echo "Building chroot for $ARCH" 73 echo "Building chroot for $ARCH"
71 echo "=============================" 74 echo "============================="
75 GPERFTOOLS_DEPS=autoconf,automake,libtool
72 sudo debootstrap \ 76 sudo debootstrap \
73 --arch=$ARCH \ 77 --arch=$ARCH \
74 --include=build-essential,flex,bison \ 78 --include=build-essential,flex,bison,$GPERFTOOLS_DEPS \
75 precise precise-chroot-$ARCH 79 precise precise-chroot-$ARCH
76 echo "=============================" 80 echo "============================="
77 fi 81 fi
78 82
79 BUILDDIR=precise-chroot-$ARCH/build 83 BUILDDIR=precise-chroot-$ARCH/build
80 84
81 # Clean up any previous failed build attempts inside chroot 85 # Clean up any previous failed build attempts inside chroot
82 if [ -d "$BUILDDIR" ]; then 86 if [ -d "$BUILDDIR" ]; then
83 sudo rm -rf "$BUILDDIR" 87 sudo rm -rf "$BUILDDIR"
84 fi 88 fi
85 89
86 # Copy data into the chroot 90 # Copy data into the chroot
87 sudo mkdir -p "$BUILDDIR" 91 sudo mkdir -p "$BUILDDIR"
88 sudo cp -a binutils-$VERSION "$BUILDDIR" 92 sudo cp -a binutils-$VERSION "$BUILDDIR"
89 sudo cp -a build-one.sh "$BUILDDIR" 93 sudo cp -a build-one.sh "$BUILDDIR"
94 sudo cp -a gperftools "$BUILDDIR"
90 95
91 # Do the build 96 # Do the build
92 PREFIX= 97 PREFIX=
93 case $ARCH in 98 case $ARCH in
94 i386) 99 i386)
95 PREFIX="setarch linux32" 100 PREFIX="setarch linux32"
96 ARCHNAME=i686-pc-linux-gnu 101 ARCHNAME=i686-pc-linux-gnu
97 ;; 102 ;;
98 amd64) 103 amd64)
99 PREFIX="setarch linux64" 104 PREFIX="setarch linux64"
(...skipping 25 matching lines...) Expand all
125 130
126 # Clean up chroot 131 # Clean up chroot
127 sudo rm -rf "$BUILDDIR" 132 sudo rm -rf "$BUILDDIR"
128 done 133 done
129 134
130 echo "Check you are happy with the binaries in" 135 echo "Check you are happy with the binaries in"
131 echo " $OUTPUTDIR" 136 echo " $OUTPUTDIR"
132 echo "Then" 137 echo "Then"
133 echo " * upload to Google Storage using the upload.sh script" 138 echo " * upload to Google Storage using the upload.sh script"
134 echo " * roll dependencies" 139 echo " * roll dependencies"
OLDNEW
« no previous file with comments | « third_party/binutils/README.chromium ('k') | third_party/binutils/build-one.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698