From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFC] python-config.py --ldflags should return relocated path to libpython
Date: Thu, 05 Aug 2010 18:54:00 -0000 [thread overview]
Message-ID: <20100805185347.GA31513@host1.dyn.jankratochvil.net> (raw)
In-Reply-To: <1278627885-9416-1-git-send-email-brobecker@adacore.com>
On Fri, 09 Jul 2010 00:24:45 +0200, Joel Brobecker wrote:
> --- 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'
On Fedora 14snapshot x86_64 it generates the following warnings:
/usr/bin/ld: skipping incompatible /usr/lib/libtinfo.so when searching for -ltinfo
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libutil.so when searching for -lutil
/usr/bin/ld: skipping incompatible /usr/lib/libutil.a when searching for -lutil
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.7.so when searching for -lpython2.7
/usr/bin/ld: skipping incompatible /usr/lib/libexpat.so when searching for -lexpat
/usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libtinfo.so when searching for -ltinfo
/usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libutil.so when searching for -lutil
/usr/bin/ld: skipping incompatible /usr/lib/libutil.a when searching for -lutil
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libpython2.7.so when searching for -lpython2.7
/usr/bin/ld: skipping incompatible /usr/lib/libexpat.so when searching for -lexpat
/usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
Sure it still links correctly. But I somehow find incorrect to supply
inappropriate libraries into the -L path, such as for occasional buggy linker
script contained in the .so files missing proper OUTPUT_FORMAT protection etc.
I do not mind much, though, correct system should copy with it.
Regards,
Jan
next prev parent reply other threads:[~2010-08-05 18:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-08 22:25 Joel Brobecker
2010-07-08 23:04 ` Joel Brobecker
2010-07-28 17:23 ` Joel Brobecker
2010-08-05 18:25 ` Tom Tromey
2010-08-05 18:54 ` Jan Kratochvil [this message]
2010-08-11 19:08 ` Joel Brobecker
2010-08-11 19:10 ` Jan Kratochvil
2010-08-11 19:39 ` Joel Brobecker
2010-08-11 19:48 ` Jan Kratochvil
2010-08-16 14:50 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100805185347.GA31513@host1.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox