From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63945 invoked by alias); 6 Aug 2015 14:03:42 -0000 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 Received: (qmail 61601 invoked by uid 89); 6 Aug 2015 14:03:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 06 Aug 2015 14:03:24 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id BB29E15775D; Thu, 6 Aug 2015 14:03:23 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t76DmYEv004947; Thu, 6 Aug 2015 09:48:35 -0400 Message-ID: <55C365B2.4010906@redhat.com> Date: Thu, 06 Aug 2015 14:03:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Markus Metzger CC: gdb-patches@sourceware.org Subject: Re: [PATCH] configure: check for perf_event.h version References: <1438866405-22616-1-git-send-email-markus.t.metzger@intel.com> In-Reply-To: <1438866405-22616-1-git-send-email-markus.t.metzger@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-08/txt/msg00148.txt.bz2 On 08/06/2015 02:06 PM, Markus Metzger wrote: > Intel(R) Processor Trace support requires a recent linux/perf_event.h header. > > When GDB is built on an older system, Intel(R) Processor Trace will not be > available and there is no indication in the configure and build log as to > what went wrong. > > Check for a compatible linux/perf_event.h at configure-time. > diff --git a/gdb/configure.ac b/gdb/configure.ac > index 905c27b..d867e85 100644 > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -1252,6 +1252,20 @@ if test "${with_intel_pt}" = no; then > AC_MSG_WARN([Intel(R) Processor Trace support disabled; some features may be unavailable.]) > HAVE_LIBIPT=no > else > + AC_PREPROC_IFELSE(AC_LANG_SOURCE([[ > +#include > +#ifdef PERF_ATTR_SIZE_VER5 > +# error > +#endif Can you explain what kind of symbol PERF_ATTR_SIZE_VER5 is? >From the patch, I understand that that is something that is _not_ defined in the perf versions that are supposedly supported? (otherwise, I'd expect an #ifndef instead.) What about these? : nat/linux-btrace.c:722:#if defined (PERF_ATTR_SIZE_VER5) nat/linux-btrace.c:739:#endif /* defined (PERF_ATTR_SIZE_VER5) */ nat/linux-btrace.c:759:#if defined (PERF_ATTR_SIZE_VER5) nat/linux-btrace.c:872:#else /* !defined (PERF_ATTR_SIZE_VER5) */ nat/linux-btrace.c:881:#endif /* !defined (PERF_ATTR_SIZE_VER5) */ Thanks, Pedro Alves