mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-20 17:12:55 +00:00
libc/glibc: fix retrieving version string
This commit is contained in:
parent
58a53e7bf6
commit
e46e74546d
@ -377,8 +377,11 @@ do_libc() {
|
||||
extra_config+=("$(do_libc_min_kernel_config)")
|
||||
|
||||
# Add some default CC args
|
||||
glibc_version_major=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^([[:digit:]]+).*/\1/')
|
||||
glibc_version_minor=$(echo ${CT_LIBC_VERSION} |sed -r -e 's/^[[:digit:]]+[\.-_]([[:digit:]]+).*/\1/')
|
||||
glibc_version="$( grep -E '\<VERSION\>' "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/version.h" \
|
||||
|cut -d '"' -f 2
|
||||
)"
|
||||
glibc_version_major=$(echo ${glibc_version} |sed -r -e 's/^([[:digit:]]+).*/\1/')
|
||||
glibc_version_minor=$(echo ${glibc_version} |sed -r -e 's/^[[:digit:]]+[\.-_]([[:digit:]]+).*/\1/')
|
||||
if [ ${glibc_version_major} -eq 2 -a ${glibc_version_minor} -ge 6 \
|
||||
-o ${glibc_version_major} -gt 2 ]; then
|
||||
# Don't use -pipe: configure chokes on it for glibc >= 2.6.
|
||||
|
Loading…
x
Reference in New Issue
Block a user