]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: Do not pass '-pthread' to Solaris linker.
authorStacey Marshall <stacey.marshall@oracle.com>
Sat, 5 Feb 2022 21:36:36 +0000 (15:36 -0600)
committerAlex Ameen <alex.ameen.tx@gmail.com>
Sat, 5 Feb 2022 21:36:36 +0000 (15:36 -0600)
* build-aux/ltmain.in: Do not add -pthread to inherited linker flags on
Solaris systems.

Copyright-paperwork-exempt: Yes

build-aux/ltmain.in

index e4efc925bcfe97e7f3ad897670f3ba669309ee4b..b33a0ff9027ce6747206a9b184d38695859621cf 100644 (file)
@@ -5183,8 +5183,20 @@ func_mode_link ()
        prev=xcompiler
        continue
        ;;
-
-      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
+     # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199.
+     -pthread)
+       case $host in
+         *solaris2*) ;;
+         *)
+           case "$new_inherited_linker_flags " in
+               *" $arg "*) ;;
+               * ) func_append new_inherited_linker_flags " $arg" ;;
+           esac
+         ;;
+       esac
+       continue
+       ;;
+      -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \
       |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
        func_append compiler_flags " $arg"
        func_append compile_command " $arg"