summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStacey Marshall <stacey.marshall@oracle.com>2022-02-05 15:36:36 -0600
committerAlex Ameen <alex.ameen.tx@gmail.com>2022-02-05 15:36:36 -0600
commitb55b1cc8419b544b5cc3e1c204b2ce85112ed762 (patch)
tree361b3119103890d15c395d3b0a3d01e2b2b0f555
parent960a33e460e0abbdd93107e0f211e1ffc0f0b62c (diff)
downloadlibtool-b55b1cc8419b544b5cc3e1c204b2ce85112ed762.tar.gz
libtool: Do not pass '-pthread' to Solaris linker.
* build-aux/ltmain.in: Do not add -pthread to inherited linker flags on Solaris systems. Copyright-paperwork-exempt: Yes
-rw-r--r--build-aux/ltmain.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index e4efc925..b33a0ff9 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -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"