fix: bump minimum glibcxx version for armhf remote server (#221259)

This commit is contained in:
Robo
2024-07-10 08:04:46 +09:00
committed by GitHub
parent 9e9393f107
commit cab98a1ca8
5 changed files with 32 additions and 36 deletions

View File

@@ -27,6 +27,7 @@ fi
ARCH=$(uname -m)
found_required_glibc=0
found_required_glibcxx=0
MIN_GLIBCXX_VERSION="3.4.25"
# Extract the ID value from /etc/os-release
if [ -f /etc/os-release ]; then
@@ -40,7 +41,10 @@ fi
# Based on https://github.com/bminor/glibc/blob/520b1df08de68a3de328b65a25b86300a7ddf512/elf/cache.c#L162-L245
case $ARCH in
x86_64) LDCONFIG_ARCH="x86-64";;
armv7l | armv8l) LDCONFIG_ARCH="hard-float";;
armv7l | armv8l)
MIN_GLIBCXX_VERSION="3.4.26"
LDCONFIG_ARCH="hard-float"
;;
arm64 | aarch64)
BITNESS=$(getconf LONG_BIT)
if [ "$BITNESS" = "32" ]; then
@@ -81,7 +85,7 @@ if [ "$OS_ID" != "alpine" ]; then
libstdcpp_real_path=$(readlink -f "$libstdcpp_path_line")
libstdcpp_version=$(grep -ao 'GLIBCXX_[0-9]*\.[0-9]*\.[0-9]*' "$libstdcpp_real_path" | sort -V | tail -1)
libstdcpp_version_number=$(echo "$libstdcpp_version" | sed 's/GLIBCXX_//')
if [ "$(printf '%s\n' "3.4.24" "$libstdcpp_version_number" | sort -V | head -n1)" = "3.4.24" ]; then
if [ "$(printf '%s\n' "$MIN_GLIBCXX_VERSION" "$libstdcpp_version_number" | sort -V | head -n1)" = "$MIN_GLIBCXX_VERSION" ]; then
found_required_glibcxx=1
break
fi
@@ -92,7 +96,7 @@ else
found_required_glibcxx=1
fi
if [ "$found_required_glibcxx" = "0" ]; then
echo "Warning: Missing GLIBCXX >= 3.4.25! from $libstdcpp_real_path"
echo "Warning: Missing GLIBCXX >= $MIN_GLIBCXX_VERSION! from $libstdcpp_real_path"
fi
if [ "$OS_ID" = "alpine" ]; then