qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 0/5] buildsys: Do not use internal fdt library when asked


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH 0/5] buildsys: Do not use internal fdt library when asked for the system one
Date: Wed, 12 May 2021 05:56:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

Hi Paolo,

On 5/11/21 5:57 PM, Philippe Mathieu-Daudé wrote:
> On 5/11/21 5:53 PM, Philippe Mathieu-Daudé wrote:
>> Attempt to fix the issue reported by John when building
>> with an outdated libfdt.
> 
> Unencoded version of this cover:
> 
> For now it changes:
> 
>   hw/ppc/spapr_hcall.c: In function ‘h_update_dt’:
>   hw/ppc/spapr_hcall.c:1966:9: warning: implicit declaration of function
> ‘fdt_check_full’; did you mean ‘fdt_check_header’?
> [-Wimplicit-function-declaration]
>    1966 |     if (fdt_check_full(fdt, cb)) {
>         |         ^~~~~~~~~~~~~~
>         |         fdt_check_header
>   hw/ppc/spapr_hcall.c:1966:9: warning: nested extern declaration of
> ‘fdt_check_full’ [-Wnested-externs]
>   [...]
>   /usr/bin/ld: libqemu-ppc64-softmmu.fa.p/hw_ppc_spapr_hcall.c.o: in
> function `h_update_dt':
>   hw/ppc/spapr_hcall.c:1966: undefined reference to `fdt_check_full'
>   collect2: error: ld returned 1 exit status
> 
> by:
> 
>   qemu/meson.build:1352:4: ERROR: Running configure command failed.
>   The following clauses were found for PSERIES
> 
>     CONFIG_PSERIES=y
>     config PSERIES depends on FDT
> 

This is triggered with:

               fdt support: NO

having:

default-configs/targets/ppc64-softmmu.mak:6:TARGET_NEED_FDT=y

So this code doesn't seem to work:

if not fdt.found() and fdt_required.length() > 0
  error('fdt not available but required by targets ' + ',
'.join(fdt_required))
endif

BTW I disagree FDT is target-dependent, it is machine-dependent IMO.

> which is not better, but one step at a time...
>
> John said: https://gitlab.com/qemu-project/qemu/-/issues/255#note_572421108
> 
>   Distributions usually don't used embedded copies of libraries,
>   so the configure script should require the correct minimum version.
> 
> Personally I'd rather allow users to build the most of QEMU with what is
> available, that is all possible machines except pSeries, making pSeries
> machine selected by default and deselected if not possible, with this
> change:
> 
> -- >8 --
> diff --git a/default-configs/devices/ppc64-softmmu.mak
> b/default-configs/devices/ppc64-softmmu.mak
> index cca52665d90..62339661fca 100644
> --- a/default-configs/devices/ppc64-softmmu.mak
> +++ b/default-configs/devices/ppc64-softmmu.mak
> @@ -5,6 +5,3 @@ include ppc-softmmu.mak
> 
>  # For PowerNV
>  CONFIG_POWERNV=y
> -
> -# For pSeries
> -CONFIG_PSERIES=y
> diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig
> index 3935b73456f..706debd4fee 100644
> --- a/hw/ppc/Kconfig
> +++ b/hw/ppc/Kconfig
> @@ -1,5 +1,6 @@
>  config PSERIES
>      bool
> +    default y
>      depends on FDT
>      imply PCI_DEVICES
>      imply TEST_DEVICES
> ---
> 
> But I suppose it breaks user expectations.
> 
> Thoughts?
> 
> ;)
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]