ltmain_sh.patch 747 Bytes
Newer Older
1
diff --git a/config/ltmain.sh b/config/ltmain.sh
2
index 0f0a2da..4126a5b 100644
3
4
--- a/config/ltmain.sh
+++ b/config/ltmain.sh
5
@@ -7859,6 +7859,14 @@ func_mode_link ()
6
7
8
9
 	# Read the .la file
 	func_source "$lib"
 
+	# Change -pthread to -Wl,-pthread for nagfor
10
11
12
13
14
15
+        if test -n "$inherited_linker_flags"; then
+          func_cc_basename "$CC"
+          case $func_cc_basename_result in
+            nagfor*) inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/ -pthread/ -Wl,-pthread/g'` ;;
+          esac
+        fi
16
17
18
19
+
 	# Convert "-framework foo" to "foo.ltframework"
 	if test -n "$inherited_linker_flags"; then
 	  tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`