]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Generally link to libgomp for -ftree-parallelize-loops=*.
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 7 Nov 2013 15:07:34 +0000 (16:07 +0100)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Thu, 7 Nov 2013 15:07:34 +0000 (16:07 +0100)
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

gcc/ChangeLog
gcc/config/arc/arc.h
gcc/config/ia64/hpux.h
gcc/config/pa/pa-hpux11.h
gcc/config/pa/pa64-hpux.h
gcc/gcc.c
libgomp/ChangeLog
libgomp/configure
libgomp/configure.ac
libgomp/libgomp.spec.in

index a4bb664c35e0e511f972a2d945221899cdf68385..cfb6036e7d10fa35604e8b60aae47d5c1dd756a4 100644 (file)
@@ -1,3 +1,13 @@
+2013-11-07  Thomas Schwinge  <thomas@codesourcery.com>
+
+       * 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.
+
 2013-11-07  Jakub Jelinek  <jakub@redhat.com>
 
        * tree-ssa-loop-niter.c: Include tree-ssanames.h.
index 637f7b66acc463f7f20051ee04220ee70093ba63..87908d41afc6976c74c008da4dc1a340caf69050 100644 (file)
@@ -174,7 +174,8 @@ along with GCC; see the file COPYING3.  If not see
     %(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*} }}}}}}"
