For running testcases etc. I would like to compile parts of our buildroot environment for the Host system (/usr/bin/gcc etc.).
I tried specifying an external_toolchain in /usr but this fails. Has anyone managed to do something like this?
The buildroot manual says this is unsupported because they can not import it into a rootfs. But for testcases a rootfs is not necessary.
Yeah, unfortunately, it is not possible to do this. To be useful for Buildroot, a toolchain has to be a "pure" toolchain, i.e containing only the C library binaries and headers. You /usr is cluttered with gazillions of libraries from your host machine, and since Buildroot makes a full copy of the toolchain sysroot (which in your case, would be /usr), it would copy many, many things.
So definitely, it is not something that we support, and we don't intend to support this. You can also decide to build your programs with a x86 or x86_64 cross-compiler, have Buildroot generate a minimal Linux system, and chroot into it directly on your development PC.