This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 7.2 branch, configure problem, --with-python


Joel Brobecker wrote:
Can you try on HEAD first?  That would be the simplest for me, as
I am a little under pressure to catch up on all fronts, right now.

Patch doesn't apply on HEAD.

It just applied fine for me. Are you sure? (please note the extra a/ and b/ in the directory names, so you have to use a different -p level).


Are we talking about the same patch?


diff --git a/gdb/python/python-config.py b/gdb/python/python-config.py
index 0230eb4..aa4aea3 100644
--- a/gdb/python/python-config.py
+++ b/gdb/python/python-config.py
@@ -50,8 +50,21 @@ for opt in opt_flags:
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
# shared library in prefix/lib/.
if opt == '--ldflags':
+ # Provide the location where the Python library is installed.
+ # We always provide it, because Python may have been installed
+ # at a non-standard location.
if not getvar('Py_ENABLE_SHARED'):
- libs.insert(0, '-L' + getvar('LIBPL'))
+ # There is no shared library in prefix/lib. The static
+ # library is in prefix/lib/pythonX.Y/config.
+ #
+ # Note that we cannot use getvar('LIBPL') like we used to,
+ # because it provides the location at build time, which might
+ # be different from the actual location at runtime.
+ libdir = sysconfig.get_python_lib(standard_lib=True) + '/config'
+ else:
+ # The Python shared library is installed in prefix/lib.
+ libdir = sysconfig.PREFIX + '/lib'
+ libs.insert(0, '-L' + libdir)
libs.extend(getvar('LINKFORSHARED').split())
print ' '.join(libs)




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]