This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PING 2][PATCH v3] Add pretty printers for the NPTL lock types
- From: Martin Galvan <martin dot galvan at tallertechnologies dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: "Carlos O'Donell" <carlos at redhat dot com>, Joseph Myers <joseph at codesourcery dot com>, Siddhesh Poyarekar <sid at reserved-bit dot com>, libc-alpha at sourceware dot org, Tom Tromey <tom at tromey dot com>, Torvald Riegel <triegel at redhat dot com>, Pedro Alves <palves at redhat dot com>, vapier at gentoo dot org, Daniel Gutson <daniel dot gutson at tallertechnologies dot com>
- Date: Mon, 21 Mar 2016 19:28:39 -0300
- Subject: Re: [PING 2][PATCH v3] Add pretty printers for the NPTL lock types
- Authentication-results: sourceware.org; auth=none
- References: <1447768994-5368-1-git-send-email-martin dot galvan at tallertechnologies dot com> <20160209155450 dot GE1904 at devel dot intra dot reserved-bit dot com> <CAOKbPbYPtn5mMpwGGD-HccXnhNz+eymiJ7Xwe_4WOnesYkw5=A at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1602091743430 dot 29757 at digraph dot polyomino dot org dot uk> <CAOKbPba5MGw8XCXRSvapfADD1v_0FoVYhUeJUp01YBXyELLMkg at mail dot gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1602101301131 dot 23420 at digraph dot polyomino dot org dot uk> <56BCB9C7 dot 6000100 at redhat dot com> <CAOKbPbZMt+ozv8dPbC8hpZr6yw2d2HcV4OskRP+Pk-i3oYu=nQ at mail dot gmail dot com> <56D5DFE3 dot 5010401 at redhat dot com> <CAOKbPbY_TPXBuFWT_eZCOBKiF-uSWZndAT3cuL3ZvZF+htbCRQ at mail dot gmail dot com> <CAOKbPbY0QW-KvhegDbs3NCuv-hHKyf-peuL1aBon+YTCt2SfEg at mail dot gmail dot com> <56E249E9 dot 4060404 at redhat dot com> <CAOKbPbYXgQyM8Gk-R4poMsdHz6eZ6=9ynq=hu=E8yrignf3N-w at mail dot gmail dot com> <56E6FF80 dot 3080202 at redhat dot com> <CAOKbPbaVpUk0VggUGivbaY9fDHMf0-RrYjsYOGLRHEOKy+Ycbw at mail dot gmail dot com> <CAOKbPbaTB4t1YX=Qu+gcSJuPvxc+FVZis2cRCsVfr4bnn1BCvw at mail dot gmail dot com> <mvmshzjddk9 dot fsf at hawking dot suse dot de> <CAOKbPbYSHg0JBZn7+aw1bb44C4af2k4HVpYTVJMhWJ7A8Hqi6A at mail dot gmail dot com>
On Mon, Mar 21, 2016 at 4:04 PM, Martin Galvan
<martin.galvan@tallertechnologies.com> wrote:
> I know it does, the question is *how* it does it.
>
> From what I saw, all the nptl Makefile does is set the libpthread
> binaries as prerequisites of its tests. Is there some magic somewhere
> that uses this to link to libpthread? If so, how does it work, and
> what exactly should I write?
>
> Also, what about static linking? Does the 'build-shared' variable tell
> how to link against libpthread in all the Makefiles?
After investigating some more I think I know how this works: the
'Rules' Makefile has a rule for binaries-shared-tests that calls
$(+link-tests), which in turn invokes gcc passing it a filtered $^. If
we set the libpthread as prerequisites of the tests in our Makefile,
$^ will also have them due to Make's feature of multiple rules for the same
target.
The question still remains, though, of how should I handle static
linking against libpthread as well as the -O0 issue.