public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* update -pthread specs for FreeBSD
@ 2010-09-18 18:27 Andriy Gapon
  2010-09-18 19:43 ` Andriy Gapon
  0 siblings, 1 reply; 7+ messages in thread
From: Andriy Gapon @ 2010-09-18 18:27 UTC (permalink / raw)
  To: gcc-patches; +Cc: Gerald Pfeifer

[-- Attachment #1: Type: text/plain, Size: 947 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


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

Thanks a lot!
- -- 
Andriy Gapon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMlPXqAAoJEHSlLSemUf4vZ/gH+wf3P1+DOh6ASsWI4wC2pt3Q
hQpk9dlV/XnGtqEZ/fX5Y9UrapMO8NuyYfTvBgyLtaQpCZmpdVNv1yBMCvqBqtuR
t6W1xeg08Y1ikLV1iTX4W9189/ZU0qh7xdHHoMqtvBjsYvHNyYreBLcsv6E8egIh
uzYlNo/deE2MnmcmZwlpGB1K/CbfSTeniluaAoaTKvF+yiVHhe2Yh2bEM2XG9BhO
Jp/y0QYfErYJtRbud0Tya/3VChzjP0w7ifULALa/mLySIGHSvqt8ulcWhRjJjk65
J8Bw3kW99wV8gybvBuGby12xTpVuYjObdZ4ayLWMOS0GDaNxBRged//STTrIMk4=
=Buyc
-----END PGP SIGNATURE-----

[-- Attachment #2: gcc44.specs --]
[-- Type: text/plain, Size: 4649 bytes --]

*asm:
%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Yd,*}  %{Wa,*:%*} %{m32:--32} %{m64:--64}

*asm_debug:
%{!g0:%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}} %{fdebug-prefix-map=*:--debug-prefix-map %*}

*asm_final:


*asm_options:
%{--target-help:%:print-asm-header()} %{v} %{w:-W} %{I*} %a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}

*invoke_as:
%{!S:-o %|.s |
 as %(asm_options) %m.s %A }

*cpp:
							  %(cpp_cpu)								  %(cpp_arch)								  %{posix:-D_POSIX_SOURCE}

*cpp_options:
%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w} %{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*} %{undef} %{save-temps:-fpch-preprocess}

*cpp_debug_options:
%{d*}

*cpp_unique_options:
%{C|CC:%{!E:%eGCC does not support -C or -CC without -E}} %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*&F*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{!MT:%{!MQ:%{MD|MMD:%{o*:-MQ %*}}}}}}} %{remap} %{g3|ggdb3|gstabs3|gcoff3|gxcoff3|gvms3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{fmudflap:-D_MUDFLAP -include mf-runtime.h} %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h} %{E|M|MM:%W{o*}}

*trad_capable_cpp:
cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}

*cc1:
%(cc1_cpu) %{profile:-p}

*cc1_options:
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{--help=*:--help=%(VALUE)} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*} %{fmudflap|fmudflapth:-fno-builtin -fno-merge-constants} %{coverage:-fprofile-arcs -ftest-coverage}

*cc1plus:


*link_gcc_c_sequence:
%G %L %G

*link_ssp:
%{fstack-protector:}

*endfile:
%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s

*link:
  %{m32:-m elf_i386_fbsd}   %{v:-V}   %{assert*} %{R*} %{rpath*} %{defsym*}   %{shared:-Bshareable %{h*} %{soname*}}     %{!shared:       %{!static:         %{rdynamic:-export-dynamic} 	%{!dynamic-linker:-dynamic-linker %(fbsd_dynamic_linker) }}     %{static:-Bstatic}}   %{symbolic:-Bsymbolic}

*lib:
							  %{!shared:								    %{!pg: %{pthread:-lpthread} -lc}					    %{pg:  %{pthread:-lpthread_p} -lc_p}				  }		 %{shared:								    %{!pg: %{pthread:-lpthread} -lc}					    %{pg:  %{pthread:-lpthread_p} -lc_p}				  }

*mfwrap:
 %{static: %{fmudflap|fmudflapth:  --wrap=malloc --wrap=free --wrap=calloc --wrap=realloc --wrap=mmap --wrap=munmap --wrap=alloca} %{fmudflapth: --wrap=pthread_create}} %{fmudflap|fmudflapth: --wrap=main}

*mflib:
%{fmudflap|fmudflapth: -export-dynamic}

*link_gomp:


*libgcc:
%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared:%{!shared-libgcc:-lgcc -lgcc_eh}%{shared-libgcc:-lgcc_s -lgcc}}%{shared:-lgcc_s}}}

*startfile:
%{!shared:      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} 		       %{!p:%{profile:gcrt1.o%s} 			 %{!profile:crt1.o%s}}}}    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}

*switches_need_spaces:


*cross_compile:
0

*version:
4.4.5

*multilib:
. ;

*multilib_defaults:


*multilib_extra:


*multilib_matches:


*multilib_exclusions:


*multilib_options:


*linker:
collect2

*link_libgcc:
%D

*md_exec_prefix:


*md_startfile_prefix:


*md_startfile_prefix_1:


*startfile_prefix_spec:


*sysroot_spec:
--sysroot=%R

*sysroot_suffix_spec:


*sysroot_hdrs_suffix_spec:


*cc1_cpu:
%{mcpu=*:-mtune=%* %n`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
} %<mcpu=* %{mintel-syntax:-masm=intel %n`-mintel-syntax' is deprecated. Use `-masm=intel' instead.
} %{mno-intel-syntax:-masm=att %n`-mno-intel-syntax' is deprecated. Use `-masm=att' instead.
}%{march=native:%<march=native %:local_cpu_detect(arch)   %{!mtune=*:%<mtune=native %:local_cpu_detect(tune)}} %{mtune=native:%<mtune=native %:local_cpu_detect(tune)}

