Skip to content

Commit

Permalink
gdb: Update embedded Python to Python 3
Browse files Browse the repository at this point in the history
Use Python 3.7 from /usr/local/system/python3.

We can no longer use gdbs --with-pythons, because it is totaly broken.
Instead of python-config.py from the package specified with
--with-python, a copy of an old python-config.py script from Python-2.7 is
embedded and used with the interpreter found via --with-python.

In our case, the required "-L" option is not returned.

However, if we add the needed CPPFLAGS and LDFLAGS, gdb/configure (run
during the build phase of the top level directory!) will notice that
Python just works.
  • Loading branch information
donald committed Dec 10, 2020
1 parent 52a67b5 commit 08cc4cb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gdb.be0
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ SRCURL[0]="http://ftp.gnu.org/gnu/gdb/gdb-${PKGVERSION}.tar.xz"
#}

mee_configure() {
bee_configure --with-python=/usr/local/system/python2 \
CFLAGS="-L/usr/local/system/python2/lib -Wl,-rpath=/usr/local/system/python2/lib" \
CXXFLAGS="-L/usr/local/system/python2/lib -Wl,-rpath=/usr/local/system/python2/lib"

bee_configure \
CPPFLAGS="-I/usr/local/system/python3/include/python3.7m" \
LDFLAGS="-L/usr/local/system/python3/lib -Wl,-rpath=/usr/local/system/python3/lib -lpython3.7m"
}

#mee_build() {
Expand Down

0 comments on commit 08cc4cb

Please sign in to comment.