diff --git a/Makefile.system b/Makefile.system index 8843d0ad3..4cb4dc954 100644 --- a/Makefile.system +++ b/Makefile.system @@ -769,6 +769,9 @@ else FCOMMON_OPT += -m32 endif endif +ifneq ($(NO_LAPACKE), 1) +FCOMMON_OPT += -fno-second-underscore +endif endif endif diff --git a/f_check b/f_check index b05db85bd..0afbab23a 100644 --- a/f_check +++ b/f_check @@ -130,6 +130,11 @@ if ($compiler eq "") { if ($data =~ / zho_ge__/) { $need2bu = 1; } + if ($vendor =~ /G95/) { + if ($ENV{NO_LAPACKE} != 1) { + $need2bu = ""; + } + } } if ($vendor eq "") { @@ -277,6 +282,8 @@ $linker_a = ""; if ($link ne "") { $link =~ s/\-Y\sP\,/\-Y/g; + + $link =~ s/\-R+/\-rpath\@/g; $link =~ s/\-rpath\s+/\-rpath\@/g;