From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5473 invoked by alias); 11 Jun 2012 08:19:09 -0000 Received: (qmail 5458 invoked by uid 22791); 11 Jun 2012 08:19:08 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Jun 2012 08:18:53 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3) with ESMTP id q5B8Iom9006706; Mon, 11 Jun 2012 10:18:50 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.5/8.14.3/Submit) id q5B8ImK9025818; Mon, 11 Jun 2012 10:18:48 +0200 (CEST) Date: Mon, 11 Jun 2012 08:19:00 -0000 Message-Id: <201206110818.q5B8ImK9025818@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: michael.hope@linaro.org CC: gdb-patches@sourceware.org, patches@linaro.org In-reply-to: (message from Michael Hope on Mon, 11 Jun 2012 18:16:51 +1200) Subject: Re: [PATCH] Check for POSIX_MADV_WILLNEED to support building against the LSB References: <4FD57332.6020309@linaro.org> <201206110559.q5B5xMmB012288@glazunov.sibelius.xs4all.nl> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-06/txt/msg00273.txt.bz2 > From: Michael Hope > Date: Mon, 11 Jun 2012 18:16:51 +1200 > > On 11 June 2012 17:59, Mark Kettenis wrote: > >> Date: Mon, 11 Jun 2012 16:25:22 +1200 > >> From: Michael Hope > >> > >> The Linux Standard Base APIs include posix_madvise() but don't define > >> values for the 'advice' argument.  Check to see if POSIX_MADV_WILLNEED > >> is defined before using. > > > > What real-world problem does this fix? > > Being able to build GDB using the LSB tools so that you can make a > binary release that works on any Linux distro from RHEL4 and above. > We use it for the linaro-toolchain-binaries. I fear you're using a broken toolchain, because... > > It makes no sense to have > > posix_madvise() but not define any values for the 'advice' argument. > > I'd say this is a "bug" in LSB.  Either they should drop > > posix_madvise() from the standard, or include at least the 'advice' > > values required by POSIX. > > The LSB has a policy of not dropping functions. I can suggest that > they add the advise values for a later version but that will take some > time and won't cover existing LSB releases. Both posix_madvise(): http://www.linuxbase.org/navigator/browse/int_single.php?cmd=list-by-name&Iname=posix_madvise&Ilibrary=libc and POSIX_MADV_WILLNEED: http://www.linuxbase.org/navigator/browse/headgroup.php?cmd=list-byheadgroup&HGid=56 were added in LSB 3.2.