libtool-patches
[Top][All Lists]
Advanced

[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:35:06 -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?

I think so.  The story gets worse.  These are the threads related
options that the ACX_PTHREAD macro from the Autoconf archive checks
for:

  -Kthread -kthread -pthread -pthreads -mthreads --thread-safe -mt

If libtool is able to accurately determine which libraries are
specified with the option, then it could insert the actual libraries
into the dependency list, but if not, the only workaround is to pass
the option at link-time.

As a workaround, many packages provide foo-config scripts which can be
used to acquire the extra flags required to link with a library.
This workaround stinks, but it is the current status-quo.  An
additional problem (but not libtool's) is that a similar option is
often required when compiling dependent sources so the option must be
cached or documented somewhere.

Bob
======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen





reply via email to

[Prev in Thread] Current Thread [Next in Thread]