[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libtool should not pass option '-pthread' to Solaris link-editor.
From: |
Stacey Marshall |
Subject: |
libtool should not pass option '-pthread' to Solaris link-editor. |
Date: |
Fri, 07 Jan 2022 15:19:16 +0000 |
Hi,
Following up on libtool bug 34076:
Patch to libtool for solaris 11.4 link-editor which rejects -pthread option
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34076
with this email to libtool-patches@gnu.org as documented on
https://www.gnu.org/software/libtool/contribute.html
FYI that requirement is not documented at time of posting on
https://www.gnu.org/software/libtool/manual/html_node/Reporting-bugs.html
This same issue is posted to savannah as
https://savannah.gnu.org/support/index.php?110542
The patch provided below is copied from savannah.
libtool should not pass option '-pthread' to Solaris link-editor.
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
index 0f0a2da3f9..7c8bcfd9d2 100644
--- a/build-aux/ltmain.sh
+++ b/build-aux/ltmain.sh
@@ -7070,7 +7070,21 @@ func_mode_link ()
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"
Mr. Stacey Marshall - Principal Software Engineer
Oracle Global Services Limited
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- libtool should not pass option '-pthread' to Solaris link-editor.,
Stacey Marshall <=