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

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: 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
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 16 matching lines...) Expand all
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 "============================="
72 sudo debootstrap \ 75 sudo debootstrap \
73 --arch=$ARCH \ 76 --arch=$ARCH \
74 --include=build-essential,flex,bison \ 77 --include=build-essential,flex,bison,autoconf,libtool,automake \
Lei Zhang 2016/02/05 21:21:00 Can you make a couple variables for binutils build
krasin1 2016/02/05 21:51:53 Done.
75 precise precise-chroot-$ARCH 78 precise precise-chroot-$ARCH
76 echo "=============================" 79 echo "============================="
77 fi 80 fi
78 81
79 BUILDDIR=precise-chroot-$ARCH/build 82 BUILDDIR=precise-chroot-$ARCH/build
80 83
81 # Clean up any previous failed build attempts inside chroot 84 # Clean up any previous failed build attempts inside chroot
82 if [ -d "$BUILDDIR" ]; then 85 if [ -d "$BUILDDIR" ]; then
83 sudo rm -rf "$BUILDDIR" 86 sudo rm -rf "$BUILDDIR"
84 fi 87 fi
85 88
86 # Copy data into the chroot 89 # Copy data into the chroot
87 sudo mkdir -p "$BUILDDIR" 90 sudo mkdir -p "$BUILDDIR"
88 sudo cp -a binutils-$VERSION "$BUILDDIR" 91 sudo cp -a binutils-$VERSION "$BUILDDIR"
89 sudo cp -a build-one.sh "$BUILDDIR" 92 sudo cp -a build-one.sh "$BUILDDIR"
93 sudo cp -a gperftools "$BUILDDIR"
90 94
91 # Do the build 95 # Do the build
92 PREFIX= 96 PREFIX=
93 case $ARCH in 97 case $ARCH in
94 i386) 98 i386)
95 PREFIX="setarch linux32" 99 PREFIX="setarch linux32"
96 ARCHNAME=i686-pc-linux-gnu 100 ARCHNAME=i686-pc-linux-gnu
97 ;; 101 ;;
98 amd64) 102 amd64)
99 PREFIX="setarch linux64" 103 PREFIX="setarch linux64"
(...skipping 25 matching lines...) Expand all
125 129
126 # Clean up chroot 130 # Clean up chroot
127 sudo rm -rf "$BUILDDIR" 131 sudo rm -rf "$BUILDDIR"
128 done 132 done
129 133
130 echo "Check you are happy with the binaries in" 134 echo "Check you are happy with the binaries in"
131 echo " $OUTPUTDIR" 135 echo " $OUTPUTDIR"
132 echo "Then" 136 echo "Then"
133 echo " * upload to Google Storage using the upload.sh script" 137 echo " * upload to Google Storage using the upload.sh script"
134 echo " * roll dependencies" 138 echo " * roll dependencies"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698