Skip to content

Commit 911c3e2

Browse files
authored
Improve support for g95 and non-GNU ld
Auto-add "-fno-second-underscore" option to make LAPACKE compile (as it calls LAPACK functions that may have gotten a second underscore added otherwise). Also support -R for rpath when parsing compiler directives in f_check
1 parent 3a39062 commit 911c3e2

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Makefile.system

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,9 @@ else
769769
FCOMMON_OPT += -m32
770770
endif
771771
endif
772+
ifneq ($(NO_LAPACKE), 1)
773+
FCOMMON_OPT += -fno-second-underscore
774+
endif
772775
endif
773776
endif
774777

f_check

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ if ($compiler eq "") {
130130
if ($data =~ / zho_ge__/) {
131131
$need2bu = 1;
132132
}
133+
if ($vendor =~ /G95/) {
134+
if ($ENV{NO_LAPACKE} != 1) {
135+
$need2bu = "";
136+
}
137+
}
133138
}
134139

135140
if ($vendor eq "") {
@@ -277,6 +282,8 @@ $linker_a = "";
277282
if ($link ne "") {
278283

279284
$link =~ s/\-Y\sP\,/\-Y/g;
285+
286+
$link =~ s/\-R+/\-rpath\@/g;
280287

281288
$link =~ s/\-rpath\s+/\-rpath\@/g;
282289

0 commit comments

Comments
 (0)