From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Corneliu ZUZU <czuzu@bitdefender.com>
Cc: Tamas K Lengyel <tamas@tklengyel.com>, Keir Fraser <keir@xen.org>,
Ian Campbell <ian.campbell@citrix.com>,
Razvan Cojocaru <rcojocaru@bitdefender.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: EXTRA_CFLAGS when compiling Xen
Date: Wed, 17 Feb 2016 12:02:03 -0500 [thread overview]
Message-ID: <20160217170203.GB23247@char.us.oracle.com> (raw)
In-Reply-To: <56C46307.1060303@bitdefender.com>
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):
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
>
> 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
prev parent reply other threads:[~2016-02-17 17:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 10:19 EXTRA_CFLAGS when compiling Xen Corneliu ZUZU
2016-02-17 10:23 ` Razvan Cojocaru
2016-02-17 10:34 ` Corneliu ZUZU
2016-02-17 10:34 ` Jan Beulich
2016-02-17 12:09 ` Corneliu ZUZU
2016-02-17 12:43 ` Jan Beulich
2016-02-17 13:11 ` Corneliu ZUZU
2016-02-17 13:54 ` Jan Beulich
2016-02-17 17:09 ` Corneliu ZUZU
2016-02-17 17:02 ` Konrad Rzeszutek Wilk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160217170203.GB23247@char.us.oracle.com \
--to=konrad.wilk@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=czuzu@bitdefender.com \
--cc=ian.campbell@citrix.com \
--cc=keir@xen.org \
--cc=rcojocaru@bitdefender.com \
--cc=stefano.stabellini@citrix.com \
--cc=tamas@tklengyel.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).