]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Don't filter OPENMP flags (-openmp & -fopenmp) from linker lines.
authorJustin Lecher <jlec@gentoo.org>
Mon, 14 Mar 2011 07:40:50 +0000 (08:40 +0100)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 22 Mar 2011 06:47:10 +0000 (07:47 +0100)
If -fopenmp if passed to gcc during linking, it will take care to add all
necessary libs to link correctly for openmp support. Currently libtool filters
those flags, similar as it was the case with the threading flags. This change
handles the situation for the openmp support similar as before the thread
support was fixed.

http://lists.gnu.org/archive/html/bug-libtool/2010-12/msg00009.html
http://lists.gnu.org/archive/html/bug-libtool/2011-03/msg00014.html

* libltdl/config/ltmain.m4sh (func_mode_link): Treat OpenMP
flags like pthreads flags.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
libltdl/config/ltmain.m4sh

index 4ed09a39caddb41eb1b9c4e82008eab9d9fc56ee..bc7c2afc99a451858cd44bc5484cd17e9daee56c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-03-22  Justin Lecher  <jlec@gentoo.org>  (tiny change)
+           Rhys Ulerich  <rhys.ulerich@gmail.com>  (tiny change)
+
+       Don't filter OPENMP flags (-openmp & -fopenmp) from linker lines.
+       * libltdl/config/ltmain.m4sh (func_mode_link): Treat OpenMP
+       flags like pthreads flags.
+
 2011-03-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        libtoolize: detect -I<dir> (without space) in ACLOCAL_AMFLAGS.
index 766777fe26960adbbbcf843ab2e13b3adea3559e..9358ec5e82825d50a09594ab804f5891ce485b52 100644 (file)
@@ -4865,7 +4865,8 @@ func_mode_link ()
        continue
        ;;
 
-      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+      |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
        func_append compiler_flags " $arg"
        func_append compile_command " $arg"
        func_append finalize_command " $arg"
@@ -5369,7 +5370,8 @@ func_mode_link ()
        lib=
        found=no
        case $deplib in
-       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+       -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+        |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
          if test "$linkmode,$pass" = "prog,link"; then
            compile_deplibs="$deplib $compile_deplibs"
            finalize_deplibs="$deplib $finalize_deplibs"