summaryrefslogtreecommitdiff
path: root/recipes/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/binutils')
-rw-r--r--recipes/binutils/binutils-2.18/binutils-powerpc-ld-segfault.patch13
-rw-r--r--recipes/binutils/binutils-2.20/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch39
-rw-r--r--recipes/binutils/binutils-2.20/binutils-arm-pr7093.patch19
-rw-r--r--recipes/binutils/binutils-2.20/binutils-powerpc-pr11088.patch275
-rw-r--r--recipes/binutils/binutils-2.20/binutils_unexport_LD_LIBRARY_PATH_for_CC_FOR_BUILD.patch95
-rw-r--r--recipes/binutils/binutils-2.20/uclibc-segfault.patch23
-rw-r--r--recipes/binutils/binutils_2.18.bb7
-rw-r--r--recipes/binutils/binutils_2.20.bb9
8 files changed, 394 insertions, 86 deletions
diff --git a/recipes/binutils/binutils-2.18/binutils-powerpc-ld-segfault.patch b/recipes/binutils/binutils-2.18/binutils-powerpc-ld-segfault.patch
new file mode 100644
index 0000000000..7356509761
--- /dev/null
+++ b/recipes/binutils/binutils-2.18/binutils-powerpc-ld-segfault.patch
@@ -0,0 +1,13 @@
+Index: binutils-2.18/bfd/elf32-ppc.c
+===================================================================
+--- binutils-2.18.orig/bfd/elf32-ppc.c 2007-08-06 21:59:29.000000000 +0200
++++ binutils-2.18/bfd/elf32-ppc.c 2009-12-28 22:36:41.000000000 +0100
+@@ -3968,7 +3968,7 @@
+ {
+ bfd_vma addend = r_type == R_PPC_PLTREL24 ? rel->r_addend : 0;
+ struct plt_entry *ent = find_plt_ent (h, got2, addend);
+- if (ent->plt.refcount > 0)
++ if (ent != NULL && ent->plt.refcount > 0)
+ ent->plt.refcount -= 1;
+ }
+ break;
diff --git a/recipes/binutils/binutils-2.20/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch b/recipes/binutils/binutils-2.20/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
deleted file mode 100644
index 8df5b1fea0..0000000000
--- a/recipes/binutils/binutils-2.20/binutils-2.16.91.0.6-objcopy-rename-errorcode.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-# strip (and objcopy) fail to set the error code if there is no
-# output file name and the rename of the stripped (or copied) file
-# fails, yet the command fails to do anything. This fixes both
-# objcopy and strip.
-#
-# modification by bero: Ported to 2.16.91.0.6
-#
-#Signed-off-by: John Bowler <jbowler@acm.org>
-#Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
----
-# binutils/objcopy.c | 8 +++++---
-# 1 file changed, 5 insertions(+), 3 deletions(-)
-#
-Index: src/binutils/objcopy.c
-===================================================================
---- src.orig/binutils/objcopy.c 2007-08-09 13:26:03.000000000 +0100
-+++ src/binutils/objcopy.c 2007-08-09 16:36:12.000000000 +0100
-@@ -2787,8 +2787,9 @@ strip_main (int argc, char *argv[])
- if (preserve_dates)
- set_times (tmpname, &statbuf);
- if (output_file != tmpname)
-- smart_rename (tmpname, output_file ? output_file : argv[i],
-- preserve_dates);
-+ if (smart_rename (tmpname, output_file ? output_file : argv[i],
-+ preserve_dates))
-+ hold_status = 1;
- status = hold_status;
- }
- else
-@@ -3411,7 +3412,8 @@ copy_main (int argc, char *argv[])
- if (preserve_dates)
- set_times (tmpname, &statbuf);
- if (tmpname != output_filename)
-- smart_rename (tmpname, input_filename, preserve_dates);
-+ if (smart_rename (tmpname, input_filename, preserve_dates))
-+ status = 1;
- }
- else
- unlink_if_ordinary (tmpname);
diff --git a/recipes/binutils/binutils-2.20/binutils-arm-pr7093.patch b/recipes/binutils/binutils-2.20/binutils-arm-pr7093.patch
deleted file mode 100644
index ad4a556e0f..0000000000
--- a/recipes/binutils/binutils-2.20/binutils-arm-pr7093.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: binutils/bfd/elf32-arm.c
-===================================================================
-RCS file: /cvs/src/src/bfd/elf32-arm.c,v
-retrieving revision 1.162
-retrieving revision 1.163
-diff -u -r1.162 -r1.163
---- binutils/bfd/elf32-arm.c 23 Dec 2008 09:01:45 -0000 1.162
-+++ binutils/bfd/elf32-arm.c 23 Dec 2008 11:46:17 -0000 1.163
-@@ -4608,6 +4608,10 @@
- Elf_Internal_Shdr *hdr;
- unsigned int i, localsyms;
-
-+ /* PR 7093: Make sure that we are dealing with an arm elf binary. */
-+ if (! is_arm_elf (abfd))
-+ return;
-+
- if ((abfd->flags & DYNAMIC) != 0)
- return;
-
diff --git a/recipes/binutils/binutils-2.20/binutils-powerpc-pr11088.patch b/recipes/binutils/binutils-2.20/binutils-powerpc-pr11088.patch
new file mode 100644
index 0000000000..d5be1760e0
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/binutils-powerpc-pr11088.patch
@@ -0,0 +1,275 @@
+Fix ld segfault when compiling Qt 4.6.0 on powerpc. See:
+
+http://sourceware.org/bugzilla/show_bug.cgi?id=11088
+
+===================================================================
+RCS file: /cvs/src/src/include/elf/ppc.h,v
+retrieving revision 1.26
+retrieving revision 1.27
+diff -u -r1.26 -r1.27
+--- src/include/elf/ppc.h 2009/09/21 11:51:01 1.26
++++ src/include/elf/ppc.h 2009/12/17 05:45:25 1.27
+@@ -73,10 +73,9 @@
+
+ #ifndef RELOC_MACROS_GEN_FUNC
+ /* Fake relocations for branch stubs, only used internally by ld. */
+- RELOC_NUMBER (R_PPC_RELAX32, 48)
+- RELOC_NUMBER (R_PPC_RELAX32PC, 49)
+- RELOC_NUMBER (R_PPC_RELAX32_PLT, 50)
+- RELOC_NUMBER (R_PPC_RELAX32PC_PLT, 51)
++ RELOC_NUMBER (R_PPC_RELAX, 48)
++ RELOC_NUMBER (R_PPC_RELAX_PLT, 49)
++ RELOC_NUMBER (R_PPC_RELAX_PLTREL24, 50)
+ #endif
+
+ /* Relocs added to support TLS. */
+===================================================================
+RCS file: /cvs/src/src/bfd/elf32-ppc.c,v
+retrieving revision 1.272
+retrieving revision 1.273
+diff -u -r1.272 -r1.273
+--- src/bfd/elf32-ppc.c 2009/12/11 13:42:02 1.272
++++ src/bfd/elf32-ppc.c 2009/12/17 05:45:25 1.273
+@@ -3323,6 +3323,8 @@
+ {
+ struct plt_entry *ent;
+
++ if (addend < 32768)
++ sec = NULL;
+ for (ent = *plist; ent != NULL; ent = ent->next)
+ if (ent->sec == sec && ent->addend == addend)
+ break;
+@@ -3508,8 +3510,7 @@
+ if (info->shared)
+ addend = rel->r_addend;
+ }
+- if (!update_plt_info (abfd, ifunc,
+- addend < 32768 ? NULL : got2, addend))
++ if (!update_plt_info (abfd, ifunc, got2, addend))
+ return FALSE;
+ }
+ }
+@@ -3748,8 +3749,7 @@
+ addend = rel->r_addend;
+ }
+ h->needs_plt = 1;
+- if (!update_plt_info (abfd, &h->plt.plist,
+- addend < 32768 ? NULL : got2, addend))
++ if (!update_plt_info (abfd, &h->plt.plist, got2, addend))
+ return FALSE;
+ }
+ break;
+@@ -3780,10 +3780,9 @@
+ case R_PPC_EMB_MRKREF:
+ case R_PPC_NONE:
+ case R_PPC_max:
+- case R_PPC_RELAX32:
+- case R_PPC_RELAX32PC:
+- case R_PPC_RELAX32_PLT:
+- case R_PPC_RELAX32PC_PLT:
++ case R_PPC_RELAX:
++ case R_PPC_RELAX_PLT:
++ case R_PPC_RELAX_PLTREL24:
+ break;
+
+ /* These should only appear in dynamic objects. */
+@@ -4486,7 +4485,7 @@
+ struct plt_entry *ent;
+
+ ent = find_plt_ent (&h->plt.plist, NULL, 0);
+- if (ent->plt.refcount > 0)
++ if (ent != NULL && ent->plt.refcount > 0)
+ ent->plt.refcount -= 1;
+ }
+ }
+@@ -4534,7 +4533,7 @@
+ if (r_type == R_PPC_PLTREL24 && info->shared)
+ addend = rel->r_addend;
+ ent = find_plt_ent (&h->plt.plist, got2, addend);
+- if (ent->plt.refcount > 0)
++ if (ent != NULL && ent->plt.refcount > 0)
+ ent->plt.refcount -= 1;
+ }
+ break;
+@@ -4582,9 +4581,10 @@
+ && tga->root.type == bfd_link_hash_undefweak)))
+ {
+ struct plt_entry *ent;
+- ent = find_plt_ent (&tga->plt.plist, NULL, 0);
+- if (ent != NULL
+- && ent->plt.refcount > 0)
++ for (ent = tga->plt.plist; ent != NULL; ent = ent->next)
++ if (ent->plt.refcount > 0)
++ break;
++ if (ent != NULL)
+ {
+ tga->root.type = bfd_link_hash_indirect;
+ tga->root.u.i.link = &opt->root;
+@@ -4669,6 +4669,7 @@
+ {
+ Elf_Internal_Sym *locsyms = NULL;
+ Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (ibfd);
++ asection *got2 = bfd_get_section_by_name (ibfd, ".got2");
+
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ if (sec->has_tls_reloc && !bfd_is_abs_section (sec->output_section))
+@@ -4762,6 +4763,13 @@
+ else
+ continue;
+
++ case R_PPC_TLSGD:
++ case R_PPC_TLSLD:
++ expecting_tls_get_addr = 2;
++ tls_set = 0;
++ tls_clear = 0;
++ break;
++
+ default:
+ continue;
+ }
+@@ -4769,7 +4777,8 @@
+ if (pass == 0)
+ {
+ if (!expecting_tls_get_addr
+- || !sec->has_tls_get_addr_call)
++ || (expecting_tls_get_addr == 1
++ && !sec->has_tls_get_addr_call))
+ continue;
+
+ if (rel + 1 < relend
+@@ -4785,6 +4794,23 @@
+ break;
+ }
+
++ if (expecting_tls_get_addr)
++ {
++ struct plt_entry *ent;
++ bfd_vma addend = 0;
++
++ if (info->shared
++ && ELF32_R_TYPE (rel[1].r_info) == R_PPC_PLTREL24)
++ addend = rel[1].r_addend;
++ ent = find_plt_ent (&htab->tls_get_addr->plt.plist,
++ got2, addend);
++ if (ent != NULL && ent->plt.refcount > 0)
++ ent->plt.refcount -= 1;
++
++ if (expecting_tls_get_addr == 2)
++ continue;
++ }
++
+ if (h != NULL)
+ {
+ tls_mask = &ppc_elf_hash_entry (h)->tls_mask;
+@@ -4829,16 +4855,6 @@
+ *got_count -= 1;
+ }
+
+- if (expecting_tls_get_addr)
+- {
+- struct plt_entry *ent;
+-
+- ent = find_plt_ent (&htab->tls_get_addr->plt.plist,
+- NULL, 0);
+- if (ent != NULL && ent->plt.refcount > 0)
+- ent->plt.refcount -= 1;
+- }
+-
+ *tls_mask |= tls_set;
+ *tls_mask &= ~tls_clear;
+ }
+@@ -6239,28 +6255,28 @@
+ {
+ size = 4 * ARRAY_SIZE (shared_stub_entry);
+ insn_offset = 12;
+- stub_rtype = R_PPC_RELAX32PC;
+ }
+ else
+ {
+ size = 4 * ARRAY_SIZE (stub_entry);
+ insn_offset = 0;
+- stub_rtype = R_PPC_RELAX32;
+ }
+-
+- if (R_PPC_RELAX32_PLT - R_PPC_RELAX32
+- != R_PPC_RELAX32PC_PLT - R_PPC_RELAX32PC)
+- abort ();
++ stub_rtype = R_PPC_RELAX;
+ if (tsec == htab->plt
+ || tsec == htab->glink)
+- stub_rtype += R_PPC_RELAX32_PLT - R_PPC_RELAX32;
++ {
++ stub_rtype = R_PPC_RELAX_PLT;
++ if (r_type == R_PPC_PLTREL24)
++ stub_rtype = R_PPC_RELAX_PLTREL24;
++ }
+
+ /* Hijack the old relocation. Since we need two
+ relocations for this use a "composite" reloc. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ stub_rtype);
+ irel->r_offset = trampoff + insn_offset;
+- if (r_type == R_PPC_PLTREL24)
++ if (r_type == R_PPC_PLTREL24
++ && stub_rtype != R_PPC_RELAX_PLTREL24)
+ irel->r_addend = 0;
+
+ /* Record the fixup so we don't do it again this section. */
+@@ -6430,7 +6446,7 @@
+ {
+ /* Convert the internal relax relocs to external form. */
+ for (irel = internal_relocs; irel < irelend; irel++)
+- if (ELF32_R_TYPE (irel->r_info) == R_PPC_RELAX32)
++ if (ELF32_R_TYPE (irel->r_info) == R_PPC_RELAX)
+ {
+ unsigned long r_symndx = ELF32_R_SYM (irel->r_info);
+
+@@ -7669,12 +7685,20 @@
+ }
+ break;
+
+- case R_PPC_RELAX32PC_PLT:
+- case R_PPC_RELAX32_PLT:
++ case R_PPC_RELAX_PLT:
++ case R_PPC_RELAX_PLTREL24:
+ if (h != NULL)
+ {
+- struct plt_entry *ent = find_plt_ent (&h->plt.plist, got2,
+- info->shared ? addend : 0);
++ struct plt_entry *ent;
++ bfd_vma got2_addend = 0;
++
++ if (r_type == R_PPC_RELAX_PLTREL24)
++ {
++ if (info->shared)
++ got2_addend = addend;
++ addend = 0;
++ }
++ ent = find_plt_ent (&h->plt.plist, got2, got2_addend);
+ if (htab->plt_type == PLT_NEW)
+ relocation = (htab->glink->output_section->vma
+ + htab->glink->output_offset
+@@ -7684,18 +7708,14 @@
+ + htab->plt->output_offset
+ + ent->plt.offset);
+ }
+- if (r_type == R_PPC_RELAX32_PLT)
+- goto relax32;
+ /* Fall thru */
+
+- case R_PPC_RELAX32PC:
+- relocation -= (input_section->output_section->vma
+- + input_section->output_offset
+- + rel->r_offset - 4);
+- /* Fall thru */
++ case R_PPC_RELAX:
++ if (info->shared)
++ relocation -= (input_section->output_section->vma
++ + input_section->output_offset
++ + rel->r_offset - 4);
+
+- case R_PPC_RELAX32:
+- relax32:
+ {
+ unsigned long t0;
+ unsigned long t1;
diff --git a/recipes/binutils/binutils-2.20/binutils_unexport_LD_LIBRARY_PATH_for_CC_FOR_BUILD.patch b/recipes/binutils/binutils-2.20/binutils_unexport_LD_LIBRARY_PATH_for_CC_FOR_BUILD.patch
new file mode 100644
index 0000000000..535d714b25
--- /dev/null
+++ b/recipes/binutils/binutils-2.20/binutils_unexport_LD_LIBRARY_PATH_for_CC_FOR_BUILD.patch
@@ -0,0 +1,95 @@
+Description:
+
+This patch is needed in situations where build system is running same version of
+binutils that is intended to be built cross-native ( build != host = target)
+ and has shared libraries enabled. binutils/binutils
+Makefile has some tools which are built to run on build system. Toplevel makefile
+for binutils passes HOST_EXPORTS to sub-makefiles which also include RPATH_ENVVARS
+containing LD_LIBRARY_PATH which is modified so that it also includes host libraries
+like opcodes and libbfd which are just built for the host system.
+
+Now the problem is that same LD_LIBRARY_PATH value gets set in environment even
+for the tools that are being built for build system using CC_FOR_BUILD and the tools
+like as,ld it invokes from build machine get the LD_LIBRARY_PATH set to search
+the newly build host libraries like opcodes and bfd and if host is like a big endian
+system say (mips-linux) the build system linker and assembler do not run because
+ld.so tries to load these shared libraries instead of the ones from /usr/lib for
+the build tools.
+
+This patch fixes the issue by clearing LD_LIBRARY_PATH for BUILD tools
+
+This patch would be needed on other versions of binutils. I just cared about 2.20
+May be upstream is also interested in such a patch.
+
+-Khem
+
+Index: binutils-2.20/binutils/Makefile.am
+===================================================================
+--- binutils-2.20.orig/binutils/Makefile.am 2009-12-30 15:30:35.302438121 -0800
++++ binutils-2.20/binutils/Makefile.am 2009-12-30 15:33:09.154420373 -0800
+@@ -251,24 +251,24 @@ sysroff.h: sysinfo$(EXEEXT_FOR_BUILD) sy
+ ./sysinfo$(EXEEXT_FOR_BUILD) -d <$(srcdir)/sysroff.info >sysroff.h
+
+ sysinfo$(EXEEXT_FOR_BUILD): sysinfo.o syslex.o
+- $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.o syslex.o
++ LD_LIBRARY_PATH= $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.o syslex.o
+
+ syslex.o: syslex.c sysinfo.h config.h
+ if [ -r syslex.c ]; then \
+- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) syslex.c -Wno-error ; \
++ LD_LIBRARY_PATH= $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) syslex.c -Wno-error ; \
+ else \
+- $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/syslex.c -Wno-error ;\
++ LD_LIBRARY_PATH= $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/syslex.c -Wno-error ;\
+ fi
+
+ sysinfo.o: sysinfo.c
+ if [ -r sysinfo.c ]; then \
+- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) sysinfo.c -Wno-error ; \
++ LD_LIBRARY_PATH= $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) sysinfo.c -Wno-error ; \
+ else \
+- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/sysinfo.c -Wno-error ; \
++ LD_LIBRARY_PATH= $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/sysinfo.c -Wno-error ; \
+ fi
+
+ bin2c$(EXEEXT_FOR_BUILD):
+- $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c $(srcdir)/version.c
++ LD_LIBRARY_PATH= $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c $(srcdir)/version.c
+
+ embedspu: embedspu.sh
+ sed "s@^program_transform_name=@program_transform_name=$(program_transform_name)@" < $< > $@
+Index: binutils-2.20/binutils/Makefile.in
+===================================================================
+--- binutils-2.20.orig/binutils/Makefile.in 2009-12-30 15:30:44.582922535 -0800
++++ binutils-2.20/binutils/Makefile.in 2009-12-30 15:33:47.322422313 -0800
+@@ -1193,24 +1193,24 @@ sysroff.h: sysinfo$(EXEEXT_FOR_BUILD) sy
+ ./sysinfo$(EXEEXT_FOR_BUILD) -d <$(srcdir)/sysroff.info >sysroff.h
+
+ sysinfo$(EXEEXT_FOR_BUILD): sysinfo.o syslex.o
+- $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.o syslex.o
++ LD_LIBRARY_PATH= $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ sysinfo.o syslex.o
+
+ syslex.o: syslex.c sysinfo.h config.h
+ if [ -r syslex.c ]; then \
+- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) syslex.c -Wno-error ; \
++ LD_LIBRARY_PATH= $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) syslex.c -Wno-error ; \
+ else \
+- $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/syslex.c -Wno-error ;\
++ LD_LIBRARY_PATH= $(CC_FOR_BUILD) -c -I. -I$(srcdir) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/syslex.c -Wno-error ;\
+ fi
+
+ sysinfo.o: sysinfo.c
+ if [ -r sysinfo.c ]; then \
+- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) sysinfo.c -Wno-error ; \
++ LD_LIBRARY_PATH= $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) sysinfo.c -Wno-error ; \
+ else \
+- $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/sysinfo.c -Wno-error ; \
++ LD_LIBRARY_PATH= $(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/sysinfo.c -Wno-error ; \
+ fi
+
+ bin2c$(EXEEXT_FOR_BUILD):
+- $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c $(srcdir)/version.c
++ LD_LIBRARY_PATH= $(CC_FOR_BUILD) -o $@ $(AM_CPPFLAGS) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(srcdir)/bin2c.c $(srcdir)/version.c
+
+ embedspu: embedspu.sh
+ sed "s@^program_transform_name=@program_transform_name=$(program_transform_name)@" < $< > $@
diff --git a/recipes/binutils/binutils-2.20/uclibc-segfault.patch b/recipes/binutils/binutils-2.20/uclibc-segfault.patch
deleted file mode 100644
index 16a875f8eb..0000000000
--- a/recipes/binutils/binutils-2.20/uclibc-segfault.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-upstream: already committed
-
---- clean/binutils-2.19.51/bfd/elf32-arm.c 2009-05-22 12:58:44.000000000 +0100
-+++ binutils-2.19.51/bfd/elf32-arm.c 2009-06-08 21:29:49.000000000 +0100
-@@ -8960,7 +8964,7 @@ elf32_arm_fix_exidx_coverage (asection *
- struct bfd_elf_section_data *elf_sec = elf_section_data (sec);
- Elf_Internal_Shdr *hdr = &elf_sec->this_hdr;
-
-- if (hdr->sh_type != SHT_ARM_EXIDX)
-+ if (!hdr || hdr->sh_type != SHT_ARM_EXIDX)
- continue;
-
- if (elf_sec->linked_to)
---- clean/binutils-2.19.51/ld/emultempl/armelf.em 2009-05-22 12:58:45.000000000 +0100
-+++ binutils-2.19.51/ld/emultempl/armelf.em 2009-06-08 21:26:34.000000000 +0100
-@@ -309,6 +309,7 @@ gld${EMULATION_NAME}_finish (void)
- asection *out_sec = sec->output_section;
-
- if (out_sec
-+ && elf_section_data (sec)
- && elf_section_type (sec) == SHT_PROGBITS
- && (elf_section_flags (sec) & SHF_EXECINSTR) != 0
- && (sec->flags & SEC_EXCLUDE) == 0
diff --git a/recipes/binutils/binutils_2.18.bb b/recipes/binutils/binutils_2.18.bb
index b1ae402e29..803e987d8f 100644
--- a/recipes/binutils/binutils_2.18.bb
+++ b/recipes/binutils/binutils_2.18.bb
@@ -1,5 +1,5 @@
INC_PR = "r8"
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
require binutils.inc
LICENSE = "GPLv3"
@@ -20,7 +20,10 @@ SRC_URI = "\
"
# powerpc patches
-SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
+SRC_URI += "\
+ file://binutils-2.16.1-e300c2c3.patch;patch=1 \
+ file://binutils-powerpc-ld-segfault.patch;patch=1 \
+ "
# ep93xx crunch patches
SRC_URI_append_ep9312 = " file://binutils-crunch.patch;patch=1"
diff --git a/recipes/binutils/binutils_2.20.bb b/recipes/binutils/binutils_2.20.bb
index 62f40f231a..686358234b 100644
--- a/recipes/binutils/binutils_2.20.bb
+++ b/recipes/binutils/binutils_2.20.bb
@@ -2,7 +2,7 @@ require binutils.inc
LICENSE = "GPLv3"
INC_PR = "r1"
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.4"
SRC_URI = "\
${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \
@@ -12,10 +12,13 @@ SRC_URI = "\
file://binutils-uclibc-300-006_better_file_error.patch;patch=1 \
file://binutils-uclibc-300-012_check_ldrunpath_length.patch;patch=1 \
file://binutils-uclibc-gas-needs-libm.patch;patch=1 \
- file://binutils-arm-pr7093.patch;patch=1 \
file://ld-stub-crash.patch;patch=1;pnum=0 \
file://binutils-arm-non-empty-know.patch;patch=1 \
+ file://binutils_unexport_LD_LIBRARY_PATH_for_CC_FOR_BUILD.patch;patch=1 \
"
# powerpc patches
-SRC_URI += "file://binutils-2.16.1-e300c2c3.patch;patch=1"
+SRC_URI += "\
+ file://binutils-2.16.1-e300c2c3.patch;patch=1 \
+ file://binutils-powerpc-pr11088.patch;patch=1 \
+ "