From: Hemanth.KumarMD@windriver.com
To: openembedded-core@lists.openembedded.org
Cc: Sundeep.Kokkonda@windriver.com, Randy.MacLeod@windriver.com,
khem.raj@gmail.com
Subject: [PATCH 3/7] glibc: disable automatic libatomic linking
Date: Thu, 7 May 2026 10:32:07 -0700 [thread overview]
Message-ID: <20260507173211.672855-4-Hemanth.KumarMD@windriver.com> (raw)
In-Reply-To: <20260507173211.672855-1-Hemanth.KumarMD@windriver.com>
From: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
GCC 16 introduced -flink-libatomic which automatically injects
-latomic_asneeded into link commands via LINK_LIBATOMIC_SPEC. When glibc
is built with a GCC 16 cross-compiler, the compiler would attempt
to link against libatomic which does not exist yet at this stage.
(libatomic is built later as part of gcc-runtime)
Link: https://github.com/gcc-mirror/gcc/commit/e63cf4b130b86dd7dde1bf499d3d40faca10ea2e
Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
---
meta/recipes-core/glibc/glibc.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
index 30d93bca77..ac96e640e2 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -49,6 +49,9 @@ EXTRA_OEMAKE += "SHELL=/bin/bash"
# bash but it can be configured by setting KSHELL Makefile variable
EXTRA_OEMAKE += "KSHELL=/bin/sh"
+TARGET_CC_ARCH += "-fno-link-libatomic"
+SDK_CC_ARCH += "-fno-link-libatomic"
+
do_configure:prepend() {
sed -e "s#/bin/bash#/bin/sh#" -i ${S}/elf/ldd.bash.in
}
--
2.49.0
next prev parent reply other threads:[~2026-05-07 17:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-07 17:32 [PATCH 0/7] gcc: Upgrade GCC to 16.1 release Hemanth.KumarMD
2026-05-07 17:32 ` [PATCH 1/7] piglit:backport a fix for building with gcc-16 Hemanth.KumarMD
2026-05-07 17:32 ` [PATCH 2/7] rxvt-unicode: backport " Hemanth.KumarMD
2026-05-07 17:32 ` Hemanth.KumarMD [this message]
2026-05-07 17:32 ` [PATCH 4/7] gcc: Upgrade GCC to 16.1 release Hemanth.KumarMD
2026-05-07 17:32 ` [PATCH 5/7] gcc-runtime: disable automatic libatomic linking during build Hemanth.KumarMD
2026-05-07 17:32 ` [PATCH 6/7] gcc-runtime: package new libatomic_asneeded files Hemanth.KumarMD
2026-05-07 17:32 ` [PATCH 7/7] gcc-runtime: avoid passing MULTIBUILDTOP to libatomic Hemanth.KumarMD
2026-05-10 13:09 ` [OE-core] [PATCH 0/7] gcc: Upgrade GCC to 16.1 release Mathieu Dubois-Briand
2026-05-15 3:42 ` Hemanth Kumar M D
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=20260507173211.672855-4-Hemanth.KumarMD@windriver.com \
--to=hemanth.kumarmd@windriver.com \
--cc=Randy.MacLeod@windriver.com \
--cc=Sundeep.Kokkonda@windriver.com \
--cc=khem.raj@gmail.com \
--cc=openembedded-core@lists.openembedded.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.