From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 639B03858D20 for ; Thu, 31 Aug 2023 11:24:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 639B03858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1693481089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aic96VTp/+Mt7X27EjcP9xTmWMgUh0Dy/o6scc/+UmM=; b=PoAxJJr0dRxXW9kOBtI6X+4cfDfINQa25v08K6ED+9NjYcuo/14TTgeqRxvxyagsLPwAtp gAsRUayBlshM0BsSp89TR6gBVWjDcFg1rRbFo+EvEQuAAm1DQhL7Dh6UAMI0GNxvaCFhxc rYuX1Aw/X25lMpZsBQvxfHLkLBAzNOI= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-695-s51SN6onMpqm21xSB0lIbw-1; Thu, 31 Aug 2023 07:24:48 -0400 X-MC-Unique: s51SN6onMpqm21xSB0lIbw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AAC623C1350B; Thu, 31 Aug 2023 11:24:47 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3A7B340C2063; Thu, 31 Aug 2023 11:24:47 +0000 (UTC) From: Florian Weimer To: Mathieu Malaterre Cc: libc-help@sourceware.org Subject: Re: glibc-hwcaps for armv7 (neon-vfpv4) References: Date: Thu, 31 Aug 2023 13:24:46 +0200 In-Reply-To: (Mathieu Malaterre's message of "Thu, 31 Aug 2023 12:06:43 +0200") Message-ID: <87zg27bgjl.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * Mathieu Malaterre: > Dear glibc maintainer, > > I fail to understand the ld.so man page (Debian/sid version: man-pages > 6.03) for hwcaps support. Specifically I'd like to install a shared > lib on a Debian/armhf system (baseline is neon-less) which was build > with gcc option: > > -march=3Darmv7-a -mfpu=3Dneon-vfpv4 > > What subfolder should I be using ? You can use =E2=80=9CLD_LIBRARY_PATH=3D. /bin/true=E2=80=9D to see which su= bdirectories are probed. I think either neon/vfp or vfp/neon should be among the subdirectories. This functionality has since been removed from upstream glibc because it sometimes results in hundereds of extra openat system calls. > Conversely how should I read the following: > > % sudo ldconfig -p | grep hwcap > libfoo.so.160 (libc6,x86-64, hwcap: 0x0004000000000000) =3D> > /lib/x86_64-linux-gnu/haswell/libfoo.so.160 > libfoo.so.160 (libc6,x86-64, hwcap: 0x0000000000000004) =3D> > /lib/x86_64-linux-gnu/avx512_1/libfoo.so.160 > > What does "haswell" / "avx512_1" subfolder implies in terms of gcc > compile options ? It's complicated. Nowdays, on x86-64, you can use glibc-hwcaps/x86-64-v3 and glibc-hwcaps/x86-64-v4, which are designed to correspond to -march=3Dx86-64-v3 and -march=3Dx86-64-v4, and x86-64-v4 is a superset of x86-64-v3. Thanks, Florian