From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.2 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by inbox.vuxu.org (OpenSMTPD) with SMTP id f9d0d3ae for ; Sun, 16 Feb 2020 16:15:28 +0000 (UTC) Received: (qmail 17831 invoked by uid 550); 16 Feb 2020 16:15:26 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 17813 invoked from network); 16 Feb 2020 16:15:26 -0000 Date: Sun, 16 Feb 2020 17:15:13 +0100 From: Szabolcs Nagy To: musl@lists.openwall.com Message-ID: <20200216161512.GC14278@port70.net> Mail-Followup-To: musl@lists.openwall.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [musl] getauxval availability * Jeffrey Walton [2020-02-16 08:43:54 -0500]: > We use getauxval on Linux when available to determine cpu caps. For > Glibc the code looks like (http://lwn.net/Articles/519085/): > > #if (((__GLIBC__ * 100) + __GLIBC_MINOR__) >= 216) > # define GETAUXV_AVAILABLE 1 > #endif this is not reliable. > I need a similar test for musl. It looks like the function was added > at https://git.musl-libc.org/cgit/musl/commit/?id=21ada94c4b8c. I > don't see how to map a commit to a release for the web front-end musl > uses. you can use a compile or link time check e.g. #include unsigned long (*p)(unsigned long) = getauxval; int main() {return p(0);} or assume that it's available and let the user manually disable it if not. > The release page indicates it should be available with musl-1.0.1, > which was released April 16 2014 > (https://www.musl-libc.org/releases/). But I am not sure about the > musl release process, and what is included in a release tarball. > > What is the first release of musl that contains 21ada94c4b8c ? $ git describe --tags 21ada94c4b8c v1.0.0-20-g21ada94c i.e. it's 20 commits after the v1.0.0 release tag so anything after that should have it.