All of lore.kernel.org
 help / color / mirror / Atom feed
From: richard.purdie@linuxfoundation.org
To: William Mills <wmills@ti.com>,
	"Westermann, Oliver" <Oliver.Westermann@cognex.com>,
	"yocto@yoctoproject.org" <yocto@yoctoproject.org>,
	"Dmytriyenko, Denys" <denys@ti.com>
Subject: Re: [EXTERNAL] Re: Issues adding bare meta toolchain to yocto build
Date: Thu, 24 Oct 2019 16:50:05 +0100	[thread overview]
Message-ID: <c98f6ef3ff3b44785c926c1b6796160b89e59d90.camel@linuxfoundation.org> (raw)
In-Reply-To: <03c8c0c5-c897-acd7-4236-00cd384c9162@ti.com>

On Thu, 2019-10-24 at 10:30 -0400, William Mills wrote:
> On 10/24/19 10:02 AM, richard.purdie@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







      parent reply	other threads:[~2019-10-24 15:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23 11:23 Issues adding bare meta toolchain to yocto build Westermann, Oliver
2019-10-23 22:34 ` Richard Purdie
2019-10-24 10:03   ` [EXTERNAL] " Westermann, Oliver
2019-10-24 11:01     ` richard.purdie
2019-10-24 13:43       ` William Mills
2019-10-24 14:02         ` richard.purdie
2019-10-24 14:30           ` William Mills
2019-10-24 15:37             ` Westermann, Oliver
2019-10-24 15:55               ` richard.purdie
2019-10-25  8:08                 ` Westermann, Oliver
2019-10-24 15:50             ` richard.purdie [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c98f6ef3ff3b44785c926c1b6796160b89e59d90.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=Oliver.Westermann@cognex.com \
    --cc=denys@ti.com \
    --cc=wmills@ti.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.