I needed this patch setting CPU_LDFLAGS to build uClibc for little-endian
MIPS (with a compiler with both little-endian and big-endian multilibs);
otherwise it used ld (in default big-endian mode) to link little-endian
objects.
endif
ifeq ($(TARGET_ARCH),mips)
+ CPU_LDFLAGS-$(ARCH_LITTLE_ENDIAN)+=-EL
+ CPU_LDFLAGS-$(ARCH_BIG_ENDIAN)+=-EB
CPU_CFLAGS-$(CONFIG_MIPS_ISA_1)+=-mips1
CPU_CFLAGS-$(CONFIG_MIPS_ISA_2)+=-mips2 -mtune=mips2
CPU_CFLAGS-$(CONFIG_MIPS_ISA_3)+=-mips3 -mtune=mips3