julia: fix gfortran version detection (#28741)

This commit is contained in:
Harmen Stoppels 2022-02-03 10:37:14 +01:00 committed by GitHub
parent 18b83c3833
commit 2ada0fa5a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,22 @@
From 23b8403586be314449c42b35b85d45be16a02373 Mon Sep 17 00:00:00 2001
From: Harmen Stoppels <harmenstoppels@gmail.com>
Date: Thu, 3 Feb 2022 01:56:41 +0100
Subject: [PATCH] Fix detection of LIBGFORTRAN_VERSION
---
Make.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Make.inc b/Make.inc
index 6b9db8d9fa33..ec956d1d0c86 100644
--- a/Make.inc
+++ b/Make.inc
@@ -1140,7 +1140,7 @@ endif
# Auto-detect triplet once, create different versions that we use as defaults below for each BB install target
FC_VERSION := $(shell $(FC) --version 2>/dev/null | head -1)
-FC_OR_CC_VERISON := $(or $(FC_VERSION),$(shell $(CC) --version 2>/dev/null | head -1))
+FC_OR_CC_VERSION := $(or $(FC_VERSION),$(shell $(CC) --version 2>/dev/null | head -1))
BB_TRIPLET_LIBGFORTRAN_CXXABI := $(shell $(call invoke_python,$(JULIAHOME)/contrib/normalize_triplet.py) $(or $(XC_HOST),$(XC_HOST),$(BUILD_MACHINE)) "$(FC_OR_CC_VERSION)" "$(or $(shell echo '\#include <string>' | $(CXX) $(CXXFLAGS) -x c++ -dM -E - | grep _GLIBCXX_USE_CXX11_ABI | awk '{ print $$3 }' ),1)")
BB_TRIPLET_LIBGFORTRAN := $(subst $(SPACE),-,$(filter-out cxx%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI))))
BB_TRIPLET_CXXABI := $(subst $(SPACE),-,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI))))

View File

@ -117,6 +117,9 @@ class Julia(MakefilePackage):
patch('julia-1.6-system-libwhich-and-p7zip-symlink.patch', when='@1.6.0:1.6')
patch('use-add-rpath.patch')
# Fix gfortran abi detection https://github.com/JuliaLang/julia/pull/44026
patch('fix-gfortran.patch', when='@1.7.0:1.7.1')
def patch(self):
# The system-libwhich-libblastrampoline.patch causes a rebuild of docs as it
# touches the main Makefile, so we reset the a/m-time to doc/_build's.