This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PING 2][PATCH v3] Add pretty printers for the NPTL lock types


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.


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