All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Rossi <nathan@nathanrossi.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] tclibc-baremetal.inc: Remove BASEDEPENDS on compilerlibs
Date: Tue, 11 Sep 2018 18:30:41 +1000	[thread overview]
Message-ID: <CA+aJhH2LNoVETLiW6W5hN3PBVGYDuthvdQVp-0uovqCAEB6xng@mail.gmail.com> (raw)
In-Reply-To: <CAMKF1sq=i8METMpL_gL0PorPWu-VbJRQTQstC4WB2ZmcMSW_rw@mail.gmail.com>

On Tue, 11 Sep 2018 at 02:14, Khem Raj <raj.khem@gmail.com> wrote:
>
> On Mon, Sep 10, 2018 at 5:45 AM Nathan Rossi <nathan@nathanrossi.com> wrote:
> >
> > Without a libc the gcc-runtime provider of compilerlibs does not
> > compile. As such avoid the default dependence on the
> > virtual/${TARGET_PREFIX}compilerlibs provider.
> >
>
> compilerlibs is compiler runtime, do we not have crtstuff and libgcc
> for baremetal ?

At first I thought that might be an issue, but it turns out that the
libgcc code (and 'crt(begin|end|i|n).o') is built by the libgcc recipe
and populated into the sysroot from that recipe. 'compilerlibs' which
is provided by gcc-runtime only handles other libraries (libgomp,
libatomic, libstdc++v3, etc).

A larger problem that really prevents gcc-runtime from being used at
all is the lack of libc (by choice of course) and because of that the
lack of the crt[01].o objects which the compiler specs for "elfos".
Which means the tclibc-baremetal is only practically useful with
"-nostdlib" or equivalent being provided (otherwise by default it
attempts to use "-lc" and "crt0.o"). Even with -nostdlib none of the
gcc-runtime libraries compile (missing support for various libc
features). Setting "-nostdlib" in tclibc-baremetal via TARGET_CC_ARGS
might be worth adding as well?

Although I might be missing something? Since my use case for baremetal
is just a c compiler and linker without any start objects or library
code.

Thanks,
Nathan

>
> > Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
> > ---
> >  meta/conf/distro/include/tclibc-baremetal.inc | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/meta/conf/distro/include/tclibc-baremetal.inc b/meta/conf/distro/include/tclibc-baremetal.inc
> > index b00917913f..e04f8c8812 100644
> > --- a/meta/conf/distro/include/tclibc-baremetal.inc
> > +++ b/meta/conf/distro/include/tclibc-baremetal.inc
> > @@ -21,6 +21,9 @@ LIBC_DEPENDENCIES = ""
> >  EXTRA_OECONF_pn-gcc-cross-${TARGET_ARCH}_append = " --without-headers"
> >  DEPENDS_remove_pn-meta-toolchain = "virtual/libc virtual/${TARGET_PREFIX}compilerlibs"
> >
> > +# certain compiler libs cannot be used without libc, avoid the dependence on compilerlibs
> > +BASEDEPENDS_remove_class-target = "virtual/${TARGET_PREFIX}compilerlibs"
> > +
> >  TARGET_OS = "elf"
> >  TARGET_OS_arm = "eabi"
> >
> > ---
> > 2.18.0
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core


      reply	other threads:[~2018-09-11  8:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 12:45 [PATCH] tclibc-baremetal.inc: Remove BASEDEPENDS on compilerlibs Nathan Rossi
2018-09-10 16:14 ` Khem Raj
2018-09-11  8:30   ` Nathan Rossi [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=CA+aJhH2LNoVETLiW6W5hN3PBVGYDuthvdQVp-0uovqCAEB6xng@mail.gmail.com \
    --to=nathan@nathanrossi.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /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.