[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] OpenBSD -pthread fix
From: |
Bob Friesenhahn |
Subject: |
Re: [PATCH] OpenBSD -pthread fix |
Date: |
Sun, 21 Sep 2003 10:40:58 -0500 (CDT) |
On Sun, 21 Sep 2003, Peter O'Gorman wrote:
> Bob Friesenhahn wrote:
>
> > If options like -pthread are not passed through then the link may fail
> > or produce the wrong result since -pthread may secretly add libraries,
> > or change the entire library selection logic. I have developed for an
> > OS (LynxOS) which provided a completely different set of libraries if
> > -pthread was specified.
>
> So -pthread needs special treatment, fair enough. As far as I know
> (haven't checked) -pthread does not get put into dependency_libs by
> current cvs libtool, if it requires special treatment, it ought to be
> written there as well as read and passed through to the linker. Correct?
To muddy the waters a bit more, some platforms (e.g. Solaris) provide
stubbed thread functions in libc which are used by the linker if
-lpthread is not supplied. This works due to "weak linkage". Some
libraries prepared for multi-thread use will still appear to work even
if -lpthread is missing when a dependent app is linked.
Bob
======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen