Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
To: Khem Raj <raj.khem@gmail.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: RE: [OE-core] [PATCH 1/3] libgcc: Fix standalone target builds with usrmerge distro feature
Date: Sun, 24 Jul 2022 11:47:01 +0000	[thread overview]
Message-ID: <f4ea3fac3a7e405ea15f39e33744f39a@axis.com> (raw)
In-Reply-To: <20220723145416.1374755-1-raj.khem@gmail.com>

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Khem Raj
> Sent: den 23 juli 2022 16:54
> To: openembedded-core@lists.openembedded.org
> Cc: Khem Raj <raj.khem@gmail.com>
> Subject: [OE-core] [PATCH 1/3] libgcc: Fix standalone target builds with usrmerge distro feature
> 
> Ignore the rmdir cmd if using usrmerge distro feature since the
> intention is to delete /lib or /lib64 but not libdir under /usr and
> base_libdir = libdir when usrmerge is enabled in distro
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-devtools/gcc/libgcc-common.inc | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-devtools/gcc/libgcc-common.inc b/meta/recipes-devtools/gcc/libgcc-common.inc
> index 148c9f85a7c..9d4fd41f975 100644
> --- a/meta/recipes-devtools/gcc/libgcc-common.inc
> +++ b/meta/recipes-devtools/gcc/libgcc-common.inc
> @@ -44,10 +44,14 @@ do_install () {
>  }
> 
>  do_install:append:libc-baremetal () {
> -	rmdir ${D}${base_libdir}
> +	if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','false','true',d)}; then

Since the goal is to avoid deleting ${libdir} in case it happens to match 
${base_libdir}, I recommend to change the tests to instead be:

	if [ "${base_libdir}" != "${libdir}" ]; then

> +		rmdir ${D}${base_libdir}
> +	fi
>  }
>  do_install:append:libc-newlib () {
> -	rmdir ${D}${base_libdir}
> +	if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','false','true',d)}; then
> +		rmdir ${D}${base_libdir}
> +	fi
>  }
> 
>  # No rpm package is actually created but -dev depends on it, avoid dnf error
> --
> 2.37.1

//Peter


  parent reply	other threads:[~2022-07-24 11:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-23 14:54 [PATCH 1/3] libgcc: Fix standalone target builds with usrmerge distro feature Khem Raj
2022-07-23 14:54 ` [PATCH 2/3] gcc-runtime: Use static dummy libstdc++ Khem Raj
2022-07-23 14:54 ` [PATCH 3/3] gcc-runtime: Use --with-target-subdir for baremetal targets Khem Raj
2022-07-25 20:17   ` [OE-core] " Ross Burton
2022-07-24 11:47 ` Peter Kjellerstedt [this message]
2022-07-24 13:51   ` [OE-core] [PATCH 1/3] libgcc: Fix standalone target builds with usrmerge distro feature Khem Raj
2022-07-24 14:38     ` Peter Kjellerstedt

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=f4ea3fac3a7e405ea15f39e33744f39a@axis.com \
    --to=peter.kjellerstedt@axis.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.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