* [ptxdist] [PATCH] glibc: install libmvec only if supported by architecture
@ 2025-04-11 14:22 Michael Tretter
0 siblings, 0 replies; only message in thread
From: Michael Tretter @ 2025-04-11 14:22 UTC (permalink / raw)
To: ptxdist; +Cc: Michael Tretter
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-11 14:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-11 14:22 [ptxdist] [PATCH] glibc: install libmvec only if supported by architecture Michael Tretter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox