diff options
Diffstat (limited to 'scripts/showSamples.sh')
-rw-r--r-- | scripts/showSamples.sh | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh index 1e5d50bd..b11a8d6b 100644 --- a/scripts/showSamples.sh +++ b/scripts/showSamples.sh @@ -20,16 +20,30 @@ dump_single_sample() { [ "$1" = "-v" ] && verbose=1 && shift [ "$1" = "-w" ] && wiki=1 && shift local sample="$1" + # TBD use CT_LoadConfig . $(pwd)/.config.sample # libc needs some love + # TBD after conversion of gen-kconfig to template, use CT_LIBC_USE as a selector for other variables + # (i.e. whether to use CT_GLIBC_VERSION or CT_MUSL_VERSION) local libc_name="${CT_LIBC}" - local libc_ver="${CT_LIBC_VERSION}" - if [ "${CT_LIBC}" = "uClibc" -a "${CT_LIBC_UCLIBC_NG}" = "y" ]; then - libc_name="uClibc-ng" - elif [ "${CT_LIBC}" = "mingw" ]; then - libc_ver="${CT_WINAPI_VERSION}" - fi + local libc_ver ksym + + ksym=${libc_name//[^0-9A-Za-z_]/_} + ksym=${ksym^^} + case ${ksym} in + GLIBC|NEWLIB) + if eval "[ \"\${CT_${ksym}_USE_LINARO}\" = y ]"; then + ksym="${ksym}_LINARO" + fi + ;; + UCLIBC) + if [ "${UCLIBC_NG_USE_UCLIBC_NG_ORG}" = y ]; then + ksym="${ksym}_NG" + fi + ;; + esac + eval "libc_ver=\"\${CT_${ksym}_VERSION}\"" case "${sample}" in current) @@ -63,7 +77,8 @@ dump_single_sample() { printf " %-*s : %s\n" ${width} "Host" "${CT_HOST}" ;; esac - printf " %-*s : %s\n" ${width} "OS" "${CT_KERNEL}${CT_KERNEL_VERSION:+-}${CT_KERNEL_VERSION}" + # TBD currently only Linux is used. General handling for single-select (compiler/binutils/libc/os) and multi-select (debug/companions) components? + printf " %-*s : %s\n" ${width} "OS" "${CT_KERNEL}${CT_LINUX_VERSION:+-}${CT_LINUX_VERSION}" if [ -n "${CT_GMP}" \ -o -n "${CT_MPFR}" \ -o -n "${CT_ISL}" \ @@ -139,7 +154,7 @@ dump_single_sample() { if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" = "y" ]; then printf " //custom// " else - printf " ${CT_KERNEL_VERSION} " + printf " ${CT_LINUX_VERSION} " fi fi printf "| ${CT_BINUTILS_VERSION} " |