Skip to content

Commit ad16407

Browse files
committed
Update Libtool patch for NAG.
Signed-off-by: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
1 parent 0f41608 commit ad16407

File tree

1 file changed

+33
-11
lines changed

1 file changed

+33
-11
lines changed

config/ltmain_nag_pthread.diff

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,40 @@
11
--- config/ltmain.sh
22
+++ config/ltmain.sh
3-
@@ -6417,8 +6417,14 @@
4-
func_source "$lib"
5-
3+
@@ -7862,6 +7862,13 @@ func_mode_link ()
64
# Convert "-framework foo" to "foo.ltframework"
7-
+ # and "-pthread" to "-Wl,-pthread" if NAG compiler
85
if test -n "$inherited_linker_flags"; then
9-
- tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
10-
+ case "$CC" in
11-
+ *nagfor*)
12-
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g' | $SED 's/-pthread/-Wl,-pthread/g'`;;
13-
+ *)
14-
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`;;
15-
+ esac
6+
tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
7+
+
8+
+ # Additionally convert " -pthread" to " -Wl,-pthread" for nagfor
9+
+ func_cc_basename $CC
10+
+ case $func_cc_basename_result in
11+
+ nagfor*) tmp_inherited_linker_flags=`$ECHO "$tmp_inherited_linker_flags" | $SED 's/ -pthread/ -Wl,-pthread/g'` ;;
12+
+ esac
13+
+
1614
for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
1715
case " $new_inherited_linker_flags " in
1816
*" $tmp_inherited_linker_flag "*) ;;
17+
@@ -8881,7 +8888,8 @@ func_mode_link ()
18+
xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
19+
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
20+
# On Darwin other compilers
21+
- case $CC in
22+
+ func_cc_basename $CC
23+
+ case $func_cc_basename_result in
24+
nagfor*)
25+
verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
26+
;;
27+
@@ -9493,6 +9501,13 @@ EOF
28+
;;
29+
esac
30+
31+
+ # Time to revert the changes made for nagfor.
32+
+ func_cc_basename $CC
33+
+ case $func_cc_basename_result in
34+
+ nagfor*)
35+
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% -Wl,-pthread% -pthread%g'` ;;
36+
+ esac
37+
+
38+
# move library search paths that coincide with paths to not yet
39+
# installed libraries to the beginning of the library search list
40+
new_libs=

0 commit comments

Comments
 (0)