* [ptxdist] [PATCH] glibc: install libmvec only if supported by architecture
@ 2025-04-11 14:22 Michael Tretter
2025-05-09 7:25 ` [ptxdist] [APPLIED] " Michael Olbrich
0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread
* Re: [ptxdist] [APPLIED] glibc: install libmvec only if supported by architecture
2025-04-11 14:22 [ptxdist] [PATCH] glibc: install libmvec only if supported by architecture Michael Tretter
@ 2025-05-09 7:25 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2025-05-09 7:25 UTC (permalink / raw)
To: ptxdist; +Cc: Michael Tretter
Thanks, applied as dcf1b0cdf95ab0f9870afc9284cadc159958ea1a.
Michael
[sent from post-receive hook]
On Fri, 09 May 2025 09:25:06 +0200, Michael Tretter <m.tretter@pengutronix.de> wrote:
> 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>
> Message-Id: <20250411142222.2721457-1-m.tretter@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-09 7:27 UTC | newest]
Thread overview: 2+ messages (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
2025-05-09 7:25 ` [ptxdist] [APPLIED] " Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox