From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7910 invoked by alias); 21 May 2019 06:45:54 -0000 Mailing-List: contact libc-help-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: libc-help-owner@sourceware.org Received: (qmail 7782 invoked by uid 89); 21 May 2019 06:45:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-it1-f176.google.com Received: from mail-it1-f176.google.com (HELO mail-it1-f176.google.com) (209.85.166.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 May 2019 06:45:38 +0000 Received: by mail-it1-f176.google.com with SMTP id t184so3168880itf.2 for ; Mon, 20 May 2019 23:45:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:reply-to:from:date:message-id :subject:to:cc; bh=VtrLJb4qzlbPn5exmApIVszp3eIb6kQ66Iv+gO3MqUo=; b=qozfyauIo7khvWoSygMwgYIP8qEAgkHI1AVhkK/DgaKYHibfOyxXwe973MeKbq3RC0 Df1Hk0JS4lzgkB12SPwi89Pc8ZA3iAEx5diEcYgdzVTnrkotKuc5ZNZfHI9OKmzNIkye d3N46k413VoMrMh5Mo+s+2zv5hjBiYoQWR66sUDe/nCiU/KJkGuNf2wum4BawZaZ7v8w Xd/IbKLr5Di3uGL1A/WuLo72qG+Qeh9OaFSrGAYGjRQBQqrnstcy/qU58TLDRBJ3f1nK upqJldmMJNKeZNrdkeGfNVQ/Io+i6Hr4ZUNmUimrlZ/0EgtVLjo22YQDqTditYl8qvOi 7GjQ== MIME-Version: 1.0 References: <87zhngfip7.fsf@oldenburg2.str.redhat.com> <87mujgfhde.fsf@oldenburg2.str.redhat.com> In-Reply-To: <87mujgfhde.fsf@oldenburg2.str.redhat.com> Reply-To: noloader@gmail.com From: Jeffrey Walton Date: Tue, 21 May 2019 06:45:00 -0000 Message-ID: Subject: Re: getauxv and ARMv7 platform detection To: Florian Weimer Cc: libc-help@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00037.txt.bz2 On Tue, May 21, 2019 at 2:31 AM Florian Weimer wrote: > > * Jeffrey Walton: > > > On Tue, May 21, 2019 at 2:03 AM Florian Weimer wrote: > >> > >> * Jeffrey Walton: > >> > >> > My question is, how do we use getauxval to detect ARMv7 platforms? > >> > >> What is the actual problem you are trying to solve? > > > > I'm trying to detect if the platform is ARMv7 at runtime. > > Yes, but why? Just to print a diagnostic? We switch to ARMv7 and NEON implementations at runtime if the CPU supports it. We can usually achieve 2x or 3x speedups over ARMv{4|5|6}. We've got SIGILL probes in place but they are an expensive fallback. We prefer a faster and cleaner solution on Linux like getauxv(). We don't control how the library is built. Users and distros do their own things. About the only thing we can count on is, -march=native is useless (and sometimes segfaults the compiler), -march=XXX is missing and -mfpu=YYY is missing. Jeff