Skip to content

Commit c719a85

Browse files
committed
[flang] Relax the Bash version check
As per flang-compiler/f18-llvm-project#1344, the `flang` bash script works fine with 4.4.19 and requiring 4.4.23 is too restrictive. Rather than keep updating the patch level, this patch removes this particular check (so that it will only check the major and minor versions instead). As this is both rather straightforward and urgent, I'm merging this without a review.
1 parent 4746e38 commit c719a85

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

flang/tools/f18/flang

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# * use the external compiler (defined via FLANG_FC environment variable) to
1414
# compile the unparsed source files
1515
#
16-
# Tested with Bash 4.4.23. This script will exit immediately if you use an
16+
# Tested with Bash 4.4. This script will exit immediately if you use an
1717
# older version of Bash.
1818
#===------------------------------------------------------------------------===#
1919
set -euo pipefail
@@ -31,22 +31,17 @@ PRINT_VERSION="False"
3131
# === check_bash_version ======================================================
3232
#
3333
# Checks the Bash version that's used to run this script. Exits immediately if
34-
# it's lower than 4.4.23
34+
# it's lower than 4.4
3535
# =============================================================================
3636
check_bash_version() {
37-
message="Error: Your Bash is too old. Please use Bash >= 4.4.23"
37+
message="Error: Your Bash is too old. Please use Bash >= 4.4"
3838
# Major version
3939
[[ "${BASH_VERSINFO[0]:-0}" -lt 4 ]] && echo $message && exit 1
4040

4141
# Minor version
4242
if [[ "${BASH_VERSINFO[0]}" == 4 ]]; then
4343
[[ "${BASH_VERSINFO[1]:-0}" -lt 4 ]] && echo $message && exit 1
4444
fi
45-
46-
# Patch version
47-
if [[ "${BASH_VERSINFO[0]}" == 4 ]] && [[ "${BASH_VERSINFO[1]}" == 4 ]] ; then
48-
[[ "${BASH_VERSINFO[2]:-0}" -lt 23 ]] && echo $message && exit 1
49-
fi
5045
}
5146

5247
# === parse_args ==============================================================

0 commit comments

Comments
 (0)