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

Side by Side Diff: build/install-build-deps.sh

Issue 223014: Add gold patch for "out of file descriptors" error. (Closed)
Patch Set: Created 11 years, 3 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash -e 1 #!/bin/bash -e
2 2
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Script to install everything needed to build chromium (well, ideally, anyway) 7 # Script to install everything needed to build chromium (well, ideally, anyway)
8 # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions 8 # See http://code.google.com/p/chromium/wiki/LinuxBuildInstructions
9 # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit 9 # and http://code.google.com/p/chromium/wiki/LinuxBuild64Bit
10 10
(...skipping 13 matching lines...) Expand all
24 BINUTILS=binutils-2.19.1 24 BINUTILS=binutils-2.19.1
25 BINUTILS_URL=http://ftp.gnu.org/gnu/binutils/$BINUTILS.tar.bz2 25 BINUTILS_URL=http://ftp.gnu.org/gnu/binutils/$BINUTILS.tar.bz2
26 BINUTILS_SHA1=88c91e36cde93433e4c4c2b2e3417777aad84526 26 BINUTILS_SHA1=88c91e36cde93433e4c4c2b2e3417777aad84526
27 27
28 test -f $BINUTILS.tar.bz2 || wget $BINUTILS_URL 28 test -f $BINUTILS.tar.bz2 || wget $BINUTILS_URL
29 if `sha1sum $BINUTILS.tar.bz2` != $BINUTILS_SHA1 29 if `sha1sum $BINUTILS.tar.bz2` != $BINUTILS_SHA1
30 then 30 then
31 echo Bad sha1sum for $BINUTILS.tar.bz2 31 echo Bad sha1sum for $BINUTILS.tar.bz2
32 exit 1 32 exit 1
33 fi 33 fi
34
34 cat > binutils-fix.patch <<__EOF__ 35 cat > binutils-fix.patch <<__EOF__
35 --- binutils-2.19.1/gold/reduced_debug_output.h.orig 2009-05-10 14:44:52.0000 00000 -0700 36 --- binutils-2.19.1/gold/reduced_debug_output.h.orig 2009-05-10 14:44:52.0000 00000 -0700
36 +++ binutils-2.19.1/gold/reduced_debug_output.h 2009-05-10 14:46:51.000000000 -0 700 37 +++ binutils-2.19.1/gold/reduced_debug_output.h 2009-05-10 14:46:51.000000000 -0 700
37 @@ -64,7 +64,7 @@ 38 @@ -64,7 +64,7 @@
38 void 39 void
39 failed(std::string reason) 40 failed(std::string reason)
40 { 41 {
41 - gold_warning(reason.c_str()); 42 - gold_warning(reason.c_str());
42 + gold_warning("%s", reason.c_str()); 43 + gold_warning("%s", reason.c_str());
43 failed_ = true; 44 failed_ = true;
44 } 45 }
45 46
46 @@ -110,7 +110,7 @@ 47 @@ -110,7 +110,7 @@
47 void 48 void
48 failed(std::string reason) 49 failed(std::string reason)
49 { 50 {
50 - gold_warning(reason.c_str()); 51 - gold_warning(reason.c_str());
51 + gold_warning("%s", reason.c_str()); 52 + gold_warning("%s", reason.c_str());
52 this->failed_ = true; 53 this->failed_ = true;
53 } 54 }
54 55
56 diff -u -r1.3 -r1.4
57 --- binutils-2.19.1/gold/descriptors.h 2009/01/15 01:29:25 1.3
58 +++ binutils-2.19.1/gold/descriptors.h 2009/02/28 03:05:08 1.4
59 @@ -69,6 +69,8 @@
60 bool inuse;
61 // Whether this is a write descriptor.
62 bool is_write;
63 + // Whether the descriptor is on the stack.
64 + bool is_on_stack;
65 };
66
67 bool
68 --- binutils-2.19.1/gold/descriptors.cc 2009/01/15 01:29:25 1.3
69 +++ binutils-2.19.1/gold/descriptors.cc 2009/02/28 03:05:08 1.4
70 @@ -75,6 +75,12 @@
71 {
72 gold_assert(!pod->inuse);
73 pod->inuse = true;
74 + if (descriptor == this->stack_top_)
75 + {
76 + this->stack_top_ = pod->stack_next;
77 + pod->stack_next = -1;
78 + pod->is_on_stack = false;
79 + }
80 return descriptor;
81 }
82 }
83 @@ -114,6 +120,7 @@
84 pod->stack_next = -1;
85 pod->inuse = true;
86 pod->is_write = (flags & O_ACCMODE) != O_RDONLY;
87 + pod->is_on_stack = false;
88
89 ++this->current_;
90 if (this->current_ >= this->limit_)
91 @@ -158,10 +165,11 @@
92 else
93 {
94 pod->inuse = false;
95 - if (!pod->is_write)
96 + if (!pod->is_write && !pod->is_on_stack)
97 {
98 pod->stack_next = this->stack_top_;
99 this->stack_top_ = descriptor;
100 + pod->is_on_stack = true;
101 }
102 }
103 }
104 @@ -193,6 +201,8 @@
105 this->stack_top_ = pod->stack_next;
106 else
107 this->open_descriptors_[last].stack_next = pod->stack_next;
108 + pod->stack_next = -1;
109 + pod->is_on_stack = false;
110 return true;
111 }
112 last = i;
55 __EOF__ 113 __EOF__
56 114
57 tar -xjvf $BINUTILS.tar.bz2 115 tar -xjvf $BINUTILS.tar.bz2
58 cd $BINUTILS 116 cd $BINUTILS
59 patch -p1 < ../binutils-fix.patch 117 patch -p1 < ../binutils-fix.patch
60 ./configure --prefix=/usr/local/gold --enable-gold 118 ./configure --prefix=/usr/local/gold --enable-gold
61 make -j3 119 make -j3
62 if sudo make install 120 if sudo make install
63 then 121 then
64 # Still need to figure out graceful way of pointing gyp to use 122 # Still need to figure out graceful way of pointing gyp to use
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 sed -e 's/[.]so[.][0-9].*/.so/' | 420 sed -e 's/[.]so[.][0-9].*/.so/' |
363 sort -u); do 421 sort -u); do
364 [ "x${i##*/}" = "xld-linux.so" ] && continue 422 [ "x${i##*/}" = "xld-linux.so" ] && continue
365 [ -r "$i" ] && continue 423 [ -r "$i" ] && continue
366 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' | 424 j="$(ls "$i."* | sed -e 's/.*[.]so[.]\([^.]*\)$/\1/;t;d' |
367 sort -n | tail -n 1)" 425 sort -n | tail -n 1)"
368 [ -r "$i.$j" ] || continue 426 [ -r "$i.$j" ] || continue
369 sudo ln -s "${i##*/}.$j" "$i" 427 sudo ln -s "${i##*/}.$j" "$i"
370 done 428 done
371 fi 429 fi
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698