This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [c++, driver] Add -lrt on Solaris
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "libstdc++" <libstdc++ at gcc dot gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>, Jason Merrill <jason at redhat dot com>, Benjamin Kosnik <bkoz at redhat dot com>
- Date: Fri, 7 Jun 2013 16:54:58 +0100
- Subject: Re: [c++, driver] Add -lrt on Solaris
- References: <yddk3m5diwb dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE>
I haven't looked at the patch yet and my knowledge of spec files is
pretty weak, so sorry if these are stupid questions ...
On 7 June 2013 16:45, Rainer Orth wrote:
>
> Follow libgfortran's lead and introduce libstdc++.spec. Here,
> target-specific linker switches can be determined by the libstdc++
> configury, with configuration well localized, and one can easily handle
> stuff like linking -lrt with -z ignore/-z record
> resp. --as-needed/--no-as-needed. This provides us with a general
> extension mechanism for linking C++ programs, which can be used for
> other purposes if the need arises.
Could this later be extended to serve as the basis for a -cxxthread
switch that does platform-specific things to allow the C++11 thread
library to be used? I don't like that users must use -pthread for
std::thread and std::mutex to work, because they shouldn't need to
know or care whether it uses Pthreads internally, or some other thread
model.
> The downside of course is that the testsuite needs to be taught about
> that file by passing the appropriate -B switches to find it at compile
> time.
Is that only necessary for testing an uninstalled libstdc++? In other
words, would the spec file be installed and used automatically for an
installed libstdc++?
> One way or another, this needs to be adressed to fix the libstdc++
> testsuite failures on Solaris.
The other option is to make --enable-libstdcxx-time=auto only
effective for Solaris 11, but I think you said you'd prefer to keep it
for 9 and 10.