summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Montonen <Anders.Montonen@iki.fi>2020-04-27 22:15:28 +0300
committerChris Johns <chrisj@rtems.org>2020-04-28 08:49:56 +1000
commitd5ad66747c046794e6f611874eb5fd4d7c2020e8 (patch)
treee20b65a2208859c50d997840ab81879f05bf849c
parentsb/linux.py: Workaround for Python >= 3.8 (diff)
downloadrtems-source-builder-d5ad66747c046794e6f611874eb5fd4d7c2020e8.tar.bz2
source-builder/config/gdb-common-1.cfg: Fix building with Python 3.8
Starting with Python 3.8, python3-config requires the "--embed" flag to print the flags required for embedding Python in an application. Fixes: error: shell macro failed: /home/anders/work/rtems/rsb/source-builder/sb/rtems-build-dep -c gcc -l : 2: error: no library (-l) provided Signed-off-by: Anders Montonen <Anders.Montonen@iki.fi>
-rw-r--r--source-builder/config/gdb-common-1.cfg7
1 files changed, 6 insertions, 1 deletions
diff --git a/source-builder/config/gdb-common-1.cfg b/source-builder/config/gdb-common-1.cfg
index 5847f11..397d44d 100644
--- a/source-builder/config/gdb-common-1.cfg
+++ b/source-builder/config/gdb-common-1.cfg
@@ -109,7 +109,12 @@
%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-config-libs %(%{gdb-python-config} --ldflags | %{gdb-python-lib-filter})
+ %if %{gdb-python-ver-mm} < 3.8
+ %define gdb-python-config-lib-check-flags --ldflags
+ %else
+ %define gdb-python-config-lib-check-flags --ldflags --embed
+ %endif
+ %define gdb-python-config-libs %(%{gdb-python-config} %{gdb-python-config-lib-check-flags} | %{gdb-python-lib-filter})
%define gdb-python-lib-check %(%{_sbdir}/sb/rtems-build-dep -c %{__cc} %{gdb-host-libs} -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})