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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/install-build-deps.sh
diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh
index 8a6668e48c08fb60b91e733b8e6fa4f1bce0fef2..d16af734cdeded9cf5c82a5f4776e0d8143b53fc 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
« 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