diff mbox

update -pthread specs for FreeBSD

Message ID alpine.LNX.2.00.1009290446360.5068@acrux.dbai.tuwien.ac.at
State New
Headers show

Commit Message

Gerald Pfeifer Sept. 29, 2010, 12:18 p.m. UTC
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.

Comments

Loren James Rittle Sept. 29, 2010, 4:40 p.m. UTC | #1
Approved.  Thank you for testing. -Loren

In article <alpine.LNX.2.00.1009290446360.5068@acrux.dbai.tuwien.ac.at>,
Gerald Pfeifer<gerald@pfeifer.com> writes:

> 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
Gerald Pfeifer Feb. 14, 2011, 12:42 a.m. UTC | #2
On Wed, 29 Sep 2010, Loren James Rittle wrote:
> Approved.  Thank you for testing. -Loren

Thanks.  Somehow this fell through the cracks, but I applied the
following change now.

>> 2010-09-29  Andriy Gapon <avg@freebsd.org>
>>  
>> 	PR target/45808
>> 	* config/freebsd-spec.h (FBSD_LIB_SPEC): Handle the shared case.

Thanks, Andriy!  This patch will be in GCC 4.6.0 and I am also thinking
to apply it to the GCC 4.5 branch given that it brings this in line with
the system compiler.

Gerald
diff mbox

Patch

--- 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