From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113739 invoked by alias); 7 Aug 2018 21:25:23 -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 113723 invoked by uid 89); 7 Aug 2018 21:25:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=risk X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 07 Aug 2018 21:25:21 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w77LPEM9022557 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 7 Aug 2018 17:25:19 -0400 Received: by simark.ca (Postfix, from userid 112) id 5729C1EF35; Tue, 7 Aug 2018 17:25:14 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id 4EDCE1E077; Tue, 7 Aug 2018 17:25:13 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 07 Aug 2018 21:25:00 -0000 From: Simon Marchi To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Allow CPPFLAGS to be set on the make command line In-Reply-To: <20180807180934.13645-1-tom@tromey.com> References: <20180807180934.13645-1-tom@tromey.com> Message-ID: <4ba8fcdd331d0d9016b3c4d6a2df5733@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00127.txt.bz2 On 2018-08-07 14:09, Tom Tromey wrote: > While looking into PR build/8751 (which seems to be fixed), I noticed > that it's not possible to change CPPFLAGS for gdb on the "make" > command line. It's reasonable to want to do this sometimes, and I > think this patch should suffice. > > gdb/ChangeLog > 2018-08-07 Tom Tromey > > * Makefile.in (CPPFLAGS): New variable. > (INTERNAL_CPPFLAGS): Use it. > --- > gdb/ChangeLog | 5 +++++ > gdb/Makefile.in | 3 ++- > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/gdb/Makefile.in b/gdb/Makefile.in > index 8c744d70c0..7ff817d790 100644 > --- a/gdb/Makefile.in > +++ b/gdb/Makefile.in > @@ -557,6 +557,7 @@ PROFILE_CFLAGS = @PROFILE_CFLAGS@ > # when running make. I.E.: "make CFLAGS=-Wmissing-prototypes". > CFLAGS = @CFLAGS@ > CXXFLAGS = @CXXFLAGS@ > +CPPFLAGS = @CPPFLAGS@ > > # Set by configure, for e.g. expat. Python installations are such > that > # C headers are included using their basename (for example, we > #include > @@ -564,7 +565,7 @@ CXXFLAGS = @CXXFLAGS@ > # are sometimes a little generic, we think that the risk of collision > # with other header files is high. If that happens, we try to > mitigate > # a bit the consequences by putting the Python includes last in the > list. > -INTERNAL_CPPFLAGS = @CPPFLAGS@ @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@ > +INTERNAL_CPPFLAGS = $(CPPFLAGS) @GUILE_CPPFLAGS@ @PYTHON_CPPFLAGS@ > > # INTERNAL_CFLAGS is the aggregate of all other *CFLAGS macros. > INTERNAL_CFLAGS_BASE = \ +1. Simon