summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-runtime.inc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-02-03 22:00:20 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-09 13:45:02 +0000
commite1f691072737978a1ddbdabeac529ed005508977 (patch)
treeee81744fbd2329af333814bd084b13e5898ea3c5 /meta/recipes-devtools/gcc/gcc-runtime.inc
parent71ac318a830b37f55cbd63794c55c6adc1904f1f (diff)
downloadpoky-e1f691072737978a1ddbdabeac529ed005508977.tar.gz
gcc-runtime: Move gdb pretty printer file to auto-load location
When debugging a C++ program on target using libcstdc++, gdb does not find the pretty printer python support, this is because the init file is installed into /usr/lib which is excluded from gdb's default list of directories to load config's from, where as defaults to load from datadir is still on, it therefore does not load this file warning: File "/usr/lib/libstdc++.so.6.0.33-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". This leaves the libstdc++ pretty-printers disabled even though added via IMAGE_INSTALL += "gcc-runtime-dbg" Comment on adding missing runtime dependency on datetime python module for the pretty printer to work/load successfully. Once the pretty-printer gdb file is moved out of libdir, it may become empty therefore delete it if its empty. (From OE-Core rev: d24e16d192f21aa68b5274496efaba1d913f37c2) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-runtime.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc12
1 files changed, 11 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 64b6168ba7..dbc9141000 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -85,6 +85,8 @@ do_install () {
85 cd ${B}/${TARGET_SYS}/$d/ 85 cd ${B}/${TARGET_SYS}/$d/
86 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install 86 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install
87 done 87 done
88 install -d ${D}${datadir}/gdb/auto-load/${libdir}
89 mv ${D}${libdir}/libstdc++*-gdb.py ${D}${datadir}/gdb/auto-load/${libdir}
88 if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then 90 if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then
89 install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include 91 install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include
90 mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include 92 mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include
@@ -99,6 +101,9 @@ do_install () {
99 if [ -d ${D}${infodir} ]; then 101 if [ -d ${D}${infodir} ]; then
100 rmdir --ignore-fail-on-non-empty -p ${D}${infodir} 102 rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
101 fi 103 fi
104 if [ -d ${D}${libdir} ]; then
105 rmdir --ignore-fail-on-non-empty -p ${D}${libdir}
106 fi
102} 107}
103 108
104do_install:append:class-target () { 109do_install:append:class-target () {
@@ -182,9 +187,14 @@ RRECOMMENDS:${PN}-dbg = ""
182 187
183# include python debugging scripts 188# include python debugging scripts
184FILES:${PN}-dbg += "\ 189FILES:${PN}-dbg += "\
185 ${libdir}/libstdc++.*-gdb.py \
186 ${datadir}/gcc-${BINV}/python/libstdcxx \ 190 ${datadir}/gcc-${BINV}/python/libstdcxx \
191 ${datadir}/gdb/auto-load \
187" 192"
193# Needed by libstdcxx pretty printer, however it is disabled intentionally
194# as it adds build time dependency on bash and some cases e.g. no GPL3 cases
195# bash is not availbale and builds fails
196# So it needs to be added manually to images sadly.
197# RDEPENDS:${PN}-dbg += "python3-datetime"
188 198
189FILES:libg2c = "${target_libdir}/libg2c.so.*" 199FILES:libg2c = "${target_libdir}/libg2c.so.*"
190SUMMARY:libg2c = "Companion runtime library for g77" 200SUMMARY:libg2c = "Companion runtime library for g77"