Avoid linking both GNU libgomp and LLVM libomp in clang/gfortran builds
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Thu, 3 Dec 2020 20:25:57 +0000 (21:25 +0100)
committerGitHub <noreply@github.com>
Thu, 3 Dec 2020 20:25:57 +0000 (21:25 +0100)
f_check

diff --git a/f_check b/f_check
index 9ef7b80..cb869b3 100644 (file)
--- a/f_check
+++ b/f_check
@@ -330,6 +330,9 @@ if ($link ne "") {
            $flags =~ s/\@/\,/g;
            $linker_L .= "-Wl,". $flags . " " ;
        }
+       if ($flags =~ /-lgomp/ && $CC == /clang/) {
+           $flags = "-lomp";
+       }
 
        if (
            ($flags =~ /^\-l/)