Skip to content

Commit 3b624db

Browse files
committed
Enable convenience libraries for NAG.
Signed-off-by: Sergey Kosukhin <sergey.kosukhin@mpimet.mpg.de>
1 parent ad16407 commit 3b624db

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

autogen.pl

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,10 +1038,28 @@ sub patch_autotools_output {
10381038
whole_archive_flag_spec${tag}=
10391039
tmp_sharedflag='--shared' ;;
10401040
nagfor*) # NAGFOR 5.3
1041-
tmp_sharedflag='-Wl,-shared';;
1041+
tmp_sharedflag='-Wl,-shared' ;;
10421042
xl";
10431043

1044-
push(@verbose_out, $indent_str . "Patching configure for NAG compiler ($tag)\n");
1044+
push(@verbose_out, $indent_str . "Patching configure for NAG compiler #1 ($tag)\n");
1045+
$c =~ s/$search_string/$replace_string/;
1046+
1047+
# Newer versions of Libtool have the previous patch already. Therefore,
1048+
# we add the support for convenience libraries separetly
1049+
my $search_string = "whole_archive_flag_spec${tag}=" . '\n\s+' .
1050+
"tmp_sharedflag='--shared' ;;" . '\n\s+' .
1051+
'nagfor\052.*# NAGFOR 5.3\n\s+' .
1052+
"tmp_sharedflag='-Wl,-shared' ;;" . '\n\s+' .
1053+
'xl';
1054+
my $replace_string = "whole_archive_flag_spec${tag}=
1055+
tmp_sharedflag='--shared' ;;
1056+
nagfor*) # NAGFOR 5.3
1057+
whole_archive_flag_spec${tag}='\$wl--whole-archive`for conv in \$convenience\\\"\\\"; do test -n \\\"\$conv\\\" && new_convenience=\\\"\$new_convenience,\$conv\\\"; done; func_echo_all \\\"\$new_convenience\\\"` \$wl--no-whole-archive'
1058+
compiler_needs_object=yes
1059+
tmp_sharedflag='-Wl,-shared' ;;
1060+
xl";
1061+
1062+
push(@verbose_out, $indent_str . "Patching configure for NAG compiler #2 ($tag)\n");
10451063
$c =~ s/$search_string/$replace_string/;
10461064
}
10471065

0 commit comments

Comments
 (0)