This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: update -pthread specs for FreeBSD
On Sat, 18 Sep 2010, Andriy Gapon wrote:
>>> Please consider the attached patch that fixes what -pthread should
>>> expand too on modern version of FreeBSD. The patch is based on the
>>> changes that are made locally to a copy of GCC (4.2) in FreeBSD source
>>> tree:
>>> http://svn.freebsd.org/viewvc/base/head/contrib/gcc/config/freebsd-spec.h?revision=200038&view=markup
I bootstrapped and tested Andriy's patch on amd64-unknown-freebsd8.1
without regressions:
http://gcc.gnu.org/ml/gcc-testresults/2010-09/msg02492.html (without)
http://gcc.gnu.org/ml/gcc-testresults/2010-09/msg02490.html (with)
(In fact, libgomp and libmudflap each lost warnings and failure,
respectively, but I believe that was timing issues.)
If approved, I can commit this to HEAD and the 4.5 branch.
For the record, below the original patch with a ChangeLog of mine.
Gerald
2010-09-29 Andriy Gapon <avg@freebsd.org>
PR target/45808
* config/freebsd-spec.h (FBSD_LIB_SPEC): Handle the shared case.
--- gcc/config/freebsd-spec.h.orig 2010-09-13 14:35:06.151574339 +0300
+++ gcc/config/freebsd-spec.h 2010-09-13 14:35:08.171465130 +0300
@@ -139,6 +139,9 @@
%{!shared: \
%{!pg: %{pthread:-lpthread} -lc} \
%{pg: %{pthread:-lpthread_p} -lc_p} \
+ } \
+ %{shared: \
+ %{pthread:-lpthread} -lc \
}"
#endif
#endif