Thread: [Modulinux-commits] SF.net SVN: modulinux:[4] trunk/scripts/toolchain
Status: Planning
Brought to you by:
serisman
|
From: <ser...@us...> - 2009-01-25 05:21:11
|
Revision: 4
http://modulinux.svn.sourceforge.net/modulinux/?rev=4&view=rev
Author: serisman
Date: 2009-01-25 05:21:02 +0000 (Sun, 25 Jan 2009)
Log Message:
-----------
Updated kernel-headers to Linux version 2.6.28.2. Also added some patches to get everything to compile again.
Modified Paths:
--------------
trunk/scripts/toolchain/gcc/gcc.mk
trunk/scripts/toolchain/gmp/gmp.mk
trunk/scripts/toolchain/kernel-headers/kernel-headers.mk
trunk/scripts/toolchain/mpfr/mpfr.mk
trunk/scripts/toolchain/uclibc/uclibc.mk
Added Paths:
-----------
trunk/scripts/toolchain/binutils/2.19/binutils-2.19-branch_update-4.patch
trunk/scripts/toolchain/gcc/4.3.2/gcc-4.3.2-branch_update-2.patch
trunk/scripts/toolchain/gmp/4.2.4/
trunk/scripts/toolchain/gmp/4.2.4/gmp-4.2.4-branch_update-1.patch
trunk/scripts/toolchain/kernel-headers/2.6.28.2/
trunk/scripts/toolchain/kernel-headers/2.6.28.2/linux-2.6.28.2-serial_h_fix-1.patch
trunk/scripts/toolchain/mpfr/2.3.2/
trunk/scripts/toolchain/mpfr/2.3.2/mpfr-2.3.2-branch_update-1.patch
trunk/scripts/toolchain/uclibc/0.9.30/uClibc-0.9.30-kernel_types_h_fix-1.patch
Added: trunk/scripts/toolchain/binutils/2.19/binutils-2.19-branch_update-4.patch
===================================================================
--- trunk/scripts/toolchain/binutils/2.19/binutils-2.19-branch_update-4.patch (rev 0)
+++ trunk/scripts/toolchain/binutils/2.19/binutils-2.19-branch_update-4.patch 2009-01-25 05:21:02 UTC (rev 4)
@@ -0,0 +1,3598 @@
+Submitted By: Jim Gifford (jim at cross-lfs dot org)
+Date: 01-22-2009
+Initial Package Version: 2.19
+Origin: Upstream
+Upstream Status: Applied
+Description: This is a branch update for binutils-2.19, and should be
+ rechecked periodically.
+
+diff -Naur binutils-2.19.orig/bfd/ChangeLog binutils-2.19/bfd/ChangeLog
+--- binutils-2.19.orig/bfd/ChangeLog 2008-10-16 06:20:48.000000000 -0700
++++ binutils-2.19/bfd/ChangeLog 2009-01-14 01:13:49.000000000 -0800
+@@ -1,3 +1,37 @@
++2009-01-14 Joseph Myers <jo...@co...>
++
++ * elf32-arm.c (elf32_arm_final_link_relocate): Do not turn
++ branches to undefine weak symbols into branches to the next
++ instruction if creating PLT entries for those symbols.
++
++2008-12-23 Nick Clifton <ni...@re...>
++
++ * Import this patch from the mainline:
++ 2008-11-10 Andreas Schwab <sc...@su...>
++
++ PR 7011
++ * elf.c (assign_file_positions_for_non_load_sections): Handle
++ PT_GNU_RELRO specially.
++
++2008-11-20 Alan Modra <am...@bi...>
++
++ * elf32-ppc.c (allocate_dynrelocs): Always use tlsld_got for
++ TLS_LD even when symbol is used with other TLS reloc types.
++ (ppc_elf_relocate_section): Bypass symbol checks when using tlsld_got.
++ Leave addend zero on LD DTPMOD dynamic reloc.
++
++2008-11-17 Eric B. Weddington <eri...@at...>
++
++ PR 7022
++ * elf32-avr.c (bfd_elf_avr_final_write_processing):
++ Add missing break statements.
++
++2008-10-28 Tristan Gingold <gi...@ad...>
++
++ * configure.in: Bump version to 2.19.0
++ * Makefile.am (RELEASE): Unset.
++ * configure, Makefile.in: Regenerated.
++
+ 2008-10-16 Tristan Gingold <gi...@ad...>
+
+ * configure.in: Bump version to 2.19
+diff -Naur binutils-2.19.orig/bfd/configure binutils-2.19/bfd/configure
+--- binutils-2.19.orig/bfd/configure 2008-10-16 06:20:42.000000000 -0700
++++ binutils-2.19/bfd/configure 2008-10-28 03:42:15.000000000 -0700
+@@ -3032,7 +3032,7 @@
+
+ # Define the identity of the package.
+ PACKAGE=bfd
+- VERSION=2.19
++ VERSION=2.19.0
+
+
+ cat >>confdefs.h <<_ACEOF
+diff -Naur binutils-2.19.orig/bfd/configure.in binutils-2.19/bfd/configure.in
+--- binutils-2.19.orig/bfd/configure.in 2008-10-16 06:20:34.000000000 -0700
++++ binutils-2.19/bfd/configure.in 2008-10-28 03:42:15.000000000 -0700
+@@ -8,7 +8,7 @@
+ AC_CANONICAL_TARGET
+ AC_ISC_POSIX
+
+-AM_INIT_AUTOMAKE(bfd, 2.19)
++AM_INIT_AUTOMAKE(bfd, 2.19.0)
+
+ dnl These must be called before LT_INIT, because it may want
+ dnl to call AC_CHECK_PROG.
+diff -Naur binutils-2.19.orig/bfd/doc/bfdver.texi binutils-2.19/bfd/doc/bfdver.texi
+--- binutils-2.19.orig/bfd/doc/bfdver.texi 2008-10-16 06:45:29.000000000 -0700
++++ binutils-2.19/bfd/doc/bfdver.texi 2009-01-14 01:00:24.000000000 -0800
+@@ -1,4 +1,4 @@
+-@set VERSION 2.19
++@set VERSION 2.19.0
+ @set VERSION_PACKAGE (GNU Binutils)
+-@set UPDATED October 2008
++@set UPDATED December 2008
+ @set BUGURL @uref{http://www.sourceware.org/bugzilla/}
+diff -Naur binutils-2.19.orig/bfd/elf32-arm.c binutils-2.19/bfd/elf32-arm.c
+--- binutils-2.19.orig/bfd/elf32-arm.c 2008-08-26 07:40:18.000000000 -0700
++++ binutils-2.19/bfd/elf32-arm.c 2009-01-14 01:13:49.000000000 -0800
+@@ -6381,8 +6381,9 @@
+ int thumb2 = using_thumb2 (globals);
+
+ /* A branch to an undefined weak symbol is turned into a jump to
+- the next instruction. */
+- if (h && h->root.type == bfd_link_hash_undefweak)
++ the next instruction unless a PLT entry will be created. */
++ if (h && h->root.type == bfd_link_hash_undefweak
++ && !(splt != NULL && h->plt.offset != (bfd_vma) -1))
+ {
+ bfd_put_16 (input_bfd, 0xe000, hit_data);
+ bfd_put_16 (input_bfd, 0xbf00, hit_data + 2);
+diff -Naur binutils-2.19.orig/bfd/elf32-avr.c binutils-2.19/bfd/elf32-avr.c
+--- binutils-2.19.orig/bfd/elf32-avr.c 2008-08-08 22:35:12.000000000 -0700
++++ binutils-2.19/bfd/elf32-avr.c 2008-11-17 07:26:01.000000000 -0800
+@@ -1298,6 +1298,7 @@
+
+ case bfd_mach_avr25:
+ val = E_AVR_MACH_AVR25;
++ break;
+
+ case bfd_mach_avr3:
+ val = E_AVR_MACH_AVR3;
+@@ -1305,9 +1306,11 @@
+
+ case bfd_mach_avr31:
+ val = E_AVR_MACH_AVR31;
++ break;
+
+ case bfd_mach_avr35:
+ val = E_AVR_MACH_AVR35;
++ break;
+
+ case bfd_mach_avr4:
+ val = E_AVR_MACH_AVR4;
+diff -Naur binutils-2.19.orig/bfd/elf32-ppc.c binutils-2.19/bfd/elf32-ppc.c
+--- binutils-2.19.orig/bfd/elf32-ppc.c 2008-10-02 01:07:16.000000000 -0700
++++ binutils-2.19/bfd/elf32-ppc.c 2008-11-20 03:50:22.000000000 -0800
+@@ -4997,6 +4997,9 @@
+ eh = (struct ppc_elf_link_hash_entry *) h;
+ if (eh->elf.got.refcount > 0)
+ {
++ bfd_boolean dyn;
++ unsigned int need;
++
+ /* Make sure this symbol is output as a dynamic symbol. */
+ if (eh->elf.dynindx == -1
+ && !eh->elf.forced_local
+@@ -5006,30 +5009,32 @@
+ return FALSE;
+ }
+
+- if (eh->tls_mask == (TLS_TLS | TLS_LD)
+- && !eh->elf.def_dynamic)
+- {
+- /* If just an LD reloc, we'll just use htab->tlsld_got.offset. */
+- htab->tlsld_got.refcount += 1;
+- eh->elf.got.offset = (bfd_vma) -1;
+- }
+- else
++ need = 0;
++ if ((eh->tls_mask & TLS_TLS) != 0)
+ {
+- bfd_boolean dyn;
+- unsigned int need = 0;
+- if ((eh->tls_mask & TLS_TLS) != 0)
++ if ((eh->tls_mask & TLS_LD) != 0)
+ {
+- if ((eh->tls_mask & TLS_LD) != 0)
+- need += 8;
+- if ((eh->tls_mask & TLS_GD) != 0)
++ if (!eh->elf.def_dynamic)
++ /* We'll just use htab->tlsld_got.offset. This should
++ always be the case. It's a little odd if we have
++ a local dynamic reloc against a non-local symbol. */
++ htab->tlsld_got.refcount += 1;
++ else
+ need += 8;
+- if ((eh->tls_mask & (TLS_TPREL | TLS_TPRELGD)) != 0)
+- need += 4;
+- if ((eh->tls_mask & TLS_DTPREL) != 0)
+- need += 4;
+ }
+- else
++ if ((eh->tls_mask & TLS_GD) != 0)
++ need += 8;
++ if ((eh->tls_mask & (TLS_TPREL | TLS_TPRELGD)) != 0)
++ need += 4;
++ if ((eh->tls_mask & TLS_DTPREL) != 0)
+ need += 4;
++ }
++ else
++ need += 4;
++ if (need == 0)
++ eh->elf.got.offset = (bfd_vma) -1;
++ else
++ {
+ eh->elf.got.offset = allocate_got (htab, need);
+ dyn = htab->elf.dynamic_sections_created;
+ if ((info->shared
+@@ -5039,7 +5044,8 @@
+ {
+ /* All the entries we allocated need relocs.
+ Except LD only needs one. */
+- if ((eh->tls_mask & TLS_LD) != 0)
++ if ((eh->tls_mask & TLS_LD) != 0
++ && eh->elf.def_dynamic)
+ need -= 4;
+ htab->relgot->size += need * (sizeof (Elf32_External_Rela) / 4);
+ }
+@@ -5275,27 +5281,24 @@
+ for (; local_got < end_local_got; ++local_got, ++lgot_masks)
+ if (*local_got > 0)
+ {
+- if (*lgot_masks == (TLS_TLS | TLS_LD))
++ unsigned int need = 0;
++ if ((*lgot_masks & TLS_TLS) != 0)
+ {
+- /* If just an LD reloc, we'll just use
+- htab->tlsld_got.offset. */
+- htab->tlsld_got.refcount += 1;
+- *local_got = (bfd_vma) -1;
++ if ((*lgot_masks & TLS_GD) != 0)
++ need += 8;
++ if ((*lgot_masks & TLS_LD) != 0)
++ htab->tlsld_got.refcount += 1;
++ if ((*lgot_masks & (TLS_TPREL | TLS_TPRELGD)) != 0)
++ need += 4;
++ if ((*lgot_masks & TLS_DTPREL) != 0)
++ need += 4;
+ }
+ else
++ need += 4;
++ if (need == 0)
++ *local_got = (bfd_vma) -1;
++ else
+ {
+- unsigned int need = 0;
+- if ((*lgot_masks & TLS_TLS) != 0)
+- {
+- if ((*lgot_masks & TLS_GD) != 0)
+- need += 8;
+- if ((*lgot_masks & (TLS_TPREL | TLS_TPRELGD)) != 0)
+- need += 4;
+- if ((*lgot_masks & TLS_DTPREL) != 0)
+- need += 4;
+- }
+- else
+- need += 4;
+ *local_got = allocate_got (htab, need);
+ if (info->shared)
+ htab->relgot->size += (need
+@@ -6560,7 +6563,8 @@
+
+ /* Generate relocs for the dynamic linker. */
+ if ((info->shared || indx != 0)
+- && (h == NULL
++ && (offp == &htab->tlsld_got.offset
++ || h == NULL
+ || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+ || h->root.type != bfd_link_hash_undefweak))
+ {
+@@ -6591,7 +6595,7 @@
+ outrel.r_info = ELF32_R_INFO (indx, R_PPC_RELATIVE);
+ else
+ outrel.r_info = ELF32_R_INFO (indx, R_PPC_GLOB_DAT);
+- if (indx == 0)
++ if (indx == 0 && tls_ty != (TLS_TLS | TLS_LD))
+ {
+ outrel.r_addend += relocation;
+ if (tls_ty & (TLS_GD | TLS_DTPREL | TLS_TPREL))
+diff -Naur binutils-2.19.orig/bfd/elf.c binutils-2.19/bfd/elf.c
+--- binutils-2.19.orig/bfd/elf.c 2008-10-09 05:18:23.000000000 -0700
++++ binutils-2.19/bfd/elf.c 2008-12-23 02:06:46.000000000 -0800
+@@ -4606,7 +4606,61 @@
+ m != NULL;
+ m = m->next, p++)
+ {
+- if (m->count != 0)
++ if (p->p_type == PT_GNU_RELRO)
++ {
++ const Elf_Internal_Phdr *lp;
++
++ BFD_ASSERT (!m->includes_filehdr && !m->includes_phdrs);
++
++ if (link_info != NULL)
++ {
++ /* During linking the range of the RELRO segment is passed
++ in link_info. */
++ for (lp = phdrs; lp < phdrs + count; ++lp)
++ {
++ if (lp->p_type == PT_LOAD
++ && lp->p_vaddr >= link_info->relro_start
++ && lp->p_vaddr < link_info->relro_end
++ && lp->p_vaddr + lp->p_filesz >= link_info->relro_end)
++ break;
++ }
++ }
++ else
++ {
++ /* Otherwise we are copying an executable or shared
++ library, but we need to use the same linker logic. */
++ for (lp = phdrs; lp < phdrs + count; ++lp)
++ {
++ if (lp->p_type == PT_LOAD
++ && lp->p_paddr == p->p_paddr)
++ break;
++ }
++ }
++
++ if (lp < phdrs + count)
++ {
++ p->p_vaddr = lp->p_vaddr;
++ p->p_paddr = lp->p_paddr;
++ p->p_offset = lp->p_offset;
++ if (link_info != NULL)
++ p->p_filesz = link_info->relro_end - lp->p_vaddr;
++ else if (m->p_size_valid)
++ p->p_filesz = m->p_size;
++ else
++ abort ();
++ p->p_memsz = p->p_filesz;
++ p->p_align = 1;
++ p->p_flags = (lp->p_flags & ~PF_W);
++ }
++ else if (link_info != NULL)
++ {
++ memset (p, 0, sizeof *p);
++ p->p_type = PT_NULL;
++ }
++ else
++ abort ();
++ }
++ else if (m->count != 0)
+ {
+ if (p->p_type != PT_LOAD
+ && (p->p_type != PT_NOTE
+@@ -4622,87 +4676,20 @@
+ p->p_filesz = sect->filepos - m->sections[0]->filepos;
+ if (hdr->sh_type != SHT_NOBITS)
+ p->p_filesz += hdr->sh_size;
+-
+- if (p->p_type == PT_GNU_RELRO)
+- {
+- /* When we get here, we are copying executable
+- or shared library. But we need to use the same
+- linker logic. */
+- Elf_Internal_Phdr *lp;
+-
+- for (lp = phdrs; lp < phdrs + count; ++lp)
+- {
+- if (lp->p_type == PT_LOAD
+- && lp->p_paddr == p->p_paddr)
+- break;
+- }
+-
+- if (lp < phdrs + count)
+- {
+- /* We should use p_size if it is valid since it
+- may contain the first few bytes of the next
+- SEC_ALLOC section. */
+- if (m->p_size_valid)
+- p->p_filesz = m->p_size;
+- else
+- abort ();
+- p->p_vaddr = lp->p_vaddr;
+- p->p_offset = lp->p_offset;
+- p->p_memsz = p->p_filesz;
+- p->p_align = 1;
+- }
+- else
+- abort ();
+- }
+- else
+- p->p_offset = m->sections[0]->filepos;
++ p->p_offset = m->sections[0]->filepos;
+ }
+ }
+- else
++ else if (m->includes_filehdr)
+ {
+- if (m->includes_filehdr)
+- {
+- p->p_vaddr = filehdr_vaddr;
+- if (! m->p_paddr_valid)
+- p->p_paddr = filehdr_paddr;
+- }
+- else if (m->includes_phdrs)
+- {
+- p->p_vaddr = phdrs_vaddr;
+- if (! m->p_paddr_valid)
+- p->p_paddr = phdrs_paddr;
+- }
+- else if (p->p_type == PT_GNU_RELRO)
+- {
+- Elf_Internal_Phdr *lp;
+-
+- for (lp = phdrs; lp < phdrs + count; ++lp)
+- {
+- if (lp->p_type == PT_LOAD
+- && lp->p_vaddr <= link_info->relro_end
+- && lp->p_vaddr >= link_info->relro_start
+- && (lp->p_vaddr + lp->p_filesz
+- >= link_info->relro_end))
+- break;
+- }
+-
+- if (lp < phdrs + count
+- && link_info->relro_end > lp->p_vaddr)
+- {
+- p->p_vaddr = lp->p_vaddr;
+- p->p_paddr = lp->p_paddr;
+- p->p_offset = lp->p_offset;
+- p->p_filesz = link_info->relro_end - lp->p_vaddr;
+- p->p_memsz = p->p_filesz;
+- p->p_align = 1;
+- p->p_flags = (lp->p_flags & ~PF_W);
+- }
+- else
+- {
+- memset (p, 0, sizeof *p);
+- p->p_type = PT_NULL;
+- }
+- }
++ p->p_vaddr = filehdr_vaddr;
++ if (! m->p_paddr_valid)
++ p->p_paddr = filehdr_paddr;
++ }
++ else if (m->includes_phdrs)
++ {
++ p->p_vaddr = phdrs_vaddr;
++ if (! m->p_paddr_valid)
++ p->p_paddr = phdrs_paddr;
+ }
+ }
+
+diff -Naur binutils-2.19.orig/bfd/Makefile.in binutils-2.19/bfd/Makefile.in
+--- binutils-2.19.orig/bfd/Makefile.in 2008-10-16 06:20:48.000000000 -0700
++++ binutils-2.19/bfd/Makefile.in 2009-01-22 16:10:32.431360245 -0800
+@@ -271,7 +271,7 @@
+ ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+
+ # Uncomment the following line when doing a release.
+-RELEASE = y
++RELEASE=y
+ INCDIR = $(srcdir)/../include
+ CSEARCH = -I. -I$(srcdir) -I$(INCDIR)
+ MKDEP = gcc -MM
+diff -Naur binutils-2.19.orig/bfd/version.h binutils-2.19/bfd/version.h
+--- binutils-2.19.orig/bfd/version.h 2008-10-16 05:51:57.000000000 -0700
++++ binutils-2.19/bfd/version.h 2009-01-22 16:00:14.000000000 -0800
+@@ -1,4 +1,4 @@
+-#define BFD_VERSION_DATE 20081016
++#define BFD_VERSION_DATE 20090123
+ #define BFD_VERSION @bfd_version@
+ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
+ #define REPORT_BUGS_TO @report_bugs_to@
+diff -Naur binutils-2.19.orig/binutils/ChangeLog binutils-2.19/binutils/ChangeLog
+--- binutils-2.19.orig/binutils/ChangeLog 2008-10-02 01:07:16.000000000 -0700
++++ binutils-2.19/binutils/ChangeLog 2008-12-23 03:49:58.000000000 -0800
+@@ -1,3 +1,16 @@
++2008-12-23 Nick Clifton <ni...@re...>
++
++ * windmc.c (main): Use correct type for file length.
++ * dlltool.c (gen_exp_file): Likewise.
++
++2008-12-01 Nick Clifton <ni...@re...>
++
++ PR 7044
++ * dlltool.c (run): Use formatting string to avoid compile time
++ warning.
++ (gen_exp_file): Check return value from fread.
++ * windmc.c (main): Check return value from fread.
++
+ 2008-09-25 Richard Henderson <rt...@re...>
+
+ * dwarf.c (size_of_encoded_value, get_encoded_value): Move up.
+diff -Naur binutils-2.19.orig/binutils/dlltool.c binutils-2.19/binutils/dlltool.c
+--- binutils-2.19.orig/binutils/dlltool.c 2008-07-29 21:34:56.000000000 -0700
++++ binutils-2.19/binutils/dlltool.c 2008-12-23 03:49:58.000000000 -0800
+@@ -1206,7 +1206,7 @@
+
+ if (pid == -1)
+ {
+- inform (strerror (errno));
++ inform ("%s", strerror (errno));
+
+ fatal (errmsg_fmt, errmsg_arg);
+ }
+@@ -1980,7 +1980,7 @@
+ int addr;
+ long need[PAGE_SIZE];
+ long page_addr;
+- int numbytes;
++ bfd_size_type numbytes;
+ int num_entries;
+ long *copy;
+ int j;
+@@ -1992,10 +1992,10 @@
+ numbytes = ftell (base_file);
+ fseek (base_file, 0, SEEK_SET);
+ copy = xmalloc (numbytes);
+- fread (copy, 1, numbytes, base_file);
++ if (fread (copy, 1, numbytes, base_file) < numbytes)
++ fatal (_("failed to read the number of entries from base file"));
+ num_entries = numbytes / sizeof (long);
+
+-
+ fprintf (f, "\t.section\t.reloc\n");
+ if (num_entries)
+ {
+diff -Naur binutils-2.19.orig/binutils/windmc.c binutils-2.19/binutils/windmc.c
+--- binutils-2.19.orig/binutils/windmc.c 2008-07-29 21:34:56.000000000 -0700
++++ binutils-2.19/binutils/windmc.c 2008-12-23 03:49:58.000000000 -0800
+@@ -1144,7 +1144,7 @@
+ unichar *u;
+ rc_uint_type ul;
+ char *buff;
+- long flen;
++ bfd_size_type flen;
+ FILE *fp = fopen (input_filename, "rb");
+
+ if (!fp)
+@@ -1155,7 +1155,8 @@
+ fseek (fp, 0, SEEK_SET);
+ buff = malloc (flen + 3);
+ memset (buff, 0, flen + 3);
+- fread (buff, 1, flen, fp);
++ if (fread (buff, 1, flen, fp) < flen)
++ fatal (_("unable to read contents of %s"), input_filename);
+ fclose (fp);
+ if (mcset_text_in_is_unicode != 1)
+ {
+diff -Naur binutils-2.19.orig/configure.ac binutils-2.19/configure.ac
+--- binutils-2.19.orig/configure.ac 2008-10-16 06:45:42.000000000 -0700
++++ binutils-2.19/configure.ac 2008-09-03 19:18:16.000000000 -0700
+@@ -166,7 +166,7 @@
+ # binutils, gas and ld appear in that order because it makes sense to run
+ # "make check" in that particular order.
+ # If --enable-gold is used, "gold" will replace "ld".
+-host_tools="byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
++host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
+
+ # libgcj represents the runtime libraries only used by gcj.
+ libgcj="target-libffi \
+diff -Naur binutils-2.19.orig/gas/ChangeLog binutils-2.19/gas/ChangeLog
+--- binutils-2.19.orig/gas/ChangeLog 2008-10-16 05:52:03.000000000 -0700
++++ binutils-2.19/gas/ChangeLog 2009-01-14 01:00:24.000000000 -0800
+@@ -1,3 +1,29 @@
++2009-01-14 Jakub Jelinek <ja...@re...>
++
++ * Makefile.am (ehopt.o): Add struc-symbol.h.
++ * Makefile.in: Regenerated.
++ * ehopt.c: Include struc-symbol.h.
++ (check_eh_frame): For very small O_constant DW_CFA_advance_loc4
++ create correct DW_CFA_advance_loc. Handle O_subtract only
++ for code alignment factor 1, otherwise handle O_divide or
++ O_right_shift of O_subtract and O_constant.
++ (eh_frame_estimate_size_before_relax): Always divide by ca.
++ (eh_frame_convert_frag): Likewise.
++
++2009-01-14 John David Anglin <dav...@nr...>
++
++ * dw2gencfi.c (output_cfi_insn): Scale DW_CFA_advance_loc1,
++ DW_CFA_advance_loc2 and DW_CFA_advance_loc4 outputs.
++
++2009-01-08 Adam Nemet <an...@ca...>
++
++ * config/tc-mips.c (NO_ISA_COP): New macro.
++ (COP_INSN): New macro.
++ (is_opcode_valid): Use them.
++ (macro) <ld_st>: Use them. Don't accept coprocessor load store
++ insns based on the ISA if CPU is NO_ISA_COP.
++ <copz>: Likewise for coprocessor operations.
++
+ 2008-10-09 Eric Botcazou <ebo...@ad...>
+
+ * dw2gencfi.c (cfi_finish): Deal with md_fix_up_eh_frame.
+diff -Naur binutils-2.19.orig/gas/config/tc-mips.c binutils-2.19/gas/config/tc-mips.c
+--- binutils-2.19.orig/gas/config/tc-mips.c 2008-08-08 12:24:49.000000000 -0700
++++ binutils-2.19/gas/config/tc-mips.c 2009-01-08 16:16:12.000000000 -0800
+@@ -514,12 +514,11 @@
+ /* Returns true for a (non floating-point) coprocessor instruction. Reading
+ or writing the condition code is only possible on the coprocessors and
+ these insns are not marked with INSN_COP. Thus for these insns use the
+- condition-code flags unless this is the floating-point coprocessor. */
++ condition-code flags. */
+ #define COP_INSN(PINFO) \
+ (PINFO != INSN_MACRO \
+- && (((PINFO) & INSN_COP) \
+- || ((PINFO) & (INSN_READ_COND_CODE | INSN_WRITE_COND_CODE) \
+- && ((PINFO) & (FP_S | FP_D)) == 0)))
++ && ((PINFO) & (FP_S | FP_D)) == 0 \
++ && ((PINFO) & (INSN_COP | INSN_READ_COND_CODE | INSN_WRITE_COND_CODE)))
+
+ /* MIPS PIC level. */
+
+diff -Naur binutils-2.19.orig/gas/dw2gencfi.c binutils-2.19/gas/dw2gencfi.c
+--- binutils-2.19.orig/gas/dw2gencfi.c 2008-10-16 05:52:09.000000000 -0700
++++ binutils-2.19/gas/dw2gencfi.c 2009-01-14 01:00:24.000000000 -0800
+@@ -1,5 +1,5 @@
+ /* dw2gencfi.c - Support for generating Dwarf2 CFI information.
+- Copyright 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
++ Copyright 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Contributed by Michal Ludvig <ml...@su...>
+
+ This file is part of GAS, the GNU Assembler.
+@@ -972,20 +972,20 @@
+
+ if (scaled <= 0x3F)
+ out_one (DW_CFA_advance_loc + scaled);
+- else if (delta <= 0xFF)
++ else if (scaled <= 0xFF)
+ {
+ out_one (DW_CFA_advance_loc1);
+- out_one (delta);
++ out_one (scaled);
+ }
+- else if (delta <= 0xFFFF)
++ else if (scaled <= 0xFFFF)
+ {
+ out_one (DW_CFA_advance_loc2);
+- out_two (delta);
++ out_two (scaled);
+ }
+ else
+ {
+ out_one (DW_CFA_advance_loc4);
+- out_four (delta);
++ out_four (scaled);
+ }
+ }
+ else
+diff -Naur binutils-2.19.orig/gas/ehopt.c binutils-2.19/gas/ehopt.c
+--- binutils-2.19.orig/gas/ehopt.c 2007-11-06 09:15:10.000000000 -0800
++++ binutils-2.19/gas/ehopt.c 2009-01-14 01:00:25.000000000 -0800
+@@ -1,5 +1,6 @@
+ /* ehopt.c--optimize gcc exception frame information.
+- Copyright 1998, 2000, 2001, 2003, 2005, 2007 Free Software Foundation, Inc.
++ Copyright 1998, 2000, 2001, 2003, 2005, 2007, 2008
++ Free Software Foundation, Inc.
+ Written by Ian Lance Taylor <ia...@cy...>.
+
+ This file is part of GAS, the GNU Assembler.
+@@ -21,6 +22,7 @@
+
+ #include "as.h"
+ #include "subsegs.h"
++#include "struc-symbol.h"
+
+ /* We include this ELF file, even though we may not be assembling for
+ ELF, since the exception frame information is always in a format
+@@ -398,13 +400,10 @@
+ subtracted were in the same frag and the expression was
+ reduced to a constant. We can do the optimization entirely
+ in this function. */
+- if (d->cie_info.code_alignment > 0
+- && exp->X_add_number % d->cie_info.code_alignment == 0
+- && exp->X_add_number / d->cie_info.code_alignment < 0x40)
++ if (exp->X_add_number < 0x40)
+ {
+ d->loc4_frag->fr_literal[d->loc4_fix]
+- = DW_CFA_advance_loc
+- | (exp->X_add_number / d->cie_info.code_alignment);
++ = DW_CFA_advance_loc | exp->X_add_number;
+ /* No more bytes needed. */
+ return 1;
+ }
+@@ -419,23 +418,39 @@
+ *pnbytes = 2;
+ }
+ }
+- else if (exp->X_op == O_subtract)
++ else if (exp->X_op == O_subtract && d->cie_info.code_alignment == 1)
+ {
+ /* This is a case we can optimize. The expression was not
+ reduced, so we can not finish the optimization until the end
+ of the assembly. We set up a variant frag which we handle
+ later. */
+- int fr_subtype;
+-
+- if (d->cie_info.code_alignment > 0)
+- fr_subtype = d->cie_info.code_alignment << 3;
+- else
+- fr_subtype = 0;
+-
+- frag_var (rs_cfa, 4, 0, fr_subtype, make_expr_symbol (exp),
++ frag_var (rs_cfa, 4, 0, 1 << 3, make_expr_symbol (exp),
+ d->loc4_fix, (char *) d->loc4_frag);
+ return 1;
+ }
++ else if ((exp->X_op == O_divide
++ || exp->X_op == O_right_shift)
++ && d->cie_info.code_alignment > 1)
++ {
++ if (exp->X_add_symbol->bsym
++ && exp->X_op_symbol->bsym
++ && exp->X_add_symbol->sy_value.X_op == O_subtract
++ && exp->X_op_symbol->sy_value.X_op == O_constant
++ && ((exp->X_op == O_divide
++ ? exp->X_op_symbol->sy_value.X_add_number
++ : (offsetT) 1 << exp->X_op_symbol->sy_value.X_add_number)
++ == (offsetT) d->cie_info.code_alignment))
++ {
++ /* This is a case we can optimize as well. The expression was
++ not reduced, so we can not finish the optimization until the
++ end of the assembly. We set up a variant frag which we
++ handle later. */
++ frag_var (rs_cfa, 4, 0, d->cie_info.code_alignment << 3,
++ make_expr_symbol (&exp->X_add_symbol->sy_value),
++ d->loc4_fix, (char *) d->loc4_frag);
++ return 1;
++ }
++ }
+ break;
+
+ case state_error:
+@@ -459,7 +474,9 @@
+
+ diff = resolve_symbol_value (frag->fr_symbol);
+
+- if (ca > 0 && diff % ca == 0 && diff / ca < 0x40)
++ assert (ca > 0);
++ diff /= ca;
++ if (diff < 0x40)
+ ret = 0;
+ else if (diff < 0x100)
+ ret = 1;
+@@ -496,21 +513,21 @@
+ {
+ offsetT diff;
+ fragS *loc4_frag;
+- int loc4_fix;
++ int loc4_fix, ca;
+
+ loc4_frag = (fragS *) frag->fr_opcode;
+ loc4_fix = (int) frag->fr_offset;
+
+ diff = resolve_symbol_value (frag->fr_symbol);
+
++ ca = frag->fr_subtype >> 3;
++ assert (ca > 0);
++ diff /= ca;
+ switch (frag->fr_subtype & 7)
+ {
+ case 0:
+- {
+- int ca = frag->fr_subtype >> 3;
+- assert (ca > 0 && diff % ca == 0 && diff / ca < 0x40);
+- loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | (diff / ca);
+- }
++ assert (diff < 0x40);
++ loc4_frag->fr_literal[loc4_fix] = DW_CFA_advance_loc | diff;
+ break;
+
+ case 1:
+diff -Naur binutils-2.19.orig/gas/Makefile.am binutils-2.19/gas/Makefile.am
+--- binutils-2.19.orig/gas/Makefile.am 2008-10-02 01:07:17.000000000 -0700
++++ binutils-2.19/gas/Makefile.am 2009-01-14 01:00:24.000000000 -0800
+@@ -2159,7 +2159,8 @@
+ dw2gencfi.o: dw2gencfi.c dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
+ subsegs.h $(INCDIR)/obstack.h
+ ecoff.o: ecoff.c ecoff.h
+-ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h
++ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h \
++ struc-symbol.h
+ expr.o: expr.c $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h
+ flonum-copy.o: flonum-copy.c
+ flonum-konst.o: flonum-konst.c
+diff -Naur binutils-2.19.orig/gas/Makefile.in binutils-2.19/gas/Makefile.in
+--- binutils-2.19.orig/gas/Makefile.in 2008-10-02 01:07:17.000000000 -0700
++++ binutils-2.19/gas/Makefile.in 2009-01-14 01:00:24.000000000 -0800
+@@ -3002,7 +3002,8 @@
+ dw2gencfi.o: dw2gencfi.c dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
+ subsegs.h $(INCDIR)/obstack.h
+ ecoff.o: ecoff.c ecoff.h
+-ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h
++ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h \
++ struc-symbol.h
+ expr.o: expr.c $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h
+ flonum-copy.o: flonum-copy.c
+ flonum-konst.o: flonum-konst.c
+diff -Naur binutils-2.19.orig/gas/testsuite/ChangeLog binutils-2.19/gas/testsuite/ChangeLog
+--- binutils-2.19.orig/gas/testsuite/ChangeLog 2008-09-17 02:00:45.000000000 -0700
++++ binutils-2.19/gas/testsuite/ChangeLog 2009-01-08 16:16:12.000000000 -0800
+@@ -1,3 +1,9 @@
++2009-01-08 Adam Nemet <an...@ca...>
++
++ * gas/mips/mips1-fp.s, gas/mips/mips1-fp.d, gas/mips/mips1-fp.l:
++ New tests.
++ * gas/mips/mips.exp: Run them.
++
+ 2008-09-15 Alan Modra <am...@bi...>
+
+ * gas/all/gas.exp: Don't run redef tests on a bunch of targets.
+diff -Naur binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.d binutils-2.19/gas/testsuite/gas/mips/mips1-fp.d
+--- binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.d 1969-12-31 16:00:00.000000000 -0800
++++ binutils-2.19/gas/testsuite/gas/mips/mips1-fp.d 2009-01-08 16:16:12.000000000 -0800
+@@ -0,0 +1,12 @@
++#as: -32
++#objdump: -M reg-names=numeric -dr
++#name: MIPS1 FP instructions
++
++.*: file format .*
++
++Disassembly of section .text:
++
++[0-9a-f]+ <foo>:
++.*: 46041000 add.s \$f0,\$f2,\$f4
++.*: 44420000 cfc1 \$2,\$0
++#pass
+diff -Naur binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.l binutils-2.19/gas/testsuite/gas/mips/mips1-fp.l
+--- binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.l 1969-12-31 16:00:00.000000000 -0800
++++ binutils-2.19/gas/testsuite/gas/mips/mips1-fp.l 2009-01-08 16:16:12.000000000 -0800
+@@ -0,0 +1,3 @@
++.*: Assembler messages:
++.*:6: Error: opcode not supported on this processor: .* \(.*\) `add.s \$f0,\$f2,\$f4'
++.*:7: Error: opcode not supported on this processor: .* \(.*\) `cfc1 \$2,\$0'
+diff -Naur binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.s binutils-2.19/gas/testsuite/gas/mips/mips1-fp.s
+--- binutils-2.19.orig/gas/testsuite/gas/mips/mips1-fp.s 1969-12-31 16:00:00.000000000 -0800
++++ binutils-2.19/gas/testsuite/gas/mips/mips1-fp.s 2009-01-08 16:16:12.000000000 -0800
+@@ -0,0 +1,7 @@
++# Source file used to test -mips1 fp instructions.
++
++# This is not a complete list of mips1 FP instructions.
++
++foo:
++ add.s $f0,$f2,$f4
++ cfc1 $2,$0
+diff -Naur binutils-2.19.orig/gas/testsuite/gas/mips/mips.exp binutils-2.19/gas/testsuite/gas/mips/mips.exp
+--- binutils-2.19.orig/gas/testsuite/gas/mips/mips.exp 2008-09-06 01:47:00.000000000 -0700
++++ binutils-...
[truncated message content] |