diff --git a/c_check b/c_check index 371dbf615..872d84275 100644 --- a/c_check +++ b/c_check @@ -234,6 +234,11 @@ $linker_a = ""; $linker_L .= "-Wl,". $flags . " " } + if ($flags =~ /^\--exclude-libs/) { + $linker_L .= "-Wl,". $flags . " "; + $flags=""; + } + if ( ($flags =~ /^\-l/) && ($flags !~ /gfortranbegin/) diff --git a/f_check b/f_check index 2f01f1c44..ba3f47079 100644 --- a/f_check +++ b/f_check @@ -283,6 +283,12 @@ if ($link ne "") { $linker_L .= "-Wl,". $flags . " "; } + if ($flags =~ /^\--exclude-libs/) { + $linker_L .= "-Wl,". $flags . " "; + $flags=""; + } + + if ($flags =~ /^\-rpath\@/) { $flags =~ s/\@/\,/g; if ($vendor eq "PGI") {