All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: Ross Burton <ross@burtonini.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] gcc: revert libstc++-gdb.py installation changes
Date: Wed, 26 May 2021 16:08:10 -0700	[thread overview]
Message-ID: <a5ce41c0-9996-cfaf-a815-f5bd6e91ba3b@gmail.com> (raw)
In-Reply-To: <20210526211132.1058543-1-ross.burton@arm.com>



On 5/26/21 2:11 PM, Ross Burton wrote:
> Commit dbb87d in the GCC 11 branch was intended to make the installation of
> this Python module more robust, but for unknown reasons the library_name
> in libstdc++.la in baremetal builds (for example, Zephyr) is unset, so the
> module is just installed as "-gdb.py".
> 
> This may be a GCC bug, or a bug in our build. Until that is resolved,
> revert the commit to fix the packaging.
> 

This is ok. FWIW this is being tracked with 
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99453 and hopefully this 
will be addressed soon and we wont have to revert this patch but until 
then lets apply this patch to master it does not affect us much.

> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>   meta/recipes-devtools/gcc/gcc-11.1.inc        |  1 +
>   ...nstall-libstdc-gdb.py-more-robustly-.patch | 76 +++++++++++++++++++
>   2 files changed, 77 insertions(+)
>   create mode 100644 meta/recipes-devtools/gcc/gcc/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch
> 
> diff --git a/meta/recipes-devtools/gcc/gcc-11.1.inc b/meta/recipes-devtools/gcc/gcc-11.1.inc
> index aa7ac9be59..bf29879ded 100644
> --- a/meta/recipes-devtools/gcc/gcc-11.1.inc
> +++ b/meta/recipes-devtools/gcc/gcc-11.1.inc
> @@ -68,6 +68,7 @@ SRC_URI = "\
>              file://0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \
>              file://0036-mingw32-Enable-operation_not_supported.patch \
>              file://0037-libatomic-Do-not-enforce-march-on-aarch64.patch \
> +           file://0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch \
>   "
>   SRC_URI[sha256sum] = "4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf"
>   SRC_URI[backports.sha256sum] = "69274bebd6c069a13443d4af61070e854740a639ec4d66eedf3e80070363587b"
> diff --git a/meta/recipes-devtools/gcc/gcc/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch b/meta/recipes-devtools/gcc/gcc/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch
> new file mode 100644
> index 0000000000..a3e31e4f9d
> --- /dev/null
> +++ b/meta/recipes-devtools/gcc/gcc/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch
> @@ -0,0 +1,76 @@
> +This change breaks installation on baremetal targets, so whilst the cause is
> +investigated revert the commit.
> +
> +Upstream-Status: Inappropriate
> +Signed-off-by: Ross Burton <ross.burton@arm.com>
> +
> +From 8ec52bd0ba2141ef0bcc6f93e26a23d662b40f78 Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@arm.com>
> +Date: Wed, 26 May 2021 19:54:29 +0100
> +Subject: [PATCH] Revert "libstdc++: Install libstdc++*-gdb.py more robustly
> + [PR 99453]"
> +
> +This reverts commit dbb87d6a9c37c8eca80d77782717a8144515c16d.
> +---
> + libstdc++-v3/python/Makefile.am | 20 ++++++++++++++++----
> + libstdc++-v3/python/Makefile.in | 14 ++++++++++++--
> + 2 files changed, 28 insertions(+), 6 deletions(-)
> +
> +diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am
> +index 0c2b207b86e..01517a2a522 100644
> +--- a/libstdc++-v3/python/Makefile.am
> ++++ b/libstdc++-v3/python/Makefile.am
> +@@ -44,9 +44,21 @@ gdb.py: hook.in Makefile
> + install-data-local: gdb.py
> + 	@$(mkdir_p) $(DESTDIR)$(toolexeclibdir)
> + ## We want to install gdb.py as SOMETHING-gdb.py.  SOMETHING is the
> +-## full name of the final library.  We use the libtool .la file to get
> +-## the correct name.
> +-	@libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
> +-	          $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
> ++## full name of the final library.  We want to ignore symlinks, the
> ++## .la file, and any previous -gdb.py file.  This is inherently
> ++## fragile, but there does not seem to be a better option, because
> ++## libtool hides the real names from us.
> ++	@here=`pwd`; cd $(DESTDIR)$(toolexeclibdir); \
> ++	  for file in libstdc++.*; do \
> ++	    case $$file in \
> ++	      *-gdb.py) ;; \
> ++	      *.la) ;; \
> ++	      *) if test -h $$file; then \
> ++	           continue; \
> ++	         fi; \
> ++	         libname=$$file;; \
> ++	    esac; \
> ++	  done; \
> ++	cd $$here; \
> + 	echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
> + 	$(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py
> +diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in
> +index 2efe0b96a19..c35dbe55961 100644
> +--- a/libstdc++-v3/python/Makefile.in
> ++++ b/libstdc++-v3/python/Makefile.in
> +@@ -607,8 +607,18 @@ gdb.py: hook.in Makefile
> +
> + install-data-local: gdb.py
> + 	@$(mkdir_p) $(DESTDIR)$(toolexeclibdir)
> +-	@libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
> +-	          $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
> ++	@here=`pwd`; cd $(DESTDIR)$(toolexeclibdir); \
> ++	  for file in libstdc++.*; do \
> ++	    case $$file in \
> ++	      *-gdb.py) ;; \
> ++	      *.la) ;; \
> ++	      *) if test -h $$file; then \
> ++	           continue; \
> ++	         fi; \
> ++	         libname=$$file;; \
> ++	    esac; \
> ++	  done; \
> ++	cd $$here; \
> + 	echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
> + 	$(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py
> +
> +--
> +2.25.1
> +
> 
> 
> 
> 
> 

      reply	other threads:[~2021-05-26 23:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 21:11 [PATCH] gcc: revert libstc++-gdb.py installation changes Ross Burton
2021-05-26 23:08 ` Khem Raj [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=a5ce41c0-9996-cfaf-a815-f5bd6e91ba3b@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross@burtonini.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 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.