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 ../sysdeps/powerpc/powerpc32/dl-machine.h: In function '_dl_relocate_object':
4 ../sysdeps/powerpc/powerpc32/dl-machine.h:461: error: invalid storage class for function 'elf_machine_rela_relative'
5 ../sysdeps/powerpc/powerpc32/dl-machine.h:469: error: invalid storage class for function 'elf_machine_lazy_rel'
6 make[2]: *** [/home/dank/queue/jobdir.dual2/crosstool-dev/build/powerpc-750-linux-gnu/gcc-4.0-20050305-glibc-2.3-20050307/build-glibc/elf/dl-reloc.o] Error 1
8 --- glibc-2.3.6.orig/sysdeps/powerpc/powerpc32/dl-machine.h Wed Jul 30 23:33:52 2003
9 +++ glibc-2.3.6/sysdeps/powerpc/powerpc32/dl-machine.h Thu Mar 17 13:19:16 2005
15 -__attribute__ ((always_inline))
21 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
22 + __attribute ((always_inline))
24 elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
25 void *const reloc_addr_arg)
28 *reloc_addr = l_addr + reloc->r_addend;
32 -__attribute__ ((always_inline))
38 +#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
39 + __attribute ((always_inline))
41 elf_machine_lazy_rel (struct link_map *map,
42 Elf32_Addr l_addr, const Elf32_Rela *reloc)
45 Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>