I try to cross-compile busybox for an IoT-Gadget. The goal is to replace a tiny Busybox with a complete Busybox binary. If I do an read-elf -a busybox
on the original binary, it says that its little-endian.I can not figure out, how to compile busybox with little endian instead of big endian.I get always the error:
/usr/lib/gcc-cross/mips-linux-gnu/9/../../../../mips-linux-gnu/bin/ld: /usr/lib/gcc-cross/mips-linux-gnu/9/libgcc.a(<replace any object>.o): compiled for a big endian system and target is little endian
The menuconfig file is configured like following:
[*] Build static binary (no shared libs)(mips-linux-gnu-) Cross compile prefix(-EL || -EL --static || -EL -msoft-float) Additional CFLAGS (|| is for "OR"; I tryed all of this)(-EL || EL -msoft-float || -EL --static) Additional LDFLAGS
other options are standard pre-configured.I try to find the solution for 6 Hours now and dont have any clue about it.
I hope someone could figure out whats going on.