summaryrefslogtreecommitdiffstats
path: root/build/install-build-deps.sh
diff options
context:
space:
mode:
authormmoss@chromium.org <mmoss@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-23 22:22:47 +0000
committermmoss@chromium.org <mmoss@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-23 22:22:47 +0000
commit0b53eb0872f98199048e1b55f2180bf6442cea5f (patch)
tree1aa7eaa88b3c298fab3289256cf0259d928b817b /build/install-build-deps.sh
parent5a970843989662555dd8cc0ff17b34766d8e7b51 (diff)
downloadchromium_src-0b53eb0872f98199048e1b55f2180bf6442cea5f.zip
chromium_src-0b53eb0872f98199048e1b55f2180bf6442cea5f.tar.gz
chromium_src-0b53eb0872f98199048e1b55f2180bf6442cea5f.tar.bz2
Add gold patch for "out of file descriptors" error.
For example: http://chrome-buildbot.corp.google.com:8016/builders/Chromium%20Linux%20Builder%20(dbg-shlib)/builds/39/steps/compile/logs/stdio Patch cherry-picked from: http://sourceware.org/bugzilla/show_bug.cgi?id=5990 Review URL: http://codereview.chromium.org/223014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27004 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/install-build-deps.sh')
-rwxr-xr-xbuild/install-build-deps.sh58
1 files changed, 58 insertions, 0 deletions
diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh
index 8a6668e..d16af73 100755
--- a/build/install-build-deps.sh
+++ b/build/install-build-deps.sh
@@ -31,6 +31,7 @@ install_gold() {
echo Bad sha1sum for $BINUTILS.tar.bz2
exit 1
fi
+
cat > binutils-fix.patch <<__EOF__
--- binutils-2.19.1/gold/reduced_debug_output.h.orig 2009-05-10 14:44:52.000000000 -0700
+++ binutils-2.19.1/gold/reduced_debug_output.h 2009-05-10 14:46:51.000000000 -0700
@@ -52,6 +53,63 @@ install_gold() {
this->failed_ = true;
}
+diff -u -r1.3 -r1.4
+--- binutils-2.19.1/gold/descriptors.h 2009/01/15 01:29:25 1.3
++++ binutils-2.19.1/gold/descriptors.h 2009/02/28 03:05:08 1.4
+@@ -69,6 +69,8 @@
+ bool inuse;
+ // Whether this is a write descriptor.
+ bool is_write;
++ // Whether the descriptor is on the stack.
++ bool is_on_stack;
+ };
+
+ bool
+--- binutils-2.19.1/gold/descriptors.cc 2009/01/15 01:29:25 1.3
++++ binutils-2.19.1/gold/descriptors.cc 2009/02/28 03:05:08 1.4
+@@ -75,6 +75,12 @@
+ {
+ gold_assert(!pod->inuse);
+ pod->inuse = true;
++ if (descriptor == this->stack_top_)
++ {
++ this->stack_top_ = pod->stack_next;
++ pod->stack_next = -1;
++ pod->is_on_stack = false;
++ }
+ return descriptor;
+ }
+ }
+@@ -114,6 +120,7 @@
+ pod->stack_next = -1;
+ pod->inuse = true;
+ pod->is_write = (flags & O_ACCMODE) != O_RDONLY;
++ pod->is_on_stack = false;
+
+ ++this->current_;
+ if (this->current_ >= this->limit_)
+@@ -158,10 +165,11 @@
+ else
+ {
+ pod->inuse = false;
+- if (!pod->is_write)
++ if (!pod->is_write && !pod->is_on_stack)
+ {
+ pod->stack_next = this->stack_top_;
+ this->stack_top_ = descriptor;
++ pod->is_on_stack = true;
+ }
+ }
+ }
+@@ -193,6 +201,8 @@
+ this->stack_top_ = pod->stack_next;
+ else
+ this->open_descriptors_[last].stack_next = pod->stack_next;
++ pod->stack_next = -1;
++ pod->is_on_stack = false;
+ return true;
+ }
+ last = i;
__EOF__
tar -xjvf $BINUTILS.tar.bz2