]> git.pld-linux.org Git - packages/cross-binutils.git/blob - binutils-2.24-ldforcele.patch
- unconditional noarch subpackages
[packages/cross-binutils.git] / binutils-2.24-ldforcele.patch
1 Common subdirectories: ../binutils-2.24.orig/ld/emulparams and ld/emulparams
2 Common subdirectories: ../binutils-2.24.orig/ld/emultempl and ld/emultempl
3 diff -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  }
25 Only in ld: ldlang.c.orig
26 diff -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  
48 Only in ld: ldmain.c.orig
49 Common subdirectories: ../binutils-2.24.orig/ld/ldscripts and ld/ldscripts
50 Common subdirectories: ../binutils-2.24.orig/ld/.libs and ld/.libs
51 Common subdirectories: ../binutils-2.24.orig/ld/po and ld/po
52 Common subdirectories: ../binutils-2.24.orig/ld/scripttempl and ld/scripttempl
53 Common subdirectories: ../binutils-2.24.orig/ld/testsuite and ld/testsuite
54 Common subdirectories: ../binutils-2.24.orig/ld/tmpdir and ld/tmpdir
This page took 0.03491 seconds and 3 git commands to generate.