* [PATCH] gcc: replace gdb helper install revert with the upstream fix
@ 2021-06-15 16:33 Ross Burton
2021-06-15 17:58 ` [OE-core] " Khem Raj
0 siblings, 1 reply; 2+ messages in thread
From: Ross Burton @ 2021-06-15 16:33 UTC (permalink / raw)
To: openembedded-core
A change in the gcc-11 branch broke installation of the GDB helper on
bare-metal targets without a shared libstdc++.so. This now fixed
upstream so replacce the revert with a backport of the patch.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
meta/recipes-devtools/gcc/gcc-11.1.inc | 2 +-
...nstall-libstdc-gdb.py-more-robustly-.patch | 76 -------------------
...nstallation-of-python-hooks-PR-99453.patch | 57 ++++++++++++++
3 files changed, 58 insertions(+), 77 deletions(-)
delete mode 100644 meta/recipes-devtools/gcc/gcc/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch
create mode 100644 meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch
diff --git a/meta/recipes-devtools/gcc/gcc-11.1.inc b/meta/recipes-devtools/gcc/gcc-11.1.inc
index 69e4c8bacc..c21242af58 100644
--- a/meta/recipes-devtools/gcc/gcc-11.1.inc
+++ b/meta/recipes-devtools/gcc/gcc-11.1.inc
@@ -68,7 +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 \
+ file://0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch \
file://0038-arc-Update-64bit-move-split-patterns.patch \
file://0039-arc-Fix-u-maddhisi-patterns.patch \
file://0040-arc-Update-doloop_end-patterns.patch \
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
deleted file mode 100644
index a3e31e4f9d..0000000000
--- a/meta/recipes-devtools/gcc/gcc/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-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
-
diff --git a/meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch b/meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch
new file mode 100644
index 0000000000..d82f533cb4
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch
@@ -0,0 +1,57 @@
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+From ad4c21f0f59b52357019148ec94d767aa2acd8f2 Mon Sep 17 00:00:00 2001
+From: Jonathan Wakely <jwakely@redhat.com>
+Date: Tue, 1 Jun 2021 11:00:16 +0100
+Subject: [PATCH] libstdc++: Fix installation of python hooks [PR 99453]
+
+When no shared library is installed, the new code to determine the name
+of the -gdb.py file yields an empty string. Use the name of the static
+library in that case.
+
+libstdc++-v3/ChangeLog:
+
+ PR libstdc++/99453
+ * python/Makefile.am: Use archive name for printer hook if no
+ dynamic library name is available.
+ * python/Makefile.in: Regenerate.
+
+(cherry picked from commit 9f7bc160b4a0f27dce248d1226e3ae7104b0e67b)
+---
+ libstdc++-v3/python/Makefile.am | 4 ++++
+ libstdc++-v3/python/Makefile.in | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am
+index 0c2b207b86e..8efefa5725c 100644
+--- a/libstdc++-v3/python/Makefile.am
++++ b/libstdc++-v3/python/Makefile.am
+@@ -48,5 +48,9 @@ install-data-local: gdb.py
+ ## the correct name.
+ @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
+ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
++ if [ -z "$$libname" ]; then \
++ libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
++ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
++ fi; \
+ 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..9904a9197de 100644
+--- a/libstdc++-v3/python/Makefile.in
++++ b/libstdc++-v3/python/Makefile.in
+@@ -609,6 +609,10 @@ install-data-local: gdb.py
+ @$(mkdir_p) $(DESTDIR)$(toolexeclibdir)
+ @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
+ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
++ if [ -z "$$libname" ]; then \
++ libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
++ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
++ fi; \
+ echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
+ $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py
+
+--
+2.25.1
+
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [OE-core] [PATCH] gcc: replace gdb helper install revert with the upstream fix
2021-06-15 16:33 [PATCH] gcc: replace gdb helper install revert with the upstream fix Ross Burton
@ 2021-06-15 17:58 ` Khem Raj
0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2021-06-15 17:58 UTC (permalink / raw)
To: Ross Burton, openembedded-core
On 6/15/21 9:33 AM, Ross Burton wrote:
> A change in the gcc-11 branch broke installation of the GDB helper on
> bare-metal targets without a shared libstdc++.so. This now fixed
> upstream so replacce the revert with a backport of the patch.
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
> meta/recipes-devtools/gcc/gcc-11.1.inc | 2 +-
> ...nstall-libstdc-gdb.py-more-robustly-.patch | 76 -------------------
> ...nstallation-of-python-hooks-PR-99453.patch | 57 ++++++++++++++
> 3 files changed, 58 insertions(+), 77 deletions(-)
> delete mode 100644 meta/recipes-devtools/gcc/gcc/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch
> create mode 100644 meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch
>
lgtm
> diff --git a/meta/recipes-devtools/gcc/gcc-11.1.inc b/meta/recipes-devtools/gcc/gcc-11.1.inc
> index 69e4c8bacc..c21242af58 100644
> --- a/meta/recipes-devtools/gcc/gcc-11.1.inc
> +++ b/meta/recipes-devtools/gcc/gcc-11.1.inc
> @@ -68,7 +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 \
> + file://0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch \
> file://0038-arc-Update-64bit-move-split-patterns.patch \
> file://0039-arc-Fix-u-maddhisi-patterns.patch \
> file://0040-arc-Update-doloop_end-patterns.patch \
> 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
> deleted file mode 100644
> index a3e31e4f9d..0000000000
> --- a/meta/recipes-devtools/gcc/gcc/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch
> +++ /dev/null
> @@ -1,76 +0,0 @@
> -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
> -
> diff --git a/meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch b/meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch
> new file mode 100644
> index 0000000000..d82f533cb4
> --- /dev/null
> +++ b/meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch
> @@ -0,0 +1,57 @@
> +Upstream-Status: Backport
> +Signed-off-by: Ross Burton <ross.burton@arm.com>
> +
> +From ad4c21f0f59b52357019148ec94d767aa2acd8f2 Mon Sep 17 00:00:00 2001
> +From: Jonathan Wakely <jwakely@redhat.com>
> +Date: Tue, 1 Jun 2021 11:00:16 +0100
> +Subject: [PATCH] libstdc++: Fix installation of python hooks [PR 99453]
> +
> +When no shared library is installed, the new code to determine the name
> +of the -gdb.py file yields an empty string. Use the name of the static
> +library in that case.
> +
> +libstdc++-v3/ChangeLog:
> +
> + PR libstdc++/99453
> + * python/Makefile.am: Use archive name for printer hook if no
> + dynamic library name is available.
> + * python/Makefile.in: Regenerate.
> +
> +(cherry picked from commit 9f7bc160b4a0f27dce248d1226e3ae7104b0e67b)
> +---
> + libstdc++-v3/python/Makefile.am | 4 ++++
> + libstdc++-v3/python/Makefile.in | 4 ++++
> + 2 files changed, 8 insertions(+)
> +
> +diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am
> +index 0c2b207b86e..8efefa5725c 100644
> +--- a/libstdc++-v3/python/Makefile.am
> ++++ b/libstdc++-v3/python/Makefile.am
> +@@ -48,5 +48,9 @@ install-data-local: gdb.py
> + ## the correct name.
> + @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
> + $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
> ++ if [ -z "$$libname" ]; then \
> ++ libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
> ++ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
> ++ fi; \
> + 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..9904a9197de 100644
> +--- a/libstdc++-v3/python/Makefile.in
> ++++ b/libstdc++-v3/python/Makefile.in
> +@@ -609,6 +609,10 @@ install-data-local: gdb.py
> + @$(mkdir_p) $(DESTDIR)$(toolexeclibdir)
> + @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
> + $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
> ++ if [ -z "$$libname" ]; then \
> ++ libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
> ++ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
> ++ fi; \
> + echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
> + $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py
> +
> +--
> +2.25.1
> +
>
>
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-15 17:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 16:33 [PATCH] gcc: replace gdb helper install revert with the upstream fix Ross Burton
2021-06-15 17:58 ` [OE-core] " Khem Raj
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.