--- a/components/binutils/Makefile Tue Nov 03 15:51:03 2015 -0800
+++ b/components/binutils/Makefile Wed Nov 04 08:30:48 2015 -0800
@@ -20,57 +20,82 @@
#
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
#
+
+COMPILER=gcc
+
include ../../make-rules/shared-macros.mk
COMPONENT_NAME= binutils
-COMPONENT_VERSION= 2.23.1
+COMPONENT_VERSION= 2.25.1
COMPONENT_PROJECT_URL= http://www.gnu.org/software/binutils/
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
COMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
COMPONENT_ARCHIVE_HASH= \
- sha256:2ab2e5b03e086d12c6295f831adad46b3e1410a3a234933a2e8fac66cb2e7a19
+ sha256:b5b14added7d78a8d1ca70b5cb75fef57ce2197264f4f5835326b0df22ac9f22
COMPONENT_BUGDB= utility/gnu-binutils
-TPNO= 7483
+TPNO= 23923
include $(WS_MAKE_RULES)/prep.mk
include $(WS_MAKE_RULES)/configure.mk
include $(WS_MAKE_RULES)/ips.mk
+PATCH_LEVEL := 0
+
PARCH = $(MACH:i386=i386-pc)
GNU_ARCH = $(PARCH:sparc=sparc-sun)-solaris$(SOLARIS_VERSION)
PKG_MACROS += GNU_ARCH="$(GNU_ARCH)"
-CFLAGS += $(studio_C99_ENABLE) $(CPP_XPG6MODE)
-CFLAGS += $(CPP_LARGEFILES) $(CPP_POSIX)
-CXXFLAGS += $(CPP_LARGEFILES) $(CPP_POSIX)
-CPPFLAGS += $(CPP_LARGEFILES) $(CPP_POSIX)
+CFLAGS.i386 = -mtune=opteron -march=opteron
+CFLAGS.sparc = -mtune=ultrasparc3 -mcpu=ultrasparc3 -mvis2 \
+ -mno-unaligned-doubles -mhard-float -mimpure-text
+
+CFLAGS = $(CC_BITS) -g -O2 -std=c99
+CFLAGS += $(CFLAGS.$(MACH))
+CFLAGS += -D_REENTRANT $(CPP_LARGEFILES) $(CPP_POSIX)
+CXXFLAGS = $(CC_BITS) -g -O2 -std=c++03
+CXXFLAGS += $(CFLAGS.$(MACH))
+CXXFLAGS += -D_REENTRANT $(CPP_LARGEFILES) $(CPP_POSIX)
+CPPFLAGS += -D_REENTRANT $(CPP_LARGEFILES) $(CPP_POSIX)
CONFIGURE_PREFIX = /usr/gnu
+CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
+CONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
+CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
+CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
+CONFIGURE_ENV += LD_OPTIONS="$(LD_OPTIONS)"
+CONFIGURE_ENV += CCLD="$(CC) $(CFLAGS) $(LDFLAGS)"
+CONFIGURE_ENV += LIBS="$(LIBS)"
+CONFIGURE_ENV += PATH="$(PATH)"
+
CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
-CONFIGURE_OPTIONS += --enable-64-bit-bfd
+CONFIGURE_OPTIONS += --enable-64-bit-bfd=yes
CONFIGURE_OPTIONS += --enable-gold=no
-CONFIGURE_OPTIONS += --enable-plugins=no
-CONFIGURE_OPTIONS += --enable-nls
+CONFIGURE_OPTIONS += --enable-plugins=yes
+CONFIGURE_OPTIONS += --enable-nls=yes
+CONFIGURE_OPTIONS += --enable-host-shared=yes
CONFIGURE_OPTIONS += --disable-libtool-lock
CONFIGURE_OPTIONS += --enable-largefile=yes
+
CONFIGURE_OPTIONS += CC="$(CC)"
CONFIGURE_OPTIONS += CXX="$(CXX)"
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
CONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
CONFIGURE_OPTIONS += CPPFLAGS="$(CPPFLAGS)"
+CONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
+CONFIGURE_OPTIONS += LD_OPTIONS="$(LD_OPTIONS)"
# common targets
-configure: $(CONFIGURE_32)
+configure: $(CONFIGURE_32_and_64)
-build: $(BUILD_32)
+build: $(BUILD_32_and_64)
-install: $(INSTALL_32)
+install: $(INSTALL_32_and_64)
test: $(TEST_32)
@@ -80,3 +105,4 @@
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math
+REQUIRED_PACKAGES += system/library/flex-runtime
--- a/components/binutils/binutils.p5m Tue Nov 03 15:51:03 2015 -0800
+++ b/components/binutils/binutils.p5m Wed Nov 04 08:30:48 2015 -0800
@@ -226,6 +226,7 @@
variant.arch=i386
file path=usr/gnu/$(GNU_ARCH)/lib/ldscripts/elf_x86_64_sol2.xu variant.arch=i386
file path=usr/gnu/$(GNU_ARCH)/lib/ldscripts/elf_x86_64_sol2.xw variant.arch=i386
+#
file path=usr/gnu/bin/addr2line
file path=usr/gnu/bin/ar
file path=usr/gnu/bin/as
@@ -241,8 +242,7 @@
file path=usr/gnu/bin/readelf
file path=usr/gnu/bin/size
file path=usr/gnu/bin/strings
-
-
+#
file path=usr/gnu/include/ansidecl.h
file path=usr/gnu/include/bfd.h
file path=usr/gnu/include/bfdlink.h
@@ -280,6 +280,8 @@
file path=usr/gnu/share/locale/ga/LC_MESSAGES/gprof.mo
file path=usr/gnu/share/locale/ga/LC_MESSAGES/ld.mo
file path=usr/gnu/share/locale/ga/LC_MESSAGES/opcodes.mo
+file path=usr/gnu/share/locale/hr/LC_MESSAGES/binutils.mo
+file path=usr/gnu/share/locale/hu/LC_MESSAGES/gprof.mo
file path=usr/gnu/share/locale/id/LC_MESSAGES/bfd.mo
file path=usr/gnu/share/locale/id/LC_MESSAGES/binutils.mo
file path=usr/gnu/share/locale/id/LC_MESSAGES/gas.mo
@@ -313,6 +315,7 @@
file path=usr/gnu/share/locale/rw/LC_MESSAGES/gas.mo
file path=usr/gnu/share/locale/rw/LC_MESSAGES/gprof.mo
file path=usr/gnu/share/locale/sk/LC_MESSAGES/binutils.mo
+file path=usr/gnu/share/locale/sr/LC_MESSAGES/binutils.mo
file path=usr/gnu/share/locale/sr/LC_MESSAGES/gprof.mo
file path=usr/gnu/share/locale/sv/LC_MESSAGES/bfd.mo
file path=usr/gnu/share/locale/sv/LC_MESSAGES/binutils.mo
@@ -327,6 +330,8 @@
file path=usr/gnu/share/locale/tr/LC_MESSAGES/opcodes.mo
file path=usr/gnu/share/locale/uk/LC_MESSAGES/bfd.mo
file path=usr/gnu/share/locale/uk/LC_MESSAGES/binutils.mo
+file path=usr/gnu/share/locale/uk/LC_MESSAGES/gas.mo
+#
file path=usr/gnu/share/locale/uk/LC_MESSAGES/gprof.mo
file path=usr/gnu/share/locale/uk/LC_MESSAGES/ld.mo
file path=usr/gnu/share/locale/uk/LC_MESSAGES/opcodes.mo
@@ -341,6 +346,7 @@
file path=usr/gnu/share/locale/zh_CN/LC_MESSAGES/opcodes.mo
file path=usr/gnu/share/locale/zh_TW/LC_MESSAGES/binutils.mo
file path=usr/gnu/share/locale/zh_TW/LC_MESSAGES/ld.mo
+#
file path=usr/gnu/share/man/man1/addr2line.1
file path=usr/gnu/share/man/man1/ar.1
file path=usr/gnu/share/man/man1/as.1
@@ -357,6 +363,7 @@
file path=usr/gnu/share/man/man1/readelf.1
file path=usr/gnu/share/man/man1/size.1
file path=usr/gnu/share/man/man1/strings.1
+#
link path=usr/sfw/bin/gaddr2line target=../../gnu/bin/addr2line
link path=usr/sfw/bin/gar target=../../gnu/bin/ar
link path=usr/sfw/bin/gas target=../../gnu/bin/as
@@ -375,7 +382,6 @@
file path=usr/share/info/as.info
file path=usr/share/info/bfd.info
file path=usr/share/info/binutils.info
-file path=usr/share/info/configure.info
file path=usr/share/info/gprof.info
file path=usr/share/info/ld.info
link path=usr/share/man/man1/gaddr2line.1 \
--- a/components/binutils/patches/bfd.aoutfl1.h.patch Tue Nov 03 15:51:03 2015 -0800
+++ b/components/binutils/patches/bfd.aoutfl1.h.patch Wed Nov 04 08:30:48 2015 -0800
@@ -1,6 +1,9 @@
---- binutils-2.23.1/bfd/aoutf1.h 2007-07-03 07:26:39.000000000 -0700
-+++ binutils-2.23.1/bfd/aoutf1.h 2013-01-15 13:57:43.579172744 -0800
-@@ -253,7 +253,7 @@
+# struct regs definition conflicts with the struct regs
+# declaration from /usr/include/sys/dtrace.h.
+# This patch has been submitted to the community.
+--- bfd/aoutf1.h 2014-10-14 00:32:02.000000000 -0700
++++ bfd/aoutf1.h 2015-08-04 11:47:24.254878877 -0700
+@@ -251,7 +251,7 @@
/* But the reg structure can be gotten from the SPARC processor handbook.
This really should be in a GNU include file though so that gdb can use
the same info. */
@@ -9,7 +12,7 @@
{
int r_psr;
int r_pc;
-@@ -287,7 +287,7 @@
+@@ -285,7 +285,7 @@
int c_magic; /* Corefile magic number. */
int c_len; /* Sizeof (struct core). */
#define SPARC_CORE_LEN 432
@@ -18,7 +21,7 @@
struct external_exec c_aouthdr; /* A.out header. */
int c_signo; /* Killing signal, if any. */
int c_tsize; /* Text size (bytes). */
-@@ -310,7 +310,7 @@
+@@ -308,7 +308,7 @@
int c_magic; /* Corefile magic number. */
int c_len; /* Sizeof (struct core). */
#define SOLARIS_BCP_CORE_LEN 456
--- a/components/binutils/patches/binutils.patch Tue Nov 03 15:51:03 2015 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
---- binutils-2.23.1/binutils/elfcomm.h 2010-11-21 13:27:15.000000000 -0800
-+++ binutils-2.23.1/binutils/elfcomm.h 2012-08-28 10:45:54.494740712 -0700
-@@ -30,7 +30,7 @@
- void error (const char *, ...) ATTRIBUTE_PRINTF_1;
- void warn (const char *, ...) ATTRIBUTE_PRINTF_1;
-
--#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
-+#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- /* We can't use any bfd types here since readelf may define BFD64 and
- objdump may not. */
- #define HOST_WIDEST_INT long long
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/binutils/patches/elf-common.h.patch Wed Nov 04 08:30:48 2015 -0800
@@ -0,0 +1,102 @@
+# If building on Solaris, then do the following:
+# 1. #include <sys/auxv.h> - which will bring in all the
+# necessary AT_SUN_* macros.
+# 2. #ifndef guard all the AT_SUN_* macros. The definitions from
+# /usr/include/sys/auxv.h will be used.
+#
+# If not building on Solaris - i.e. cross-compiling, then
+# the AT_SUN_* macro definitions present here will be used.
+#
+# This patch has been submitted to the community.
+--- include/elf/common.h 2014-10-14 00:32:04.000000000 -0700
++++ include/elf/common.h 2015-08-04 12:32:32.098574442 -0700
+@@ -30,6 +30,10 @@
+ #ifndef _ELF_COMMON_H
+ #define _ELF_COMMON_H
+
++#if defined(sun) || defined(__sun) || defined(__sun__)
++#include <sys/auxv.h>
++#endif
++
+ /* Fields in e_ident[]. */
+
+ #define EI_MAG0 0 /* File identification byte 0 index */
+@@ -975,25 +979,77 @@
+ #define AT_L2_CACHESHAPE 36
+ #define AT_L3_CACHESHAPE 37
+
++#ifndef AT_SUN_UID
+ #define AT_SUN_UID 2000 /* Effective user ID. */
++#endif
++
++#ifndef AT_SUN_RUID
+ #define AT_SUN_RUID 2001 /* Real user ID. */
++#endif
++
++#ifndef AT_SUN_GID
+ #define AT_SUN_GID 2002 /* Effective group ID. */
++#endif
++
++#ifndef AT_SUN_RGID
+ #define AT_SUN_RGID 2003 /* Real group ID. */
++#endif
++
++#ifndef AT_SUN_LDELF
+ #define AT_SUN_LDELF 2004 /* Dynamic linker's ELF header. */
++#endif
++
++#ifndef AT_SUN_LDSHDR
+ #define AT_SUN_LDSHDR 2005 /* Dynamic linker's section headers. */
++#endif
++
++#ifndef AT_SUN_LDNAME
+ #define AT_SUN_LDNAME 2006 /* String giving name of dynamic linker. */
++#endif
++
++#ifndef AT_SUN_LPAGESZ
+ #define AT_SUN_LPAGESZ 2007 /* Large pagesize. */
++#endif
++
++#ifndef AT_SUN_PLATFORM
+ #define AT_SUN_PLATFORM 2008 /* Platform name string. */
++#endif
++
++#ifndef AT_SUN_HWCAP
+ #define AT_SUN_HWCAP 2009 /* Machine dependent hints about
+ processor capabilities. */
++#endif
++
++#ifndef AT_SUN_IFLUSH
+ #define AT_SUN_IFLUSH 2010 /* Should flush icache? */
++#endif
++
++#ifndef AT_SUN_CPU
+ #define AT_SUN_CPU 2011 /* CPU name string. */
++#endif
++
++#ifndef AT_SUN_EMUL_ENTRY
+ #define AT_SUN_EMUL_ENTRY 2012 /* COFF entry point address. */
++#endif
++
++#ifndef AT_SUN_EMUL_EXECFD
+ #define AT_SUN_EMUL_EXECFD 2013 /* COFF executable file descriptor. */
++#endif
++
++#ifndef AT_SUN_EXECNAME
+ #define AT_SUN_EXECNAME 2014 /* Canonicalized file name given to execve. */
++#endif
++
++#ifndef AT_SUN_MMU
+ #define AT_SUN_MMU 2015 /* String for name of MMU module. */
++#endif
++
++#ifndef AT_SUN_LDDATA
+ #define AT_SUN_LDDATA 2016 /* Dynamic linker's data segment address. */
+-#define AT_SUN_AUXFLAGS 2017 /* AF_SUN_ flags passed from the kernel. */
++#endif
+
++#ifndef AT_SUN_AUXFLAGS
++#define AT_SUN_AUXFLAGS 2017 /* AF_SUN_ flags passed from the kernel. */
++#endif
+
+ #endif /* _ELF_COMMON_H */
--- a/components/binutils/patches/gas.write.c.patch Tue Nov 03 15:51:03 2015 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
---- binutils-2.23.1/gas/write.c 2011-11-21 01:29:29.000000000 -0800
-+++ binutils-2.23.1/gas/write.c 2012-08-28 10:51:49.991653399 -0700
-@@ -808,6 +808,22 @@
- sym = newsym;
- }
-
-+ /* Also convert fx_subsy if present */
-+ if (fixp->fx_subsy != NULL)
-+ {
-+ symbolS *sub_sym = fixp->fx_subsy;
-+ while (symbol_equated_reloc_p (sub_sym)
-+ || S_IS_WEAKREFR (sub_sym))
-+ {
-+ symbolS *newsym = symbol_get_value_expression (sub_sym)->X_add_symbol;
-+ if (sub_sym == newsym)
-+ break;
-+ fixp->fx_offset -= symbol_get_value_expression (sub_sym)->X_add_number;
-+ fixp->fx_subsy = newsym;
-+ sub_sym = newsym;
-+ }
-+ }
-+
- if (symbol_mri_common_p (sym))
- {
- fixp->fx_offset += S_GET_VALUE (sym);
--- a/components/binutils/patches/output.cc.patch Tue Nov 03 15:51:03 2015 -0800
+++ b/components/binutils/patches/output.cc.patch Wed Nov 04 08:30:48 2015 -0800
@@ -1,5 +1,11 @@
---- binutils-2.23.1/gold/output.cc 2012-11-09 01:21:28.000000000 -0700
-+++ binutils-2.23.1/gold/output.cc 2013-01-01 01:45:50.721203685 -0700
+# Solaris posix_fallocate(3C) will fail if len == 0. Try using
+# posix_fallocate(3C) first, and if it fails, fallback to
+# ftruncate(3C).
+# We aren't building the Gold Linker anyway. This is just for
+# those of us who are building and working on the Gold Linker.
+# This patch has been submitted to the community.
+--- gold/output.cc 2014-10-14 00:32:04.000000000 -0700
++++ gold/output.cc 2015-08-04 11:57:17.805271241 -0700
@@ -22,6 +22,7 @@
#include "gold.h"
--- a/components/binutils/patches/readelf.c.patch Tue Nov 03 15:51:03 2015 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
---- binutils-2.23.1/binutils/readelf.c 2012-11-05 08:27:35.000000000 -0800
-+++ binutils-2.23.1/binutils/readelf.c 2012-12-19 08:07:54.220639084 -0800
-@@ -7284,9 +7284,15 @@
- if (!do_unwind)
- return;
-
-+ /* why do some developers insist on returning from void */
- for (i = 0; handlers[i].handler != NULL; i++)
-+ {
- if (elf_header.e_machine == handlers[i].machtype)
-- return handlers[i].handler (file);
-+ {
-+ handlers[i].handler (file);
-+ return;
-+ }
-+ }
-
- printf (_("\nThe decoding of unwind sections for machine type %s is not currently supported.\n"),
- get_machine_name (elf_header.e_machine));
--- a/components/binutils/patches/timer.cc.patch Tue Nov 03 15:51:03 2015 -0800
+++ b/components/binutils/patches/timer.cc.patch Wed Nov 04 08:30:48 2015 -0800
@@ -1,10 +1,13 @@
---- binutils-2.23.1/gold/timer.cc 2012-04-06 11:21:55.000000000 -0600
-+++ binutils-2.23.1/gold/timer.cc 2012-12-31 23:34:42.787524531 -0700
-@@ -27,6 +27,7 @@
- #ifdef HAVE_TIMES
+# We need <unistd.h>.
+# This patch has been submitted to the community.
+--- gold/timer.cc 2014-10-14 00:32:04.000000000 -0700
++++ gold/timer.cc 2015-08-04 11:59:42.929031188 -0700
+@@ -28,6 +28,8 @@
#include <sys/times.h>
#endif
+
+#include <unistd.h>
-
++
#include "libiberty.h"
+ #include "timer.h"