On Thu, 2019-10-24 at 10:30 -0400, William Mills wrote: > On 10/24/19 10:02 AM, richard.pur...@linuxfoundation.org wrote: > > On Thu, 2019-10-24 at 09:43 -0400, William Mills wrote: > > > Then understand that you will need to supply your own gcc > > > compiler > > > helpers and all stdc functions even the ones that port well like > > > strlen and memcpy. (Because everyone should embedded their own > > > unoptimized memcpy in their projects.) > > > > Right, that is by definition baremetal. > > > > Well not really. All the "bare-metal" toolchains I have used come > with a proper libgcc and some conig of newlib that at least gets you > usable strlen and memcpy etc. How much of the rest of it is usable > on your platform is variable. > > This is true of the toolchain Oliver is pointing at and has been true > back to 2007 when I was using codesourcery releases.
The baremetal libgcc would be libgcc-initial in OE terms. As for "baremetal", OE defines that as no library. You can see the options in this listing: http://git.yoctoproject.org/cgit.cgi/poky/tree/meta/conf/distro/include tclibc-baremetal.inc tclibc-glibc.inc tclibc-musl.inc tclibc-newlib.inc So we support newlib builds but that is different to our definition of baremetal. So we conflicting usage of terms. > > You're probably right to have some concerns in that its not a well > > travelled path. There are libc specifics encoded into libgcc but I > > can't quite see where they change how gcc behaves other that the > > default option selection. > > > > Equally there may be something I'm missing. > > > > For full disclosure, gcc is built against linux-libc-headers > > wherease > > with baremetal it would be built without headers. I believe that > > changes the default options gcc uses for compiling but not the way > > the > > compiler itself works. > > "baremetal" would be compiled against some config of newlib headers. > newlib has its own issues and many config choices (you get to pick > your threading model: none, bad, or hacky). For TI-RTOS I think we > rebuild it with a different thread model. Our baremetal is compiled with no headers. Newlib is effectively like choosing a different C library, and yes, gcc would be built against its headers and use it to link against. You would need multiconfig to mix a newlib and musl/glibc toolchain. Sorry for the confusion over the terms. Cheers, Richard -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto