qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Wei Huang <wei@redhat.com>, qemu-arm <qemu-arm@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 0/2] Fix compilation dependency issues of CONFIG_ARM_V7M
Date: Fri, 02 Jun 2017 16:49:07 +0100	[thread overview]
Message-ID: <87k24us83w.fsf@linaro.org> (raw)
In-Reply-To: <CAFEAcA8GY3yqZCVHihcFaFS-EkmEy+FRJ9+Kq_xRRdzD7+6DnQ@mail.gmail.com>


Peter Maydell <peter.maydell@linaro.org> writes:

> On 28 April 2017 at 14:58, Wei Huang <wei@redhat.com> wrote:
>> Using #ifdef is indeed a cleaner solution. However I can't use "#ifdef
>> CONFIG_ARM_V7M" & co inside target/arm/cpu.c file because CONFIG_xxx
>> aren't available as preprocessor directives. From what I saw the
>> CONFIG_xxx options can only control compiling source file. One solution
>> is to extract out all v7M code into separate files and use
>> CONFIG_ARM_V7M to direct compilation. A bit messy though. Any other
>> suggestions?
>
> We seem to run into "CONFIG_FOO is defined for make but not
> for the C preprocessor" from time to time, so maybe we should
> fix that?

Hmm is should be auto-generated from config-(host|target).mak but I've
never quite figured out why we need timestamps rather than a straight
dependency check in rules.mk:

  # Generate timestamp files for .h include files

  config-%.h: config-%.h-timestamp
          @cmp $< $@ >/dev/null 2>&1 || cp $< $@

  config-%.h-timestamp: config-%.mak $(SRC_PATH)/scripts/create_config
          $(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@,"GEN","$(TARGET_DIR)config-$*.h")

This seems to be one of those things that goes away on a make clean && rebuild

--
Alex Bennée

  reply	other threads:[~2017-06-02 15:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-27 17:38 [Qemu-devel] [PATCH 0/2] Fix compilation dependency issues of CONFIG_ARM_V7M Wei Huang
2017-04-27 17:38 ` [Qemu-devel] [PATCH 1/2] armv7m: Make armv7m SoC compilation dependent on CONFIG_ARM_V7M Wei Huang
2017-04-27 17:38 ` [Qemu-devel] [PATCH 2/2] armv7m: Use stub functions if CONFIG_ARM_V7M is not defined Wei Huang
2017-04-27 17:51 ` [Qemu-devel] [PATCH 0/2] Fix compilation dependency issues of CONFIG_ARM_V7M no-reply
2017-04-27 21:13 ` Peter Maydell
2017-04-28  0:10   ` Wei Huang
2017-04-28 12:09     ` Peter Maydell
2017-04-28 13:58       ` Wei Huang
2017-06-02 15:00         ` Peter Maydell
2017-06-02 15:49           ` Alex Bennée [this message]
2017-06-02 15:55             ` Peter Maydell
2017-06-02 16:12               ` Alex Bennée

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=87k24us83w.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wei@redhat.com \
    /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).