| OLD | NEW |
| 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 18 matching lines...) Expand all Loading... |
| 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 | 38 |
| 39 # Extract the source | 39 if [ ! -d binutils-$VERSION ]; then |
| 40 rm -rf binutils-$VERSION | 40 # Extract the source |
| 41 tar jxf binutils-$VERSION.tar.bz2 | 41 tar jxf binutils-$VERSION.tar.bz2 |
| 42 | 42 |
| 43 # Patch the source | 43 # Patch the source |
| 44 ( | 44 ( |
| 45 cd binutils-$VERSION | 45 cd binutils-$VERSION |
| 46 echo "unlock-thin.patch" | 46 echo "unlock-thin.patch" |
| 47 echo "==================================" | 47 echo "==================================" |
| 48 patch -p1 < ../unlock-thin.patch | 48 patch -p1 < ../unlock-thin.patch |
| 49 echo "----------------------------------" | 49 echo "----------------------------------" |
| 50 echo | 50 echo |
| 51 echo "plugin-dso-fix.patch" | 51 echo "plugin-dso-fix.patch" |
| 52 echo "==================================" | 52 echo "==================================" |
| 53 patch -p1 < ../plugin-dso-fix.patch | 53 patch -p1 < ../plugin-dso-fix.patch |
| 54 echo "----------------------------------" | 54 echo "----------------------------------" |
| 55 echo | 55 echo |
| 56 echo "long-plt.patch" | 56 ) |
| 57 echo "==================================" | 57 fi |
| 58 patch -p1 < ../long-plt.patch | |
| 59 echo "----------------------------------" | |
| 60 echo | |
| 61 ) | |
| 62 | 58 |
| 63 for ARCH in i386 amd64; do | 59 for ARCH in i386 amd64; do |
| 64 if [ ! -d precise-chroot-$ARCH ]; then | 60 if [ ! -d precise-chroot-$ARCH ]; then |
| 65 # Refresh sudo credentials | 61 # Refresh sudo credentials |
| 66 sudo -v | 62 sudo -v |
| 67 | 63 |
| 68 # Create the chroot | 64 # Create the chroot |
| 69 echo "" | 65 echo "" |
| 70 echo "Building chroot for $ARCH" | 66 echo "Building chroot for $ARCH" |
| 71 echo "=============================" | 67 echo "=============================" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 121 |
| 126 # Clean up chroot | 122 # Clean up chroot |
| 127 sudo rm -rf "$BUILDDIR" | 123 sudo rm -rf "$BUILDDIR" |
| 128 done | 124 done |
| 129 | 125 |
| 130 echo "Check you are happy with the binaries in" | 126 echo "Check you are happy with the binaries in" |
| 131 echo " $OUTPUTDIR" | 127 echo " $OUTPUTDIR" |
| 132 echo "Then" | 128 echo "Then" |
| 133 echo " * upload to Google Storage using the upload.sh script" | 129 echo " * upload to Google Storage using the upload.sh script" |
| 134 echo " * roll dependencies" | 130 echo " * roll dependencies" |
| OLD | NEW |