From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 90076 invoked by alias); 15 Jan 2020 22:12:31 -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 90067 invoked by uid 89); 15 Jan 2020 22:12:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Jan 2020 22:12:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579126348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S1RloLtmKzQvfz+bu5l8LuoIwavLB2QtSzS+/8+9HI0=; b=hoCUP53IfuF+SaYCH8jku5GvFBqER6TWjg/3syZw6cWwohO/P1NlqOMa/3MsSe2GsCd+uC 0hSuHBacFA5GGNzZK8dv4tBikT/uFvgovZ5SkW0yD3QsHOz/94TUTlXDPr3FpxG9bJT7N+ h3J6ik3Z6Ppn4hgbo+wkJ7P0E6HxOHQ= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-83-e6Az-C2lNRGgp424-8f3Lw-1; Wed, 15 Jan 2020 17:12:27 -0500 Received: by mail-wm1-f72.google.com with SMTP id g26so209290wmk.6 for ; Wed, 15 Jan 2020 14:12:27 -0800 (PST) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id m21sm1705586wmi.27.2020.01.15.14.12.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jan 2020 14:12:25 -0800 (PST) Subject: Re: [PATCH v2 0/6] Move gdbsupport to top level To: Tom Tromey , gdb-patches@sourceware.org References: <20200109005807.7314-1-tom@tromey.com> <8a8de6a9-37b8-cad3-c818-be903037fe48@redhat.com> <437c1b86-0aa8-57b9-53e2-f21567e2bb14@redhat.com> <87c733a2-2b25-a954-88a1-9bfb1a7eca12@redhat.com> <4fed38dc-aaa7-b76b-880f-bab0b1b5add2@redhat.com> <09d7b39d-982d-d68b-a3c7-651616778bd5@redhat.com> From: Pedro Alves Message-ID: Date: Thu, 16 Jan 2020 00:48:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <09d7b39d-982d-d68b-a3c7-651616778bd5@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-01/txt/msg00438.txt.bz2 On 1/15/20 9:46 PM, Pedro Alves wrote: > On 1/15/20 9:35 PM, Pedro Alves wrote: >> On 1/15/20 8:23 PM, Pedro Alves wrote: >>> On 1/15/20 2:55 PM, Pedro Alves wrote: >>>> On 1/15/20 2:41 PM, Pedro Alves wrote: >>>>> Don't know what I think of gnulib headers including . >>>>> Maybe we should rename gdb's config.h to gdb-config.h too. >>>> >>>> Hit reply to soon. I meant to add, >>>> >>>> ... and then, add a manually-written config.h in the build >>>> dir that does: >>>> >>>> #include >>>> #include >>>> >>>> We'd do the same to gdbsupport, add a config.h in its >>>> build dir that does: >>>> >>>> #include "gnulib/config.h" >>>> #include >>>> >>>> Those config.h files would go in the build dirs so that >>>> they're not picked by other build directories. >>>> >>>> With that, any "#include " in any header ends up >>>> picking the currently-being-built project's config.h, plus >>>> the dependencies' config.h files. >>>> >>>> Just a half-baked thought. Not sure it's the best idea. >>> >>> I tried it and it seems to work OK. Fixes the build at least. >>> Still not sure it's the best idea. WDYT? >>> >>> The patch is actually quite small, but since I've rename >>> config.h -> gdb-config.h etc., and _then_ added new config.h >>> files, git doesn't notice the renames. >>> >>> I wonder whether there's anything could do to stop gnulib and >>> gdbsupport's configure from defining PACKAGE_NAME etc. in their >>> generated config.h files. >>> >> Here's an improved version, which fixes gdbserver's standalone >> build, simplifies gdbsupport's config.h (there's no need for >> #ifdef GDBSERVER stuff since gdbserver doesn't use gdbsupport >> as a library yet), and adds copyright/intro comments. >> > > I put this in users/palves/config.h if you want to play with it. I've also pushed a patch there to fix the missing -std=gnu++11 issue. Thanks, Pedro Alves