Skip to content

Commit

Permalink
OS-5934 Update binutils for UEFI
Browse files Browse the repository at this point in the history
Reviewed by: Robert Mustacchi <rm@joyent.com>
Approved by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
jjelinek committed Mar 6, 2017
1 parent 9bc8312 commit b187bfe
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 189 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,6 +1,6 @@
/bash/bash-4.3.30-32
/bind/bind-9.8.0-32
/binutils/binutils-2.22-32*
/binutils/binutils-2.25.1-32*
/bzip2/bzip2-1.0.6*
/bzip2/bzgrep.tmp
/coreutils/coreutils-8.13-32
Expand Down
4 changes: 2 additions & 2 deletions binutils/Makefile
Expand Up @@ -18,10 +18,10 @@
#
# CDDL HEADER END
#
# Copyright (c) 2012, Joyent, Inc. All rights reserved.
# Copyright 2017, Joyent, Inc.
#

VER = binutils-2.22
VER = binutils-2.25.1

include ../Makefile.defs

Expand Down
Binary file not shown.
186 changes: 0 additions & 186 deletions binutils/patches/gcc49.patch

This file was deleted.

27 changes: 27 additions & 0 deletions binutils/patches/stdio-limit.patch
@@ -0,0 +1,27 @@
--- binutils-2.25-orig/bfd/cache.c Tue Oct 14 03:32:02 2014
+++ binutils-2.25/bfd/cache.c Mon Jan 30 12:09:46 2017
@@ -82,7 +82,24 @@
struct rlimit rlim;
if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
&& rlim.rlim_cur != (rlim_t) RLIM_INFINITY)
+ {
+#if defined(__sun__) && defined(_ILP32)
+ /*
+ * Solarish stdio for 32-bit has an ABI-constrained limit that
+ * the UNIX file descriptor must be 255 or less.
+ *
+ * This can be corrected by enabling extended FILE stdio, which
+ * we do here if the reported rlimit allows us to do so.
+ */
+ if (rlim.rlim_cur > 256 &&
+ enable_extended_FILE_stdio(-1, -1) == -1) {
+ perror("Can't enable extended FILE");
+ /* Cap it at 250 to not break stdio. */
+ max = 250;
+ } else
+#endif /* __sun__ */
max = rlim.rlim_cur / 8;
+ }
else
#endif /* HAVE_GETRLIMIT */
#ifdef _SC_OPEN_MAX

0 comments on commit b187bfe

Please sign in to comment.