Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: David Taylor <dtaylor@emc.com>
To: gdb@sourceware.org
Subject: bad library order returned by gdb/python/python-config.py
Date: Wed, 29 May 2013 16:54:00 -0000	[thread overview]
Message-ID: <27415.1369846439@usendtaylorx2l> (raw)

When linking, a library should be listed before the libraries that it
depends upon.  With shared libraries, this is less important, but still
a good idea.  With static libraries it matters.

The file gdb/python/python-config.py in the gdb 7.6 release lists the
python library *AFTER* the libraries that it depends upon.  This causes
linkage errors during the configure phase of the build -- causing GDB to
not use python.

Here's a trivial unified diff patch.

Index: gdb/python/python-config.py
===================================================================
RCS file: /home/cvsroot/GDB/gdb/python/python-config.py,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 python-config.py
--- gdb/python/python-config.py	9 May 2013 19:00:17 -0000	1.1.1.1
+++ gdb/python/python-config.py	29 May 2013 16:46:38 -0000
@@ -59,11 +59,11 @@
 
     elif opt in ('--libs', '--ldflags'):
         libs = []
+        libs.append('-lpython'+pyver + abiflags)
         if getvar('LIBS') is not None:
             libs.extend(getvar('LIBS').split())
         if getvar('SYSLIBS') is not None:
             libs.extend(getvar('SYSLIBS').split())
-        libs.append('-lpython'+pyver + abiflags)
         # add the prefix/lib/pythonX.Y/config dir, but only if there is no
         # shared library in prefix/lib/.
         if opt == '--ldflags':


             reply	other threads:[~2013-05-29 16:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 16:54 David Taylor [this message]
2013-05-30 15:51 ` Tom Tromey

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=27415.1369846439@usendtaylorx2l \
    --to=dtaylor@emc.com \
    --cc=gdb@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