From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24027 invoked by alias); 12 Jun 2018 15:11:30 -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 24016 invoked by uid 89); 12 Jun 2018 15:11:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Jun 2018 15:11:28 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C0E71401EF24; Tue, 12 Jun 2018 15:11:26 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id D0433111CB8E; Tue, 12 Jun 2018 15:11:25 +0000 (UTC) Subject: Re: [PATCH v2 02/10] Add Aarch64 SVE Linux headers To: Simon Marchi References: <20180606151629.36602-1-alan.hayward@arm.com> <20180606151629.36602-3-alan.hayward@arm.com> <9FBBFBF2-9363-49AA-8BC3-20E4E0AFBFED@arm.com> <5862fa9c22cc48d86256686e74d60f20@polymtl.ca> <82743c0795488492486076685b9f8828@polymtl.ca> <8f6d2b87-707a-3e34-325c-ed9338e9c1f6@redhat.com> <104a9ac067b435bd80a0b19fc638d0d0@polymtl.ca> Cc: Alan Hayward , GDB Patches , Simon Marchi , nd From: Pedro Alves Message-ID: <0f4bd1b7-897f-b42a-3067-2397a1b4c58c@redhat.com> Date: Tue, 12 Jun 2018 15:11:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <104a9ac067b435bd80a0b19fc638d0d0@polymtl.ca> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-06/txt/msg00313.txt.bz2 On 06/12/2018 04:06 PM, Simon Marchi wrote: > On 2018-06-12 10:43, Pedro Alves wrote: >> What's "this" ? > > From what I understand, "this" is the suggestion I made in my previous mail, require the user to build against the headers of a recent kernel (that provide the SVE macros), and not provide a stop-gap copy in the GDB tree.  It would break the buildbot, because they have an old kernel that doesn't provide the SVE macros the GDB code uses (e.g. SVE_PT_REGS_OFFSET). OK, that was not what I had suggested the other day (which was to detect SVE support at configure time), so I got confused. > >> How about we add a configure check to check if the system headers support >> the needed SVE bits, and guard the native gdb SVE bits with >> HAVE_AARCH64_SVE or something like that? > > I think that would be a good compromise.  By default, building on a machine with an older kernel would exclude SVE support.  But it would be possible to add it by pointing to the headers of a recent kernel.  So when building on a machine with an older kernel... > > - ... without any special flags, you don't get SVE support. > - ... with just --enable-sve, you get a configure error. > - ... with --enable-sve and CFLAGS/CXXFLAGS pointing to headers of a kernel w/ SVE macros, you get SVE support. > > Does that make sense? Yes. Not sure an --enable-sve switch is necessary (compared to just having headers vs not having headers), but I'd be fine with having one. Thanks, Pedro Alves