From: "Jan Beulich" Subject: Re: EXTRA_CFLAGS when compiling Xen Date: Wed, 17 Feb 2016 03:34:37 -0700 Message-ID: <56C45ACD02000078000D3076@prv-mh.provo.novell.com> References: <56C4493D.10703@bitdefender.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <56C4493D.10703@bitdefender.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Corneliu ZUZU Cc: Tamas K Lengyel , Keir Fraser , Ian Campbell , Razvan Cojocaru , Andrew Cooper , Xen-devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org >>> On 17.02.16 at 11:19, wrote: > Could anyone tell me if and how I could pass some GCC extra compilation > flags when building Xen (i.e. make dist-xen)? > I tried: > * when running make: passing EXTRA_CFLAGS > * when running make: passing CFLAGS (this "works" but overrides the rest of the CFLAGS) > * when running ./configure: passing --extra-cflags. > None works. > > Is there an established modality for this or must I manually modify the > makefiles? Generally we'd rather avoid making it too easy to override the compiler settings, in order to avoid then getting complaints about things not building / working. Nevertheless I was of the opinion that someone (was it Olaf) had added some way to do such overrides. But ... > The reason I need this is to pass '-save-temps' to GCC, I want to inspect > some code > and it would be easier to do that on the preprocessed files. ... there's absolutely no need to for a case like this, at least as long as the xen/ subtree is where you want to do this. xen/Rules.mk has rules for what you want (and also for producing the intermediate assembly file), just that you can't achieve this by invoking make from the top level directory - you need to run make directly in xen/ and manually specify the intended target (including leading sub-directories). Jan