I tried a lot of different configurations with musl and busybox but i can't get it to work. Starting out i though that busybox would build /bin /usr /sbin and musl would give me /lib and magically dynamically link correctly but that got me with "Kernel Panic - Requested init /sbin/init failed (error -2)" (statically linked busybox works fine). Reading a bit more I now think that I should build a wrapper for gcc and compile busybox that way but i couldn't get that working. With one config i got a musl-gcc but how would i tell busybox to use that binary as gcc and the rest of the toolchain with a different prefix? Do i have to symlink the gcc from the toolchain to the musl-gcc binary? That would mean that musl-gcc wouldn't find the real gcc though since i would have to change the name after compiling musl-gcc. Also running the binaries from that musl-gcc i noticed they weren't running through qemu so something is wrong there too :(

my current config script is this:

export CROSS_COMPILE=/OpenWrt-Toolchain-pxa_gcc-5.3.0_musl-1.1.14_eabi.Linux-x86_64/toolchain-arm_xscale_gcc-5.3.0_musl-1.1.14_eabi/bin/arm-openwrt-linux-
export ARCH=arm
export TRIPLE=arm-linux-musleabi
export GCC_BOOTSTRAP_CONFFLAGS="--with-arch=armv5 --with-float=soft"
export GCC_CONFFLAGS="--with-arch=armv5 --with-float=soft"
./configure --prefix=output/musl-install --exec-prefix=output/musl-gcc-wrapper --syslibdir=/lib --target=arm --host=x86_64 --build=x86_64 

and I'm getting this error when i run it:

checking whether compiler's long double definition matches float.h... no
./configure: error: unsupported long double type

What am I doing wrong?

EDIT: I partially answered my question because all i had to do was to build with dynamic linking and then copy the toolchain's lib and usr/lib to the rootfs and it worked. Now my goal is to make a new gcc cross compiler toolchain with musl

closed as too broad by Rui F Ribeiro, msp9011, schily, jimmij, thrig Aug 16 '18 at 14:23

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • why not installing the default busybox distro package? – Rui F Ribeiro Aug 15 '18 at 17:12
  • I want to configure busybox myself and i don't think it would help finding a binary for armv5 with the musl problem – C32 Aug 15 '18 at 17:15
  • OpenWRT just comes with busybox. Upgrading for a new version? – Rui F Ribeiro Aug 15 '18 at 17:17
  • there are image available of openwrt for my system but i want to make my own rootfs. i'm just using the openwrt compiler because i know it works – C32 Aug 15 '18 at 17:19
  • ok, be warned it is not usually that simple. It took me literally days and a lot of investigation work to be able to cross-compile and run stuff for NetBSD in Arm – Rui F Ribeiro Aug 15 '18 at 17:24