mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-20 05:17:54 +00:00
libc/glibc: get the version string from version.h
We can not rely on the user-provided version string (be it via the choice, or manually entered), so fallback to reading version.h, which is both reliable and always present.
This commit is contained in:
parent
e3a4063ac6
commit
958138fff1
@ -268,8 +268,11 @@ do_libc_start_files() {
|
||||
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…
Reference in New Issue
Block a user