summaryrefslogtreecommitdiffstats
path: root/source-builder
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2023-04-11 05:59:40 +0000
committerChris Johns <chrisj@rtems.org>2023-04-11 05:59:40 +0000
commit78913bcbba06b30b0823a4c2152b911cf3c33cd1 (patch)
tree9b6df35f3179410a0840ceff272774957c83c484 /source-builder
parentrtems/microblaze: Update to GDB 13.1 (diff)
downloadrtems-source-builder-78913bcbba06b30b0823a4c2152b911cf3c33cd1.tar.bz2
gdb-common: Fix the python-config library parsing
Closes #4894
Diffstat (limited to 'source-builder')
-rw-r--r--source-builder/config/gdb-common-1.cfg6
1 files changed, 3 insertions, 3 deletions
diff --git a/source-builder/config/gdb-common-1.cfg b/source-builder/config/gdb-common-1.cfg
index a52e64d..0fea334 100644
--- a/source-builder/config/gdb-common-1.cfg
+++ b/source-builder/config/gdb-common-1.cfg
@@ -109,8 +109,8 @@
%define gdb-host-libs -L '%{host_ldflags}'
%endif
%if %{gdb-python-config} != %{nil}
- %define gdb-python-lib-filter awk 'BEGIN{FS=" "}/python/{for(i=1;i<NF;++i)if(match($i,".*lpython.*")) print "lib"substr($i,3)"\\*";}'
- %define gdb-python-libpath-filter awk 'BEGIN{FS=" "}/python/{for(i=1;i<NF;++i)if(match($i,".*L.*")) print substr($i,3);}'
+ %define gdb-python-lib-filter awk '{for(i=1;i<NF;++i)if(match($i,".*lpython.*")) print "lib"substr($i,3)"\\*";}'
+ %define gdb-python-libpath-filter awk '{for(i=1;i<NF;++i) if (match($i,"-L.*") == 1) l[substr($i,3)]=1;} END{for(i in l) printf("-L " i " "); printf("\n");}'
%if %{gdb-python-ver-major} < 3 || \
%{gdb-python-ver-major} == 3 && %{gdb-python-ver-minor} < 8
%define gdb-python-config-lib-check-flags --ldflags
@@ -119,7 +119,7 @@
%endif
%define gdb-python-config-libs %(%{gdb-python-config} %{gdb-python-config-lib-check-flags} | %{gdb-python-lib-filter})
%define gdb-python-config-libpath %(%{gdb-python-config} %{gdb-python-config-lib-check-flags} | %{gdb-python-libpath-filter} | uniq)
- %define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} -L %{gdb-python-config-libpath} -l %{gdb-python-config-libs})
+ %define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} %{gdb-python-config-libpath} -l %{gdb-python-config-libs})
%else
%define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} -l %{gdb-python-ver-lib})
%endif