This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: how to build and test uClinux toolchains
On Fri, Oct 26, 2018 at 6:51 AM Christophe Lyon
<christophe.lyon@linaro.org> wrote:
> On Sun, 21 Oct 2018 at 04:06, Max Filippov <jcmvbkbc@gmail.com> wrote:
> > Probably the easiest way to get all xtensa toolchain parts correctly it
> > by using existing buildroot configuration. E.g. the following configuration
> > may be used to build uclinux xtensa toolchain for the dc233c core:
> > https://git.buildroot.net/buildroot/tree/configs/qemu_xtensa_lx60_nommu_defconfig
> >
> OK, thanks for your suggestion. I think I managed to build it.
> Now, how/where can I run 'make check' for gcc?
> I do not see the GCC build tree.
The gcc build tree is usually in the build/host-gcc-final in the buildroot
build tree. But that's gcc version selected in the buildroot, you probably
want a different version. Usually after the buildroot toolchain is ready I
build gcc separately using binutils and sysroot produced by the buildroot.
I have a few examples here:
http://wiki.osll.ru/doku.php/etc:users:jcmvbkbc:gcc-xtensa-call0
Please note that you'd need to apply gcc part of the xtensa overlay to
your gcc source for it to correctly generate code for that configuration.
I've run the tests with the current gcc trunk and a lot of execution
tests related to TLS (which is expected) and exceptions (which I
didn't expect) are failing. I'm looking at it.
> > Also bFLT executable format is currently not supported for linux-user
> > xtensa QEMU. The following branch adds that support:
> > https://github.com/OSLL/qemu-xtensa/commits/xtensa-bflt
> >
> > qemu-xtensa built from this QEMU then may be registered as a binfmt
> > handler for bFLT executable images allowing to run gcc tests that want
> > to run target binaries.
> Do you have the magic commands for this?
If you build QEMU from the link above you can use the following command
to register binfmt handler for bFLT binaries assuming that you've installed
it into $QEMU_PREFIX:
sudo scripts/qemu-binfmt-conf.sh --qemu-path=$QEMU_PREFIX/bin --flat 'xtensa'
The --flat switch is not final, it will likely change before it's accepted to
the QEMU mainline.
--
Thanks.
-- Max