All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds
Date: Tue, 24 Sep 2019 06:44:02 +0200	[thread overview]
Message-ID: <3a21d31e-fe74-9e0f-fe8d-f9c00a184fe3@redhat.com> (raw)
In-Reply-To: <CAFEAcA_QAtK3GmyZoR7swNKwdxkXWZCzdK0G6Sk6OU_tQ9FV2A@mail.gmail.com>

On 23/09/2019 20.50, Peter Maydell wrote:
> On Mon, 23 Sep 2019 at 19:36, Thomas Huth <thuth@redhat.com> wrote:
>>
>> On 23/09/2019 20.27, Peter Maydell wrote:
>>> On Mon, 23 Sep 2019 at 18:54, Thomas Huth <thuth@redhat.com> wrote:
>>>> Ok, then what would you suggest to solve the problem that this file has
>>>> always to be linked into the binary? I can't use "obj-y += ..." in
>>>> hw/intc/Makefile.objs since that would mean that the file also gets
>>>> compiled for non-Arm boards. Would you prefer a bunch of stubs instead
>>>> that get used if CONFIG_ARM_V7M is not set?
>>>
>>> I thought obj-y was for only-this-target and obj-common-y was
>>> for all-boards ?
>>
>> Well, obj-y is for the current target that gets compiled. But if you use
>> it in a Makefile that gets used by all targets, the file gets compiled
>> for each target individually.
>>
>> Just try to change "obj-$(CONFIG_ARM_V7M) += armv7m_nvic.o" into
>> "obj-y += armv7m_nvic.o" in hw/int/Makefile.objs, and you'll see it break:
>>
>>   CC      alpha-softmmu/hw/intc/armv7m_nvic.o
>> In file included from include/hw/intc/armv7m_nvic.h:13,
>>                  from hw/intc/armv7m_nvic.c:19:
>> target/arm/cpu.h:1416: error: "FPCR_DZE" redefined [-Werror]
>>  #define FPCR_DZE    (1 << 9)    /* Divide by Zero exception trap enable */
> 
> Sure, so don't define CONFIG_ARM_V7M in a default-config for
> a non-Arm architecture. Then you get the behaviour you want:
> the file is compiled only for the arm targets.

Sigh, the point of this series is that it should also possible to
compile *without* CONFIG_ARM_V7M in default-configs if you want (and
yes, there are people out there who want to be able to compile a
minimalistic QEMU). It's currently not possible to disable this switch.
But ok, if you're not really interested in providing a possibility to
make qemu-system-arm a little bit more flexible in this regard, never
mind, I'll look into other issues instead.

 Thomas



  reply	other threads:[~2019-09-24  4:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-21 15:04 [PATCH 0/4] Make it possible to compile with CONFIG_ARM_V7M=n Thomas Huth
2019-09-21 15:04 ` [PATCH 1/4] target/arm: Make cpu_register() and set_feature() available for other files Thomas Huth
2019-09-23 14:28   ` Auger Eric
2019-09-21 15:04 ` [PATCH 2/4] target/arm: Move cortex-m related functions to new file v7m.c Thomas Huth
2019-09-23 14:31   ` Auger Eric
2019-09-23 18:09     ` Thomas Huth
2019-09-23 18:45       ` Peter Maydell
2019-09-23 18:51         ` Thomas Huth
2019-09-23 18:54           ` Peter Maydell
2019-09-24 11:02       ` Auger Eric
2019-09-24 11:06         ` Thomas Huth
2019-09-24 11:24           ` Auger Eric
2019-09-23 14:34   ` Peter Maydell
2019-09-24  9:52     ` Philippe Mathieu-Daudé
2019-09-21 15:04 ` [PATCH 3/4] hw/arm: Move armv7m_nvic.c to hw/arm/ and always enable it for arm builds Thomas Huth
2019-09-23 14:52   ` Peter Maydell
2019-09-23 17:54     ` Thomas Huth
2019-09-23 18:27       ` Peter Maydell
2019-09-23 18:36         ` Thomas Huth
2019-09-23 18:50           ` Peter Maydell
2019-09-24  4:44             ` Thomas Huth [this message]
2019-09-24  9:42               ` Peter Maydell
2019-09-24  9:48                 ` Thomas Huth
2019-09-24 10:01                   ` Philippe Mathieu-Daudé
2019-09-21 15:04 ` [PATCH 4/4] default-configs: Do not enforce CONFIG_ARM_V7M anymore Thomas Huth
2019-09-23  8:37 ` [PATCH 0/4] Make it possible to compile with CONFIG_ARM_V7M=n Philippe Mathieu-Daudé
2019-09-23  8:50   ` Thomas Huth
2019-09-23  8:58     ` Philippe Mathieu-Daudé

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=3a21d31e-fe74-9e0f-fe8d-f9c00a184fe3@redhat.com \
    --to=thuth@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.