From patchwork Wed Feb 17 17:02:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Rzeszutek Wilk X-Patchwork-Id: 8341541 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 41CDD9F399 for ; Wed, 17 Feb 2016 17:04:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5A017203E6 for ; Wed, 17 Feb 2016 17:04:56 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 62816203DB for ; Wed, 17 Feb 2016 17:04:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aW5UW-0007LQ-Hm; Wed, 17 Feb 2016 17:02:16 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aW5UV-0007LC-2U for xen-devel@lists.xen.org; Wed, 17 Feb 2016 17:02:15 +0000 Received: from [85.158.137.68] by server-3.bemta-3.messagelabs.com id 2D/E3-02499-697A4C65; Wed, 17 Feb 2016 17:02:14 +0000 X-Env-Sender: konrad@char.us.oracle.com X-Msg-Ref: server-7.tower-31.messagelabs.com!1455728532!15660923!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 51504 invoked from network); 17 Feb 2016 17:02:13 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-7.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 17 Feb 2016 17:02:13 -0000 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u1HH26wS003265 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Feb 2016 17:02:07 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u1HH25eb023894 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 17 Feb 2016 17:02:05 GMT Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u1HH24FW004185; Wed, 17 Feb 2016 17:02:04 GMT Received: from char.us.oracle.com (/10.137.176.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 17 Feb 2016 09:02:04 -0800 Received: by char.us.oracle.com (Postfix, from userid 1000) id 6CC1A6A3C8D; Wed, 17 Feb 2016 12:02:03 -0500 (EST) Date: Wed, 17 Feb 2016 12:02:03 -0500 From: Konrad Rzeszutek Wilk To: Corneliu ZUZU Message-ID: <20160217170203.GB23247@char.us.oracle.com> References: <56C4493D.10703@bitdefender.com> <56C45ACD02000078000D3076@prv-mh.provo.novell.com> <56C46307.1060303@bitdefender.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <56C46307.1060303@bitdefender.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Source-IP: userv0021.oracle.com [156.151.31.71] Cc: Tamas K Lengyel , Keir Fraser , Ian Campbell , Razvan Cojocaru , Andrew Cooper , Xen-devel , Stefano Stabellini , Jan Beulich Subject: Re: [Xen-devel] EXTRA_CFLAGS when compiling Xen X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Feb 17, 2016 at 02:09:43PM +0200, Corneliu ZUZU wrote: > On 2/17/2016 12:34 PM, Jan Beulich wrote: > > > >>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 > > > > I wouldn't want to needlessly insist, but of course a canonical way to do > this would be preferred. > I do see the %.i targets there in Rules.mk invoking the preprocessor, but I > haven't yet figured how to make those execute. You are probably running in the problem that XEN_ROOT and BASEDIR is not set. I usually do: make -f $(BASEDIR)/Rules.mk -C arch/x86 build_id.o from xen/xen directory. Thought it does not seem to work for me now. It had in the past. Ah, I also added an specific entry to top root Makefile to make it work for me (since it has some many env variables): > > Could you detail what make args would activate execution of the %.i targets? > This is not so important since for now Razvan's suggestion does the trick > (or adding %.i as a dependency for %.o in Rules.mk), > but I thought it would be nice for future reference, so only respond when/if > you have the time/disposition. > > Thanks, > Corneliu. > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel diff --git a/xen/Makefile b/xen/Makefile index 5d98bcb..b5870b1 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -39,8 +39,8 @@ dist: install build install:: include/config/auto.conf -.PHONY: build install uninstall clean distclean cscope TAGS tags MAP gtags -build install uninstall debug clean distclean cscope TAGS tags MAP gtags:: +.PHONY: build install uninstall clean distclean cscope TAGS tags MAP gtags custom +build install uninstall debug clean distclean cscope TAGS tags MAP gtags custom:: ifneq ($(XEN_TARGET_ARCH),x86_32) $(MAKE) -f Rules.mk _$@ else @@ -132,6 +132,8 @@ $(TARGET): delete-unfresh-files $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $(TARGET) +_custom: + $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $(TARGET) # drivers/char/console.o contains static banner/compile info. Blow it away. # Don't refresh these files during e.g., 'sudo make install' .PHONY: delete-unfresh-files