summaryrefslogtreecommitdiff
path: root/scripts/showSamples.sh
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-05-30 05:32:38 (GMT)
committerAlexey Neyman <stilor@att.net>2017-07-08 17:57:56 (GMT)
commit567277099a487508fd228a4c56f3583db3fa96c9 (patch)
tree19b7f40c0f6e4e6284e799dbac1098bd8805dc2d /scripts/showSamples.sh
parent57426168ad2c7e8367786ed466c86f6aeb49b3c3 (diff)
Fix the references to old config variables
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/showSamples.sh')
-rw-r--r--scripts/showSamples.sh31
1 files changed, 23 insertions, 8 deletions
diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh
index 1e5d50b..b11a8d6 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} "