devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Alyssa Ross <hi@alyssa.is>
Cc: devicetree-compiler@vger.kernel.org
Subject: Re: [PATCH] libfdt: fix duplicate meson target
Date: Thu, 25 Jan 2024 13:31:58 +1100	[thread overview]
Message-ID: <ZbHIHpMkZIpG_mKn@zatzit> (raw)
In-Reply-To: <20240123130742.185409-1-hi@alyssa.is>

[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]

On Tue, Jan 23, 2024 at 02:07:42PM +0100, Alyssa Ross wrote:
> If default_library is set to static, the libfdt target (which just
> uses library()) is already static, so we should just use that.
> 
> This fixes this Meson error:
> 
> 	libfdt/meson.build:37:11: ERROR: Tried to create target "fdt", but a target of that name already exists.
> 
> Signed-off-by: Alyssa Ross <hi@alyssa.is>

Applied, thanks.

> ---
>  libfdt/meson.build | 22 ++++++++++++----------
>  1 file changed, 12 insertions(+), 10 deletions(-)
> 
> diff --git a/libfdt/meson.build b/libfdt/meson.build
> index 2ea1448..9d07c5f 100644
> --- a/libfdt/meson.build
> +++ b/libfdt/meson.build
> @@ -34,19 +34,21 @@ libfdt = library(
>    install: true,
>  )
>  
> -libfdt_a = static_library(
> -  'fdt', sources,
> -  install: true,
> -)
> +link_with = libfdt
> +
> +if get_option('default_library') != 'static'
> +  libfdt_a = static_library(
> +    'fdt', sources,
> +    install: true,
> +  )
> +
> +  if static_build
> +    link_with = libfdt_a
> +  endif
> +endif
>  
>  libfdt_inc = include_directories('.')
>  
> -if static_build
> -  link_with = libfdt_a
> -else
> -  link_with = libfdt
> -endif
> -
>  libfdt_dep = declare_dependency(
>    include_directories: libfdt_inc,
>    link_with: link_with,
> 
> base-commit: 95c74d71f0904235d44892627322f60a18c9a28c

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2024-01-25  3:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 13:07 [PATCH] libfdt: fix duplicate meson target Alyssa Ross
2024-01-25  2:31 ` David Gibson [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=ZbHIHpMkZIpG_mKn@zatzit \
    --to=david@gibson.dropbear.id.au \
    --cc=devicetree-compiler@vger.kernel.org \
    --cc=hi@alyssa.is \
    /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).