All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-ppc <qemu-ppc@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [PATCH v2 2/3] sam460ex: Remove FDT_PPC dependency from KConfig
Date: Mon, 4 Jan 2021 11:48:45 +0000	[thread overview]
Message-ID: <CAFEAcA8Et5z+ixLosVTf2SU9K7_fJ4BmzLwCtkchvbS15SsCjg@mail.gmail.com> (raw)
In-Reply-To: <41b3af5a-2f2b-41eb-98f1-909e80b26ff@eik.bme.hu>

On Mon, 4 Jan 2021 at 01:51, BALATON Zoltan <balaton@eik.bme.hu> wrote:
> Something is still not right with this, I've noticed that a few other
> boards also have this option selected but they don't need fdt.o that's
> gated by this option in meson.build. That fdt.o is only needed by PSERIES
> and POWERNV but removing FDT_PPC from other boards I get:
>
> ../hw/ppc/sam460ex.c:43:10: fatal error: libfdt.h: No such file or directory
>   #include <libfdt.h>
>
> so apparently this switch also pulls in the necessary CPPFLAGS or libfdt
> dependency. Is there a separate switch for that or we can only get it with
> fdt.o. Not a big deal just not trivial why we need an option that at first
> sight select a source file which we don't need. I think I'll drop this
> patch for now when resending the series.

This happens because hw/ppc/meson.build does:

ppc_ss.add(when: 'CONFIG_FDT_PPC', if_true: [files(
  'fdt.c',
), fdt])

ie if CONFIG_FDT_PPC is set then both
 * add fdt.c to the build
 * add the 'fdt' dependency (which brings in the CFLAGS and
   LDFLAGS necessary for libfdt).

So yes, at the moment for PPC there are only two options:
 * board doesn't use FDT at all
 * board uses FDT and gets hw/ppc/fdt.c linked in even if it
   doesn't use the functions there

Since fdt.c currently has just one not very large function (which
is only even present if TARGET_PPC64) this doesn't seem like a big
deal, but in theory the "need libfdt" and "need fdt.c" parts could
be decoupled.

thanks
-- PMM


  reply	other threads:[~2021-01-04 11:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-31 11:11 [PATCH v2 0/3] Clean up sam460ex irq mapping BALATON Zoltan via
2020-12-25 20:12 ` [PATCH v2 2/3] sam460ex: Remove FDT_PPC dependency from KConfig BALATON Zoltan via
2020-12-31 16:08   ` Philippe Mathieu-Daudé
2021-01-04  1:51   ` BALATON Zoltan via
2021-01-04 11:48     ` Peter Maydell [this message]
2021-01-05 12:50     ` Paolo Bonzini
2020-12-31 11:11 ` [PATCH v2 1/3] ppc4xx: Move common dependency on serial to common option BALATON Zoltan via
2021-01-04  0:31   ` David Gibson
2021-01-04  1:25     ` BALATON Zoltan via
2020-12-31 11:11 ` [PATCH v2 3/3] sam460ex: Clean up irq mapping BALATON Zoltan via
2020-12-31 15:11   ` Peter Maydell
2020-12-31 15:51     ` Peter Maydell
2020-12-31 20:54       ` BALATON Zoltan via
2020-12-31 20:58         ` BALATON Zoltan via
2021-01-01 12:03         ` Peter Maydell
2021-01-03  1:46           ` BALATON Zoltan via

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=CAFEAcA8Et5z+ixLosVTf2SU9K7_fJ4BmzLwCtkchvbS15SsCjg@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=balaton@eik.bme.hu \
    --cc=david@gibson.dropbear.id.au \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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.