]> git.pld-linux.org Git - packages/cross-binutils.git/blame - binutils-2.24-ldforcele.patch
fix symlinked packages files (ppc64)
[packages/cross-binutils.git] / binutils-2.24-ldforcele.patch
CommitLineData
59e455fe
ER
1Common subdirectories: ../binutils-2.24.orig/ld/emulparams and ld/emulparams
2Common subdirectories: ../binutils-2.24.orig/ld/emultempl and ld/emultempl
3diff -up ../binutils-2.24.orig/ld/ldlang.c ld/ldlang.c
4--- a/ld/ldlang.c 2014-05-09 10:35:04.589504928 +0100
5+++ b/ld/ldlang.c 2014-05-09 10:35:55.515661478 +0100
6@@ -7096,6 +7096,18 @@
7 && little != NULL)
8 format = little;
9
10+ if (getenv ("LD_FORCE_LE") != NULL)
11+ {
12+ if (strcmp (format, "elf64-powerpc") == 0)
13+ format = "elf64-powerpcle";
14+ else if (strcmp (format, "elf32-powerpc") == 0)
15+ format = "elf32-powerpcle";
16+ else if (strcmp (format, "elf64-big") == 0)
17+ format = "elf64-little";
18+ else if (strcmp (format, "elf32-big") == 0)
19+ format = "elf32-little";
20+ }
21+
22 output_target = format;
23 }
24 }
25Only in ld: ldlang.c.orig
26diff -up ../binutils-2.24.orig/ld/ldmain.c ld/ldmain.c
27--- a/ld/ldmain.c 2014-05-09 10:35:04.593504941 +0100
28+++ b/ld/ldmain.c 2014-05-09 10:35:55.515661478 +0100
29@@ -603,6 +603,18 @@
30 }
31 }
32
33+ if ((strncmp (emulation, "elf64ppc", 8) == 0
34+ || strncmp (emulation, "elf32ppc", 8) == 0)
35+ && getenv ("LD_FORCE_LE") != NULL)
36+ {
37+ size_t len = strlen (emulation);
38+ char *le = xmalloc (len + 2);
39+ memcpy (le, emulation, 5);
40+ le[5] = 'l';
41+ memcpy (le + 6, emulation + 5, len - 4);
42+ emulation = le;
43+ }
44+
45 return emulation;
46 }
47
48Only in ld: ldmain.c.orig
49Common subdirectories: ../binutils-2.24.orig/ld/ldscripts and ld/ldscripts
50Common subdirectories: ../binutils-2.24.orig/ld/.libs and ld/.libs
51Common subdirectories: ../binutils-2.24.orig/ld/po and ld/po
52Common subdirectories: ../binutils-2.24.orig/ld/scripttempl and ld/scripttempl
53Common subdirectories: ../binutils-2.24.orig/ld/testsuite and ld/testsuite
54Common subdirectories: ../binutils-2.24.orig/ld/tmpdir and ld/tmpdir
This page took 0.129402 seconds and 4 git commands to generate.