mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Tretter <m.tretter@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Michael Tretter <m.tretter@pengutronix.de>
Subject: [ptxdist] [PATCH] glibc: install libmvec only if supported by architecture
Date: Fri, 11 Apr 2025 16:22:22 +0200	[thread overview]
Message-ID: <20250411142222.2721457-1-m.tretter@pengutronix.de> (raw)

If libmvec is available depends on the architecture and the glibc
version. Thus, it is not available on all architectures.

This is a problem on a BSP that contains platforms with different
architectures, if some of the architectures have libmvec and others
don't.

Respect PTXCONF_GLIBC_MVEC only on architectures that actually have
libmvec and ignore the setting otherwise.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 rules/glibc.make | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/rules/glibc.make b/rules/glibc.make
index 2dd74a70fe80..74caeb31664b 100644
--- a/rules/glibc.make
+++ b/rules/glibc.make
@@ -26,6 +26,17 @@ GLIBC_VERSION	:= $(call ptx/config-version, PTXCONF_GLIBC)
 # Prepare
 # ----------------------------------------------------------------------------
 
+GLIBC_INSTALL_MVEC :=
+ifdef PTXCONF_ARCH_X86
+GLIBC_INSTALL_MVEC := $(PTXCONF_GLIBC_MVEC)
+endif
+ifdef PTXCONF_ARCH_ARM64
+# libmvec support has been added to AArch64 with glibc version 2.38
+ifdef PTXCONF_GLIBC_2_38
+GLIBC_INSTALL_MVEC := $(PTXCONF_GLIBC_MVEC)
+endif
+endif
+
 $(STATEDIR)/glibc.prepare:
 	@$(call targetinfo)
 ifdef PTXCONF_GLIBC_Y2038
@@ -88,7 +99,7 @@ ifdef PTXCONF_GLIBC_M
 	@$(call install_copy_toolchain_lib, glibc, libm.so.6)
 endif
 
-ifdef PTXCONF_GLIBC_MVEC
+ifdef GLIBC_INSTALL_MVEC
 	@$(call install_copy_toolchain_lib, glibc, libmvec.so.1)
 endif
 
-- 
2.39.5




                 reply	other threads:[~2025-04-11 14:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250411142222.2721457-1-m.tretter@pengutronix.de \
    --to=m.tretter@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox