From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 11 Apr 2025 16:22:37 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u3FHB-00BHGi-1h for lore@lore.pengutronix.de; Fri, 11 Apr 2025 16:22:37 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1u3FHB-0005px-AB; Fri, 11 Apr 2025 16:22:37 +0200 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1u3FGw-0005pj-3v; Fri, 11 Apr 2025 16:22:22 +0200 From: Michael Tretter To: ptxdist@pengutronix.de Date: Fri, 11 Apr 2025 16:22:22 +0200 Message-Id: <20250411142222.2721457-1-m.tretter@pengutronix.de> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [ptxdist] [PATCH] glibc: install libmvec only if supported by architecture X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Michael Tretter Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false 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 --- 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