*fbsd_dynamic_linker:
/libexec/ld-elf.so.1

*link_command:
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:    %(linker) %l %{pie:-pie} %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}    %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}    %{static:} %{L*} %(mfwrap) %(link_libgcc) %o    %{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)} %(mflib)    %{fprofile-arcs|fprofile-generate|coverage:-lgcov}    %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}


[-- Attachment #3: gcc44.specs.sig --]
[-- Type: application/octet-stream, Size: 287 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: update -pthread specs for FreeBSD
  2010-09-18 18:27 update -pthread specs for FreeBSD Andriy Gapon
@ 2010-09-18 19:43 ` Andriy Gapon
  2010-09-18 21:24   ` Andriy Gapon
  0 siblings, 1 reply; 7+ messages in thread
From: Andriy Gapon @ 2010-09-18 19:43 UTC (permalink / raw)
  To: gcc-patches; +Cc: Gerald Pfeifer

[-- Attachment #1: Type: text/plain, Size: 1092 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

on 18/09/2010 20:24 Andriy Gapon said the following:
> 
> 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

Apologies,

it looks like I messed up and attached the wrong file.
Here is the correct patch.

- -- 
Andriy Gapon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMlPZXAAoJEHSlLSemUf4vUAgIALN509mWpbkRy3/pZjFGMz7m
zVKsbh/bUypq2LXKMs9de0gCECSp6wxYsF3BgWaaRQqa7OMZTS+yJM7XZockeNKB
j7DrFF2Y17rMznNEqT7JTpHU4LZaRy991s23lWdbXHf5dVgZ98nlbnNYuxyUJCp0
QdTDp8IWpqEPqk4jtFDEAl1iXLWuXzKYK3SYypxalJnEtyJrzPvauvYlrHwLbyAK
uTrSD4wScVeunHtcmM6pOTZJ1DPWFbGFrXPEVbcB6wldsWpQnpWRMpLE4fbdiHG5
Dsg+fhFOZrho8opsq/NLK/eWdCzTWrpUFwl02LIMsdeLgNFFF6vvrUn4Ou0P2Uc=
=6Zob
-----END PGP SIGNATURE-----

[-- Attachment #2: gcc-fbsd-pthread-spec.patch --]
[-- Type: text/plain, Size: 406 bytes --]

--- 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:								\
+    %{!pg: %{pthread:-lpthread} -lc}					\
+    %{pg:  %{pthread:-lpthread_p} -lc_p}				\
   }"
 #endif
 #endif

[-- Attachment #3: gcc-fbsd-pthread-spec.patch.sig --]
[-- Type: application/octet-stream, Size: 287 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: update -pthread specs for FreeBSD
  2010-09-18 19:43 ` Andriy Gapon
@ 2010-09-18 21:24   ` Andriy Gapon
  2010-09-29 17:34     ` Gerald Pfeifer
  0 siblings, 1 reply; 7+ messages in thread
From: Andriy Gapon @ 2010-09-18 21:24 UTC (permalink / raw)
  To: gcc-patches; +Cc: Gerald Pfeifer

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

on 18/09/2010 20:26 Andriy Gapon said the following:
> on 18/09/2010 20:24 Andriy Gapon said the following:
> 
>> 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
> 
> Apologies,
> 
> it looks like I messed up and attached the wrong file.
> Here is the correct patch.
> 

Really bad evening, sorry again.
Now, hopefully it's the right patch.
Sorry for the noise and wasted time.

P.S. I partially blame Thunderbird for not having an option to preview an
attachment while composing an email.

- -- 
Andriy Gapon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMlPc4AAoJEHSlLSemUf4v1/MIAKR5R94btmwoSN2fg8XqbVPH
6rsbNLVzCxt6bca/ylLd5qL3M3Wzko+wMsWpL9z0ApsDE3ps+lXJYsJrln2TwjrQ
lEKz0KVcUESAbrTBbPjpBYcffBV6gHAIVmx3RStIifonldxewSZTM0lMx1HiSj/c
s/fhjrqP7LNDKm40c2gKzh4onj73zThaD+cT4uhN4t4E3eMCzyTi3Tc1m7bfih7k
UU71f/+xQ+D0uxGCSyUwB3Pe9V2+L4voj5jJEsQbGJjF6LTQRQbgGRch0d0y0Bso
T4tk6ARZOdoFwSeTaFI8GbTL1pl9ki4QTUahcIdNGeYlP/mJ8r+XpYV5fQO8I4s=
=EwG9
-----END PGP SIGNATURE-----

[-- Attachment #2: gcc-fbsd-pthread-spec.patch --]
[-- Type: text/plain, Size: 367 bytes --]

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

[-- Attachment #3: gcc-fbsd-pthread-spec.patch.sig --]
[-- Type: application/octet-stream, Size: 287 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: update -pthread specs for FreeBSD
  2010-09-18 21:24   ` Andriy Gapon
@ 2010-09-29 17:34     ` Gerald Pfeifer
  2010-09-29 21:31       ` Loren James Rittle
  0 siblings, 1 reply; 7+ messages in thread
From: Gerald Pfeifer @ 2010-09-29 17:34 UTC (permalink / raw)
  To: gcc-patches, Loren James Rittle; +Cc: Andriy Gapon

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: update -pthread specs for FreeBSD
  2010-09-29 17:34     ` Gerald Pfeifer
@ 2010-09-29 21:31       ` Loren James Rittle
  2011-02-14  4:17         ` Gerald Pfeifer
  0 siblings, 1 reply; 7+ messages in thread
From: Loren James Rittle @ 2010-09-29 21:31 UTC (permalink / raw)
  To: Gerald Pfeifer; +Cc: gcc-patches, ljrittle, avg

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: update -pthread specs for FreeBSD
  2010-09-29 21:31       ` Loren James Rittle
@ 2011-02-14  4:17         ` Gerald Pfeifer
  2011-02-26  1:42           ` Gerald Pfeifer
  0 siblings, 1 reply; 7+ messages in thread
From: Gerald Pfeifer @ 2011-02-14  4:17 UTC (permalink / raw)
  To: Loren James Rittle; +Cc: gcc-patches, Andriy Gapon

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: update -pthread specs for FreeBSD
  2011-02-14  4:17         ` Gerald Pfeifer
@ 2011-02-26  1:42           ` Gerald Pfeifer
  0 siblings, 0 replies; 7+ messages in thread
From: Gerald Pfeifer @ 2011-02-26  1:42 UTC (permalink / raw)
  To: Loren James Rittle; +Cc: gcc-patches, Andriy Gapon

On Mon, 14 Feb 2011, Gerald Pfeifer wrote:
> 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.

Now also on the gcc-4.5 branch, concrete patch below.

Gerald


2011-02-25  Andriy Gapon <avg@freebsd.org>

	PR target/45808
	* config/freebsd-spec.h (FBSD_LIB_SPEC): Handle the shared case.
	Update copyright years.


Index: config/freebsd-spec.h
===================================================================
--- config/freebsd-spec.h	(revision 170499)
+++ config/freebsd-spec.h	(working copy)
@@ -1,5 +1,6 @@
 /* Base configuration file for all FreeBSD targets.
-   Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007, 2009, 2011
+   Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -139,6 +140,9 @@
   %{!shared:								\
     %{!pg: %{pthread:-lpthread} -lc}					\
     %{pg:  %{pthread:-lpthread_p} -lc_p}				\
+  }									\
+  %{shared:								\
+    %{pthread:-lpthread} -lc						\
   }"
 #endif
 #endif

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-25 23:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-18 18:27 update -pthread specs for FreeBSD Andriy Gapon
2010-09-18 19:43 ` Andriy Gapon
2010-09-18 21:24   ` Andriy Gapon
2010-09-29 17:34     ` Gerald Pfeifer
2010-09-29 21:31       ` Loren James Rittle
2011-02-14  4:17         ` Gerald Pfeifer
2011-02-26  1:42           ` Gerald Pfeifer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).