summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/gcc/gcc-11.1.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc/0001-Revert-libstdc-Install-libstdc-gdb.py-more-robustly-.patch76
2 files changed, 77 insertions, 0 deletions
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 = "\
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" 72"
72SRC_URI[sha256sum] = "4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf" 73SRC_URI[sha256sum] = "4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf"
73SRC_URI[backports.sha256sum] = "69274bebd6c069a13443d4af61070e854740a639ec4d66eedf3e80070363587b" 74SRC_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 @@
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