psp: add a patch for GCC 4.7.4
[rofl0r-mmix-cross.git] / patches / binutils-2.22-musl.diff
blobe9f6a8c9ec4ee49339b7659e119b9a8cbc732362
1 diff -r e52d160d32b0 bfd/elf32-ppc.c
2 --- a/bfd/elf32-ppc.c Wed Nov 21 20:06:14 2012 -0500
3 +++ b/bfd/elf32-ppc.c Wed Nov 21 20:07:23 2012 -0500
4 @@ -2987,10 +2987,6 @@
5 edir->elf.needs_plt |= eind->elf.needs_plt;
6 edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed;
8 - /* If we were called to copy over info for a weak sym, that's all. */
9 - if (eind->elf.root.type != bfd_link_hash_indirect)
10 - return;
12 if (eind->dyn_relocs != NULL)
14 if (edir->dyn_relocs != NULL)
15 @@ -3022,6 +3018,16 @@
16 eind->dyn_relocs = NULL;
19 + /* If we were called to copy over info for a weak sym, that's all.
20 + You might think dyn_relocs need not be copied over; After all,
21 + both syms will be dynamic or both non-dynamic so we're just
22 + moving reloc accounting around. However, ELIMINATE_COPY_RELOCS
23 + code in ppc_elf_adjust_dynamic_symbol needs to check for
24 + dyn_relocs in read-only sections, and it does so on what is the
25 + DIR sym here. */
26 + if (eind->elf.root.type != bfd_link_hash_indirect)
27 + return;
29 /* Copy over the GOT refcount entries that we may have already seen to
30 the symbol which just became indirect. */
31 edir->elf.got.refcount += eind->elf.got.refcount;
32 diff -r e52d160d32b0 bfd/elf64-ppc.c
33 --- a/bfd/elf64-ppc.c Wed Nov 21 20:06:14 2012 -0500
34 +++ b/bfd/elf64-ppc.c Wed Nov 21 20:07:23 2012 -0500
35 @@ -4435,10 +4435,6 @@
36 edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak;
37 edir->elf.needs_plt |= eind->elf.needs_plt;
39 - /* If we were called to copy over info for a weak sym, that's all. */
40 - if (eind->elf.root.type != bfd_link_hash_indirect)
41 - return;
43 /* Copy over any dynamic relocs we may have on the indirect sym. */
44 if (eind->dyn_relocs != NULL)
46 @@ -4471,6 +4467,16 @@
47 eind->dyn_relocs = NULL;
50 + /* If we were called to copy over info for a weak sym, that's all.
51 + You might think dyn_relocs need not be copied over; After all,
52 + both syms will be dynamic or both non-dynamic so we're just
53 + moving reloc accounting around. However, ELIMINATE_COPY_RELOCS
54 + code in ppc64_elf_adjust_dynamic_symbol needs to check for
55 + dyn_relocs in read-only sections, and it does so on what is the
56 + DIR sym here. */
57 + if (eind->elf.root.type != bfd_link_hash_indirect)
58 + return;
60 /* Copy over got entries that we may have already seen to the
61 symbol which just became indirect. */
62 if (eind->elf.got.glist != NULL)
63 diff -r e52d160d32b0 config.sub
64 --- a/config.sub Wed Nov 21 20:06:14 2012 -0500
65 +++ b/config.sub Wed Nov 21 20:07:23 2012 -0500
66 @@ -125,6 +125,7 @@
67 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
68 case $maybe_os in
69 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
70 + linux-musl* | \
71 linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
72 knetbsd*-gnu* | netbsd*-gnu* | \
73 kopensolaris*-gnu* | \
74 @@ -1335,6 +1336,7 @@
75 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
76 | -mingw32* | -linux-gnu* | -linux-android* \
77 | -linux-newlib* | -linux-uclibc* \
78 + | -linux-musl* \
79 | -uxpv* | -beos* | -mpeix* | -udk* \
80 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
81 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \