This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Fix autopar link and include options for libgomp
- From: "Sebastian Pop" <sebpop at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>, "Jakub Jelinek" <jakub at redhat dot com>
- Date: Tue, 15 Jan 2008 21:06:19 -0600
- Subject: [patch] Fix autopar link and include options for libgomp
Hi,
This is the last part of the patch for fixing the autoparallelization.
It adds the include and link options for libgomp. Regstrapped on both
i686-linux and amd64-linux. Okay for trunk?
Thank you,
--
Sebastian
AMD - GNU Tools
2008-01-12 Sebastian Pop <sebastian.pop@amd.com>
* gcc.c (LINK_COMMAND_SPEC): Add includes and link options for
libgomp when compiling with ftree-parallelize-loops.
(GOMP_SELF_SPECS): Add -pthread for ftree-parallelize-loops.
Index: gcc.c
===================================================================
--- gcc.c (revision 131555)
+++ gcc.c (working copy)
@@ -721,7 +721,7 @@ proper position among the other output f
%(linker) %l " LINK_PIE_SPEC "%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:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
+ %{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*} }}}}}}"
@@ -870,7 +870,7 @@ static const char *const multilib_defaul
/* Adding -fopenmp should imply pthreads. This is particularly important
for targets that use different start files and suchlike. */
#ifndef GOMP_SELF_SPECS
-#define GOMP_SELF_SPECS "%{fopenmp: -pthread}"
+#define GOMP_SELF_SPECS "%{fopenmp|ftree-parallelize-loops=*: -pthread}"
#endif
static const char *const driver_self_specs[] = {