index ca592e4bc263f8a77c93ab88ed0f6a9729c82079..517132c8e63e4cc442b8e67ea816d5af1fc9330d 100644 (file)
@@ -92,7 +92,7 @@ do {                                                  \
 #undef  LIB_SPEC
 #define LIB_SPEC \
   "%{!shared: \
-     %{mt|pthread:%{fopenmp:-lrt} -lpthread} \
+     %{mt|pthread:%{fopenmp|ftree-parallelize-loops=*:-lrt} -lpthread} \
      %{p:%{!mlp64:-L/usr/lib/hpux32/libp} \
         %{mlp64:-L/usr/lib/hpux64/libp} -lprof} \
      %{pg:%{!mlp64:-L/usr/lib/hpux32/libp} \
index c217398729a3dd46ca0b4bbeda56713cd44f804e..4da1b096a5050e81ff18d60231d663cef78fa7b8 100644 (file)
@@ -120,7 +120,8 @@ along with GCC; see the file COPYING3.  If not see
 #undef LIB_SPEC
 #define LIB_SPEC \
   "%{!shared:\
-     %{fopenmp:%{static:-a archive_shared} -lrt %{static:-a archive}}\
+     %{fopenmp|ftree-parallelize-loops=*:%{static:-a archive_shared} -lrt\
+       %{static:-a archive}}\
      %{mt|pthread:-lpthread} -lc\
      %{static:%{!nolibdld:-a archive_shared -ldld -a archive -lc}\
        %{!mt:%{!pthread:-a shared -lc -a archive}}}}\
index a3e21d3b6a029e0d75d4c46125ab0509c20f9f0b..9efc137c89e32db4444c4a4a07404d8c07a9378a 100644 (file)
@@ -58,19 +58,22 @@ along with GCC; see the file COPYING3.  If not see
 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_GNU_LD)
 #define LIB_SPEC \
   "%{!shared:\
-     %{!p:%{!pg:%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
+     %{!p:%{!pg:%{fopenmp|ftree-parallelize-loops=*:%{static:-a shared} -lrt\
+                  %{static:-a archive}}\
            %{mt|pthread:-lpthread} -lc\
            %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
                %{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
      %{p:%{!pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\
           -lprof %{static:-a archive}\
-          %{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
+          %{fopenmp|ftree-parallelize-loops=*:%{static:-a shared} -lrt\
+             %{static:-a archive}}\
           %{mt|pthread:-lpthread} -lc\
           %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
                %{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
      %{pg:%{static:%{!mhp-ld:-a shared}%{mhp-ld:-a archive_shared}}\
        -lgprof %{static:-a archive}\
-       %{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
+       %{fopenmp|ftree-parallelize-loops=*:%{static:-a shared} -lrt\
+         %{static:-a archive}}\
        %{mt|pthread:-lpthread} -lc\
        %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
                %{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
@@ -78,19 +81,22 @@ along with GCC; see the file COPYING3.  If not see
 #else
 #define LIB_SPEC \
   "%{!shared:\
-     %{!p:%{!pg:%{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
+     %{!p:%{!pg:%{fopenmp|ftree-parallelize-loops=*:%{static:-a shared} -lrt\
+                  %{static:-a archive}}\
            %{mt|pthread:-lpthread} -lc\
            %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
                %{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
      %{p:%{!pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\
           -lprof %{static:-a archive}\
-          %{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
+          %{fopenmp|ftree-parallelize-loops=*:%{static:-a shared} -lrt\
+             %{static:-a archive}}\
           %{mt|pthread:-lpthread} -lc\
           %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
                %{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
      %{pg:%{static:%{mgnu-ld:-a shared}%{!mgnu-ld:-a archive_shared}}\
        -lgprof %{static:-a archive}\
-       %{fopenmp:%{static:-a shared} -lrt %{static:-a archive}}\
+       %{fopenmp|ftree-parallelize-loops=*:%{static:-a shared} -lrt\
+         %{static:-a archive}}\
        %{mt|pthread:-lpthread} -lc\
        %{static:%{!nolibdld:-a shared -ldld -a archive -lc}\
                %{!mt:%{!pthread:-a shared -lc -a archive}}}}}\
index 83607e55f9eb84181bae54b4d5ad102df3c4d9d2..dff7477f54e1c60dad0616b97f1bfded63eaf042 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -924,7 +924,7 @@ static const char *const multilib_defaults_raw[] = MULTILIB_DEFAULTS;
 #define DRIVER_SELF_SPECS ""
 #endif
 
-/* Adding -fopenmp should imply pthreads.  This is particularly important
+/* Linking to libgomp implies pthreads.  This is particularly important
    for targets that use different start files and suchlike.  */
 #ifndef GOMP_SELF_SPECS
 #define GOMP_SELF_SPECS "%{fopenmp|ftree-parallelize-loops=*: -pthread}"
index e04c56a45a2c06861e9f2e9df6bca8c2c2510d5c..507a589200eceb7549bab954a38044746b5bc66f 100644 (file)
@@ -1,3 +1,9 @@
+2013-11-07  Thomas Schwinge  <thomas@codesourcery.com>
+
+       * libgomp.spec.in: Update comment about libgomp's dependencies.
+       * configure.ac: Likewise.
+       * configure: Regenerate.
+
 2013-10-16  Tobias Burnus  <burnus@net-b.de>
 
        * libgomp.texi: (Runtime Library Routines): Update references for
index 06276e132220ede8cf4ce81f9f97766b999a00e4..766eb098089fbc148c91f7a3ebb1139667ac85cc 100755 (executable)
@@ -16154,7 +16154,7 @@ else
 fi
 
 # Set up the set of libraries that we need to link against for libgomp.
-# Note that the GOMP_SELF_SPEC in gcc.c will force -pthread for -fopenmp,
+# Note that the GOMP_SELF_SPEC in gcc.c may force -pthread,
 # which will force linkage against -lpthread (or equivalent for the system).
 # That's not 100% ideal, but about the best we can do easily.
 if test $enable_shared = yes; then
index e7fbb31d74a569c8c842fe45027a01c57bd2508c..84d250f0b19a237538ff2be3d9810a3c32e99adf 100644 (file)
@@ -274,7 +274,7 @@ else
 fi
 
 # Set up the set of libraries that we need to link against for libgomp.
-# Note that the GOMP_SELF_SPEC in gcc.c will force -pthread for -fopenmp,
+# Note that the GOMP_SELF_SPEC in gcc.c may force -pthread,
 # which will force linkage against -lpthread (or equivalent for the system).
 # That's not 100% ideal, but about the best we can do easily.
 if test $enable_shared = yes; then
index b7319f33a534bc99370eb5e5bfbbbaada59db08b..5651603f48745617e9aa7de5f07d2a618a18caad 100644 (file)
@@ -1,3 +1,3 @@
 # This spec file is read by gcc when linking.  It is used to specify the
-# standard libraries we need in order to link with -fopenmp.
+# standard libraries we need in order to link with libgomp.
 *link_gomp: @link_gomp@