Introduce target-specific LDFLAGS, the same way we have CFLAGS for the target.
It seems to be helping gcc somewhat into telling the correct endianness to ld that sticks with little endian even when the target is big (eg armeb-unknown-linux-uclibcgnueabi).
There's still work to do, especially finish the gcc part that is not in this commit.
/trunk/scripts/functions | 9 7 2 0 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
3 In file included from dynamic-link.h:22,
5 ../sysdeps/powerpc/powerpc64/dl-machine.h: In function '_dl_relocate_object':
6 ../sysdeps/powerpc/powerpc64/dl-machine.h:573: error: invalid storage class for function 'elf_machine_rela_relative'
7 ../sysdeps/powerpc/powerpc64/dl-machine.h:607: error: invalid storage class for function 'elf_machine_rela'
8 ../sysdeps/powerpc/powerpc64/dl-machine.h:889: error: invalid storage class for function 'elf_machine_lazy_rel'
9 make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/powerpc64-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/glibc-2.3-20050307/elf'
11 --- glibc-2.3.6.orig/sysdeps/powerpc/powerpc64/dl-machine.h Thu Mar 17 13:35:23 2005
12 +++ glibc-2.3.6/sysdeps/powerpc/powerpc64/dl-machine.h Thu Mar 17 13:37:12 2005
14 const Elf64_Sym *refsym)
18 -__attribute__ ((always_inline))
24 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
25 + __attribute ((always_inline))
27 elf_machine_rela_relative (Elf64_Addr l_addr, const Elf64_Rela *reloc,
28 void *const reloc_addr_arg)
32 /* Perform the relocation specified by RELOC and SYM (which is fully
33 resolved). MAP is the object containing the reloc. */
35 -__attribute__ ((always_inline))
41 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
42 + __attribute ((always_inline))
44 elf_machine_rela (struct link_map *map,
45 const Elf64_Rela *reloc,
48 MODIFIED_CODE_NOQUEUE (reloc_addr);
52 -__attribute__ ((always_inline))
58 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
59 + __attribute ((always_inline))
61 elf_machine_lazy_rel (struct link_map *map,
62 Elf64_Addr l_addr, const Elf64_Rela *reloc)
65 Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>