mirror of
https://git.rtems.org/rtems-source-builder
synced 2024-10-09 07:15:10 +08:00
gdb: Split python's version into major/minor and check for embed option
Closes #4631
This commit is contained in:
parent
4c3708f127
commit
70f302e08c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user