All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tclibc-baremetal.inc: Remove BASEDEPENDS on compilerlibs
@ 2018-09-10 12:45 Nathan Rossi
  2018-09-10 16:14 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Rossi @ 2018-09-10 12:45 UTC (permalink / raw)
  To: openembedded-core

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.

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tclibc-baremetal.inc: Remove BASEDEPENDS on compilerlibs
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2018-09-10 16:14 UTC (permalink / raw)
  To: Nathan Rossi; +Cc: Patches and discussions about the oe-core layer

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 ?

> 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tclibc-baremetal.inc: Remove BASEDEPENDS on compilerlibs
  2018-09-10 16:14 ` Khem Raj
@ 2018-09-11  8:30   ` Nathan Rossi
  0 siblings, 0 replies; 3+ messages in thread
From: Nathan Rossi @ 2018-09-11  8:30 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-11  8:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.