From patchwork Tue Aug 25 20:34:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: enh X-Patchwork-Id: 8436 Received: (qmail 20287 invoked by alias); 25 Aug 2015 20:34:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 20267 invoked by uid 89); 25 Aug 2015 20:34:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f182.google.com Received: from mail-ob0-f182.google.com (HELO mail-ob0-f182.google.com) (209.85.214.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 25 Aug 2015 20:34:35 +0000 Received: by obbfr1 with SMTP id fr1so152929854obb.1 for ; Tue, 25 Aug 2015 13:34:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=QUrlR0kgI4Bjh8NEStOO46egjnHFIu4GZJW5y8y0cyU=; b=hx4n6uyHLRoblhh1XOX8rCGYqc9hfHz4lzVDSL4dFdx60Nym1Crd8tQbh4ktIna82R USTLIuSuBp4AYKbx9084QDn3K9dr1uAEsQtrmejSKPj7/kMxhyHX/iwbTUSz/6y7kJCo ckTPrgBzJ4s6aFgNY0cpkJbeXTBWV545UD9iApofoLvOcc2LlZHM2pFSlfTcmmp+VVQb 41c2jHwe3vGGRgA23U3A914h3u25tzmbjHnzsAyJS5v4+AUb59IaFe54+CU92k7b2k+j +62a2pZX65RwCbTq7xalpS9CrOnLFK1z8a1svDDJtnhJQBY9u8D91mb3eAq8NhU/9b06 1X6A== X-Gm-Message-State: ALoCoQkgn1k9/0z5nMlp/X9EMiIx4TNQ4w1Y5OyYsA3GR/W1QPe28Zvc1NUvLIr+xpAannI1GTMq MIME-Version: 1.0 X-Received: by 10.182.210.194 with SMTP id mw2mr28624100obc.59.1440534873297; Tue, 25 Aug 2015 13:34:33 -0700 (PDT) Received: by 10.76.173.2 with HTTP; Tue, 25 Aug 2015 13:34:32 -0700 (PDT) In-Reply-To: <20150805085012.GF26572@vapier> References: <86egkyqxwg.fsf@gmail.com> <20150805085012.GF26572@vapier> Date: Tue, 25 Aug 2015 13:34:32 -0700 Message-ID: Subject: Re: [PATCH] Fix compiler warnings building against Linux uapi headers From: enh To: Yao Qi , enh , gdb-patches@sourceware.org, Doug Evans sorry; been too busy to get back to this. new patch addresses earlier comment: 2015-08-25 Elliott Hughes * arm-linux-tdep.h, linux-arm-low.c: Only define HWCAP_VFP and friends if they're not already defined. Fixes build against Linux uapi headers. On 8/5/15, Mike Frysinger wrote: > On 26 Jun 2015 16:42, Yao Qi wrote: >> enh writes: >> > to remove gdbserver's duplicate definitions. But on the assumption >> > that you do need to support old versions of glibc, here's a patch to >> > avoid the redefinition... >> >> We should avoid the redefinition in gdb/arm-linux-tdep.h too. Could you >> please fix it there too? >> >> > 2015-06-22 Elliott Hughes >> > >> > * linux-arm-low.c: Only define HWCAP_VFP and friends if they're >> > not already defined. Fixes build against Linux uapi headers. >> >> OK with the changes. > > Elliott: you going to respin this ? > -mike > diff --git a/gdb/arm-linux-tdep.h b/gdb/arm-linux-tdep.h index dc05edf..d6a1181 100644 --- a/gdb/arm-linux-tdep.h +++ b/gdb/arm-linux-tdep.h @@ -61,9 +61,19 @@ void arm_linux_collect_nwfpe (const struct regset *regset, /* ARM GNU/Linux HWCAP values. These are in defined in in current kernels. */ +#ifndef HWCAP_VFP #define HWCAP_VFP 64 +#endif +#ifndef HWCAP_IWMMXT #define HWCAP_IWMMXT 512 +#endif +#ifndef HWCAP_NEON #define HWCAP_NEON 4096 +#endif +#ifndef HWCAP_VFPv3 #define HWCAP_VFPv3 8192 +#endif +#ifndef HWCAP_VFPv3D16 #define HWCAP_VFPv3D16 16384 +#endif diff --git a/gdb/gdbserver/linux-arm-low.c b/gdb/gdbserver/linux-arm-low.c index 6a27e6e..60645de 100644 --- a/gdb/gdbserver/linux-arm-low.c +++ b/gdb/gdbserver/linux-arm-low.c @@ -117,11 +117,21 @@ struct arch_lwp_info }; /* These are in in current kernels. */ +#ifndef HWCAP_VFP #define HWCAP_VFP 64 +#endif +#ifndef HWCAP_IWMMXT #define HWCAP_IWMMXT 512 +#endif +#ifndef HWCAP_NEON #define HWCAP_NEON 4096 +#endif +#ifndef HWCAP_VFPv3 #define HWCAP_VFPv3 8192 +#endif +#ifndef HWCAP_VFPv3D16 #define HWCAP_VFPv3D16 16384 +#endif #ifdef HAVE_SYS_REG_H #include