Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Commit de14871

Browse files
tschwingeThomas Schwinge
authored and
Thomas Schwinge
committed
Generally link to libgomp for -ftree-parallelize-loops=*.
gcc/ * config/arc/arc.h (LINK_COMMAND_SPEC): For -ftree-parallelize-loops=*, link to libgomp and its dependencies. * config/ia64/hpux.h (LIB_SPEC): Likewise. * config/pa/pa-hpux11.h (LIB_SPEC): Likewise. * config/pa/pa64-hpux.h (LIB_SPEC): Likewise. * gcc.c (GOMP_SELF_SPECS): Update comment about libgomp's dependencies. libgomp/ * libgomp.spec.in: Update comment about libgomp's dependencies. * configure.ac: Likewise. * configure: Regenerate. From-SVN: r204517
1 parent 7190fdc commit de14871

File tree

10 files changed

+37
-13
lines changed

10 files changed

+37
-13
lines changed

gcc/ChangeLog

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2013-11-07 Thomas Schwinge <[email protected]>
2+
3+
* config/arc/arc.h (LINK_COMMAND_SPEC): For
4+
-ftree-parallelize-loops=*, link to libgomp and its dependencies.
5+
* config/ia64/hpux.h (LIB_SPEC): Likewise.
6+
* config/pa/pa-hpux11.h (LIB_SPEC): Likewise.
7+
* config/pa/pa64-hpux.h (LIB_SPEC): Likewise.
8+
* gcc.c (GOMP_SELF_SPECS): Update comment about libgomp's
9+
dependencies.
10+
111
2013-11-07 Jakub Jelinek <[email protected]>
212

313
* tree-ssa-loop-niter.c: Include tree-ssanames.h.

