summaryrefslogtreecommitdiffstats
path: root/source-builder
diff options
context:
space:
mode:
Diffstat (limited to 'source-builder')
-rw-r--r--source-builder/config/gdb-common-1.cfg5
1 files changed, 4 insertions, 1 deletions
diff --git a/source-builder/config/gdb-common-1.cfg b/source-builder/config/gdb-common-1.cfg
index c7f3955..68eb0f3 100644
--- a/source-builder/config/gdb-common-1.cfg
+++ b/source-builder/config/gdb-common-1.cfg
@@ -81,6 +81,8 @@
%define gdb-python-config %(command -v %{gdb-enable-python}-config || true)
%endif
%define gdb-python-ver-mm %(%{gdb-enable-python} --version 2>&1 | sed -e 's/.* //g' | rev | cut -d'.' -f2- | rev)
+%define gdb-python-ver-major %(echo "%{gdb-python-ver-mm}" | sed -e 's/\..*//')
+%define gdb-python-ver-minor %(echo "%{gdb-python-ver-mm}" | sed -e 's/.*\.//')
%define gdb-python-header Python.h
%define gdb-python-ver-header python%{gdb-python-ver-mm}/%{gdb-python-header}
%define gdb-python-ver-lib libpython%{gdb-python-ver-mm}.*
@@ -109,7 +111,8 @@
%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)"*";}'
- %if %{gdb-python-ver-mm} < 3.8
+ %if %{gdb-python-ver-major} < 3 || \
+ %{gdb-python-ver-major} == 3 && %{gdb-python-ver-minor} < 8
%define gdb-python-config-lib-check-flags --ldflags
%else
%define gdb-python-config-lib-check-flags --ldflags --embed