aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV/shared.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV/shared.rb b/Library/Homebrew/extend/ENV/shared.rb
index 57b9a7f1e..19af48698 100644
--- a/Library/Homebrew/extend/ENV/shared.rb
+++ b/Library/Homebrew/extend/ENV/shared.rb
@@ -203,6 +203,12 @@ module SharedEnvExtension
end
def fortran
+ # Ignore repeated calls to this function as it will misleadingly warn about
+ # building with an alternative Fortran compiler without optimization flags,
+ # despite it often being the Homebrew-provided one set up in the first call.
+ return if @fortran_setup_done
+ @fortran_setup_done = true
+
flags = []
if fc