gcc/config/arc/arc.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ along with GCC; see the file COPYING3. If not see
174174
%(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
175175
%{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
176176
%{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
177-
%{fopenmp:%:include(libgomp.spec)%(link_gomp)} %(mflib)\
177+
%{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
178+
%(mflib)\
178179
%{fprofile-arcs|fprofile-generate|coverage:-lgcov}\
179180
%{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
180181
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}"

gcc/config/ia64/hpux.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ do { \
9292
#undef LIB_SPEC
9393
#define LIB_SPEC \
9494
"%{!shared: \
95-
%{mt|pthread:%{fopenmp:-lrt} -lpthread} \
95+
%{mt|pthread:%{fopenmp|ftree-parallelize-loops=*:-lrt} -lpthread} \
9696
%{p:%{!mlp64:-L/usr/lib/hpux32/libp} \
9797
%{mlp64:-L/usr/lib/hpux64/libp} -lprof} \
9898
%{pg:%{!mlp64:-L/usr/lib/hpux32/libp} \

gcc/config/pa/pa-hpux11.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ along with GCC; see the file COPYING3. If not see
120120
#undef LIB_SPEC
121121
#define LIB_SPEC \
122122
"%{!shared:\
123-
%{fopenmp:%{static:-a archive_shared} -lrt %{static:-a archive}}\
123+
%{fopenmp|ftree-parallelize-loops=*:%{static:-a archive_shared} -lrt\
124+
%{static:-a archive}}\
124125
%{mt|pthread:-lpthread} -lc\
125126
%{static:%{!nolibdld:-a archive_shared -ldld -a archive -lc}\
126127
%{!mt:%{!pthread:-a shared -lc -a archive}}}}\

gcc/config/pa/pa64-hpux.h

+12-6
Original file line numberDiff line numberDiff line change
@@ -58,39 +58,45 @@ along with GCC; see the file COPYING3. If not see
5858
#if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GNU_LD)
5959
#define LIB_SPEC \
6060
"%{!shared:\
61-
%{!p:%{!pg:%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
61+
%{!p:%{!pg:%{fopenmp|ftree-parallelize-loops=*:%{static:-a shared} -lrt\
62+
%{static:-a archive}}\
6263
%{mt|pthread:-lpthread} -lc\
6364
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
6465
%{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
6566
%{p:%{!pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\
6667
-lprof %{static:-a archive}\
67-
%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
68+
%{fopenmp|ftree-parallelize-loops=*:%{static:-a shared} -lrt\
69+
%{static:-a archive}}\
6870
%{mt|pthread:-lpthread} -lc\
6971
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
7072
%{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
7173
%{pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\
7274
-lgprof %{static:-a archive}\
73-
%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
75+
%{fopenmp|ftree-parallelize-loops=*:%{static:-a shared} -lrt\
76+
%{static:-a archive}}\
7477
%{mt|pthread:-lpthread} -lc\
7578
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
7679
%{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
7780
%{shared:%{mt|pthread:-lpthread}}"
7881
#else
7982
#define LIB_SPEC \
8083
"%{!shared:\
81-
%{!p:%{!pg:%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
84+
%{!p:%{!pg:%{fopenmp|ftree-parallelize-loops=*:%{static:-a shared} -lrt\
85+
%{static:-a archive}}\
8286
%{mt|pthread:-lpthread} -lc\
8387
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
8488
%{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
8589
%{p:%{!pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\
8690
-lprof %{static:-a archive}\
87-
%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
91+
%{fopenmp|ftree-parallelize-loops=*:%{static:-a shared} -lrt\
92+
%{static:-a archive}}\
8893
%{mt|pthread:-lpthread} -lc\
8994
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
9095
%{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
9196
%{pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\
9297
-lgprof %{static:-a archive}\
93-
%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
98+
%{fopenmp|ftree-parallelize-loops=*:%{static:-a shared} -lrt\
99+
%{static:-a archive}}\
94100
%{mt|pthread:-lpthread} -lc\
95101
%{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
96102
%{!mt:%{!pthread:-a shared -lc -a archive}}}}}\

gcc/gcc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ static const char *const multilib_defaults_raw[] = MULTILIB_DEFAULTS;
924924
#define DRIVER_SELF_SPECS ""
925925
#endif
926926

927-
/* Adding -fopenmp should imply pthreads. This is particularly important
927+
/* Linking to libgomp implies pthreads. This is particularly important
928928
for targets that use different start files and suchlike. */
929929
#ifndef GOMP_SELF_SPECS
930930
#define GOMP_SELF_SPECS "%{fopenmp|ftree-parallelize-loops=*: -pthread}"

libgomp/ChangeLog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2013-11-07 Thomas Schwinge <[email protected]>
2+
3+
* libgomp.spec.in: Update comment about libgomp's dependencies.
4+
* configure.ac: Likewise.
5+
* configure: Regenerate.
6+
17
2013-10-16 Tobias Burnus <[email protected]>
28

39
* libgomp.texi: (Runtime Library Routines): Update references for

libgomp/configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -16154,7 +16154,7 @@ else
1615416154
fi
1615516155

1615616156
# Set up the set of libraries that we need to link against for libgomp.
16157-
# Note that the GOMP_SELF_SPEC in gcc.c will force -pthread for -fopenmp,
16157+
# Note that the GOMP_SELF_SPEC in gcc.c may force -pthread,
1615816158
# which will force linkage against -lpthread (or equivalent for the system).
1615916159
# That's not 100% ideal, but about the best we can do easily.
1616016160
if test $enable_shared = yes; then

libgomp/configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ else
274274
fi
275275

276276
# Set up the set of libraries that we need to link against for libgomp.
277-
# Note that the GOMP_SELF_SPEC in gcc.c will force -pthread for -fopenmp,
277+
# Note that the GOMP_SELF_SPEC in gcc.c may force -pthread,
278278
# which will force linkage against -lpthread (or equivalent for the system).
279279
# That's not 100% ideal, but about the best we can do easily.
280280
if test $enable_shared = yes; then

libgomp/libgomp.spec.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# This spec file is read by gcc when linking. It is used to specify the
2-
# standard libraries we need in order to link with -fopenmp.
2+
# standard libraries we need in order to link with libgomp.
33
*link_gomp: @link_gomp@

0 commit comments

Comments
 (0)