All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: Ryan Eatmon <reatmon@ti.com>
Cc: joerg.vehlow@emlix.com, openembedded-core@lists.openembedded.org,
	richard.purdie@linuxfoundation.org
Subject: Re: [OE-core] [PATCH] libgcc: fix build for baremetal
Date: Wed, 7 Oct 2026 21:17:08 -0400	[thread overview]
Message-ID: <20261008011708.GQ4190@denix.org> (raw)
In-Reply-To: <5982d605-36e8-4a04-810f-d4fdebf75cdd@ti.com>

On Wed, Oct 07, 2026 at 03:33:56PM -0500, Ryan Eatmon wrote:
> 
> 
> On 10/7/2026 12:57 AM, Joerg Vehlow via lists.openembedded.org wrote:
> >By removing the erroneous EXTRA_OECONF override in 020d5f0, gcc-cross is now configured with correct sysroot flags, which removes the hosts include directory from the internal paths.
> >This in turn leads to libgcc not finding libc headers (as it should) and breaks libgcc build.
> >In order to fix this, libgcc must be built almost like libgcc-initial.
> >
> >Signed-off-by: Joerg Vehlow <joerg.vehlow@emlix.com>
> >---
> >  meta/recipes-devtools/gcc/libgcc.inc | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> >
> >diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc
> >index e92dadf021..93e217f567 100644
> >--- a/meta/recipes-devtools/gcc/libgcc.inc
> >+++ b/meta/recipes-devtools/gcc/libgcc.inc
> >@@ -37,6 +37,16 @@ LICENSE:${PN}-dev = "GPL-3.0-or-later WITH GCC-exception-3.1"
> >  LICENSE:${PN}-dbg = "GPL-3.0-or-later WITH GCC-exception-3.1"
> >  LICENSE:${PN}-src = "GPL-3.0-or-later WITH GCC-exception-3.1"
> >+# On baremetal there is no libc:
> >+# configure need limits.h for its sanity check
> >+# libc dependencies have to be patched out just like in libgcc-initial
> >+do_configure:prepend:libc-baremetal () {
> >+	install -d ${STAGING_INCDIR}
> >+	touch ${STAGING_INCDIR}/limits.h
> >+	sed -i -e 's#INHIBIT_LIBC_CFLAGS =.*#INHIBIT_LIBC_CFLAGS = -Dinhibit_libc#' ${B}/gcc/libgcc.mvars
> >+	sed -i -e 's#inhibit_libc = false#inhibit_libc = true#' ${B}/gcc/Makefile
> >+}
> >+
> >  FILES:${PN}-dev = "\
> >      ${base_libdir}/libgcc*.so \
> >      ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
> 
> 
> This does fix our build issue.  So it should be safe to pick up this
> patch and not revert the original change.

Yes, I can confirm this change fixes all my other test builds for this issue.

-- 
Denys


      reply	other threads:[~2026-10-08  1:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07  5:57 [PATCH] libgcc: fix build for baremetal Joerg Vehlow
2026-10-07 20:33 ` [OE-core] " Ryan Eatmon
2026-10-08  1:17   ` Denys Dmytriyenko [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=20261008011708.GQ4190@denix.org \
    --to=denis@denix.org \
    --cc=joerg.vehlow@emlix.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=reatmon@ti.com \
    --cc=richard.purdie@linuxfoundation.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.