summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2021-06-15 17:33:54 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-06-17 13:42:31 +0100
commitef772235d415760843408add6c91ab06eb60ec8e (patch)
treede04a294d5a0c85d5c5a676e29d03c4747494367 /meta/recipes-devtools/gcc
parent7933c2125b21d729efa6e1b663f929dc923458d0 (diff)
downloadpoky-ef772235d415760843408add6c91ab06eb60ec8e.tar.gz
gcc: replace gdb helper install revert with the upstream fix
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. (From OE-Core rev: 5137ca0a295c3ab8d938d67ea292300bb2cbab93) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-11.1.inc2
-rw-r--r--meta/recipes-devtools/gcc/gcc/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch76
-rw-r--r--meta/recipes-devtools/gcc/gcc/0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch57
3 files changed, 58 insertions, 77 deletions
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 = "\
68 file://0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \ 68 file://0035-gentypes-genmodes-Do-not-use-__LINE__-for-maintainin.patch \
69 file://0036-mingw32-Enable-operation_not_supported.patch \ 69 file://0036-mingw32-Enable-operation_not_supported.patch \
70 file://0037-libatomic-Do-not-enforce-march-on-aarch64.patch \ 70 file://0037-libatomic-Do-not-enforce-march-on-aarch64.patch \
71 file://0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch \ 71 file://0001-libstdc-Fix-installation-of-python-hooks-PR-99453.patch \
72 file://0038-arc-Update-64bit-move-split-patterns.patch \ 72 file://0038-arc-Update-64bit-move-split-patterns.patch \
73 file://0039-arc-Fix-u-maddhisi-patterns.patch \ 73 file://0039-arc-Fix-u-maddhisi-patterns.patch \
74 file://0040-arc-Update-doloop_end-patterns.patch \ 74 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 @@
1This change breaks installation on baremetal targets, so whilst the cause is
2investigated revert the commit.
3
4Upstream-Status: Inappropriate
5Signed-off-by: Ross Burton <ross.burton@arm.com>
6
7From 8ec52bd0ba2141ef0bcc6f93e26a23d662b40f78 Mon Sep 17 00:00:00 2001
8From: Ross Burton <ross.burton@arm.com>
9Date: Wed, 26 May 2021 19:54:29 +0100
10Subject: [PATCH] Revert "libstdc++: Install libstdc++*-gdb.py more robustly
11 [PR 99453]"
12
13This reverts commit dbb87d6a9c37c8eca80d77782717a8144515c16d.
14---
15 libstdc++-v3/python/Makefile.am | 20 ++++++++++++++++----
16 libstdc++-v3/python/Makefile.in | 14 ++++++++++++--
17 2 files changed, 28 insertions(+), 6 deletions(-)
18
19diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am
20index 0c2b207b86e..01517a2a522 100644
21--- a/libstdc++-v3/python/Makefile.am
22+++ b/libstdc++-v3/python/Makefile.am
23@@ -44,9 +44,21 @@ gdb.py: hook.in Makefile
24 install-data-local: gdb.py
25 @$(mkdir_p) $(DESTDIR)$(toolexeclibdir)
26 ## We want to install gdb.py as SOMETHING-gdb.py. SOMETHING is the
27-## full name of the final library. We use the libtool .la file to get
28-## the correct name.
29- @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
30- $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
31+## full name of the final library. We want to ignore symlinks, the
32+## .la file, and any previous -gdb.py file. This is inherently
33+## fragile, but there does not seem to be a better option, because
34+## libtool hides the real names from us.
35+ @here=`pwd`; cd $(DESTDIR)$(toolexeclibdir); \
36+ for file in libstdc++.*; do \
37+ case $$file in \
38+ *-gdb.py) ;; \
39+ *.la) ;; \
40+ *) if test -h $$file; then \
41+ continue; \
42+ fi; \
43+ libname=$$file;; \
44+ esac; \
45+ done; \
46+ cd $$here; \
47 echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
48 $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py
49diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in
50index 2efe0b96a19..c35dbe55961 100644
51--- a/libstdc++-v3/python/Makefile.in
52+++ b/libstdc++-v3/python/Makefile.in
53@@ -607,8 +607,18 @@ gdb.py: hook.in Makefile
54
55 install-data-local: gdb.py
56 @$(mkdir_p) $(DESTDIR)$(toolexeclibdir)
57- @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
58- $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
59+ @here=`pwd`; cd $(DESTDIR)$(toolexeclibdir); \
60+ for file in libstdc++.*; do \
61+ case $$file in \
62+ *-gdb.py) ;; \
63+ *.la) ;; \
64+ *) if test -h $$file; then \
65+ continue; \
66+ fi; \
67+ libname=$$file;; \
68+ esac; \
69+ done; \
70+ cd $$here; \
71 echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
72 $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py
73
74--
752.25.1
76
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 @@
1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@arm.com>
3
4From ad4c21f0f59b52357019148ec94d767aa2acd8f2 Mon Sep 17 00:00:00 2001
5From: Jonathan Wakely <jwakely@redhat.com>
6Date: Tue, 1 Jun 2021 11:00:16 +0100
7Subject: [PATCH] libstdc++: Fix installation of python hooks [PR 99453]
8
9When no shared library is installed, the new code to determine the name
10of the -gdb.py file yields an empty string. Use the name of the static
11library in that case.
12
13libstdc++-v3/ChangeLog:
14
15 PR libstdc++/99453
16 * python/Makefile.am: Use archive name for printer hook if no
17 dynamic library name is available.
18 * python/Makefile.in: Regenerate.
19
20(cherry picked from commit 9f7bc160b4a0f27dce248d1226e3ae7104b0e67b)
21---
22 libstdc++-v3/python/Makefile.am | 4 ++++
23 libstdc++-v3/python/Makefile.in | 4 ++++
24 2 files changed, 8 insertions(+)
25
26diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am
27index 0c2b207b86e..8efefa5725c 100644
28--- a/libstdc++-v3/python/Makefile.am
29+++ b/libstdc++-v3/python/Makefile.am
30@@ -48,5 +48,9 @@ install-data-local: gdb.py
31 ## the correct name.
32 @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
33 $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
34+ if [ -z "$$libname" ]; then \
35+ libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
36+ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
37+ fi; \
38 echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
39 $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py
40diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in
41index 2efe0b96a19..9904a9197de 100644
42--- a/libstdc++-v3/python/Makefile.in
43+++ b/libstdc++-v3/python/Makefile.in
44@@ -609,6 +609,10 @@ install-data-local: gdb.py
45 @$(mkdir_p) $(DESTDIR)$(toolexeclibdir)
46 @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
47 $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
48+ if [ -z "$$libname" ]; then \
49+ libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
50+ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
51+ fi; \
52 echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
53 $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py
54
55--
562.25.1
57