[rtems-source-builder commit] source-builder/config/gdb-common-1.cfg: Fix building with Python 3.8

Chris Johns chrisj at rtems.org
Tue Apr 28 00:27:38 UTC 2020


Module:    rtems-source-builder
Branch:    master
Commit:    d5ad66747c046794e6f611874eb5fd4d7c2020e8
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=d5ad66747c046794e6f611874eb5fd4d7c2020e8

Author:    Anders Montonen <Anders.Montonen at iki.fi>
Date:      Mon Apr 27 22:15:28 2020 +0300

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 at iki.fi>

---

 source-builder/config/gdb-common-1.cfg | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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})



More information about the vc mailing list