2007-05-08 10:57:34 +00:00
|
|
|
# Parses all samples on the command line, and for each of them, prints
|
|
|
|
# the versions of the main tools
|
|
|
|
|
2009-02-01 18:43:45 +00:00
|
|
|
# Use tools discovered by ./configure
|
2012-01-16 22:36:42 +00:00
|
|
|
. "${CT_LIB_DIR}/paths.sh"
|
2009-02-01 18:43:45 +00:00
|
|
|
|
2008-06-15 19:25:51 +00:00
|
|
|
[ "$1" = "-v" ] && opt="$1" && shift
|
|
|
|
[ "$1" = "-w" ] && opt="$1" && shift
|
2012-07-23 20:02:23 +00:00
|
|
|
[ "$1" = "-W" ] && opt="$1" && shift
|
2008-05-02 21:49:43 +00:00
|
|
|
|
2007-05-08 10:57:34 +00:00
|
|
|
# GREP_OPTIONS screws things up.
|
|
|
|
export GREP_OPTIONS=
|
|
|
|
|
|
|
|
# Dump a single sample
|
2012-05-07 19:37:59 +00:00
|
|
|
# Note: we use the specific .config.sample config file
|
2007-05-08 10:57:34 +00:00
|
|
|
dump_single_sample() {
|
2008-05-02 21:49:43 +00:00
|
|
|
local verbose=0
|
2012-07-23 20:02:23 +00:00
|
|
|
local wiki=0
|
2010-02-17 22:47:47 +00:00
|
|
|
local complibs
|
2008-05-02 21:49:43 +00:00
|
|
|
[ "$1" = "-v" ] && verbose=1 && shift
|
2008-06-15 19:25:51 +00:00
|
|
|
[ "$1" = "-w" ] && wiki=1 && shift
|
2012-07-23 20:02:23 +00:00
|
|
|
local sample="$1"
|
2015-10-28 21:08:31 +00:00
|
|
|
. $(pwd)/.config.sample
|
2015-11-17 21:18:14 +00:00
|
|
|
|
|
|
|
# libc needs some love
|
|
|
|
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
|
|
|
|
|
2010-01-31 14:57:22 +00:00
|
|
|
case "${sample}" in
|
|
|
|
current)
|
|
|
|
sample_type="l"
|
2012-05-07 19:37:59 +00:00
|
|
|
sample="$( ${CT_NG} show-tuple )"
|
2015-10-28 21:08:31 +00:00
|
|
|
case "${CT_TOOLCHAIN_TYPE}" in
|
|
|
|
canadian)
|
|
|
|
sample="${CT_HOST},$sample"
|
|
|
|
;;
|
|
|
|
esac
|
2010-01-31 14:57:22 +00:00
|
|
|
;;
|
|
|
|
*) if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then
|
|
|
|
sample_top="${CT_TOP_DIR}"
|
2010-04-01 22:18:26 +00:00
|
|
|
sample_type="L"
|
2010-01-31 14:57:22 +00:00
|
|
|
else
|
|
|
|
sample_top="${CT_LIB_DIR}"
|
2010-04-01 22:18:26 +00:00
|
|
|
sample_type="G"
|
2010-01-31 14:57:22 +00:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
2012-07-23 20:02:23 +00:00
|
|
|
if [ ${wiki} -eq 0 ]; then
|
|
|
|
width=14
|
|
|
|
printf "[%s" "${sample_type}"
|
|
|
|
[ -f "${sample_top}/samples/${sample}/broken" ] && printf "B" || printf "."
|
|
|
|
[ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf "."
|
|
|
|
printf "] %s\n" "${sample}"
|
2008-06-15 19:25:51 +00:00
|
|
|
if [ ${verbose} -ne 0 ]; then
|
2009-06-26 17:09:22 +00:00
|
|
|
case "${CT_TOOLCHAIN_TYPE}" in
|
|
|
|
cross) ;;
|
|
|
|
canadian)
|
2012-07-23 20:02:23 +00:00
|
|
|
printf " %-*s : %s\n" ${width} "Host" "${CT_HOST}"
|
2009-06-26 17:09:22 +00:00
|
|
|
;;
|
|
|
|
esac
|
2012-07-23 20:02:23 +00:00
|
|
|
printf " %-*s : %s\n" ${width} "OS" "${CT_KERNEL}${CT_KERNEL_VERSION:+-}${CT_KERNEL_VERSION}"
|
2010-03-17 22:59:17 +00:00
|
|
|
if [ -n "${CT_GMP}" \
|
|
|
|
-o -n "${CT_MPFR}" \
|
2015-12-08 17:09:49 +00:00
|
|
|
-o -n "${CT_ISL}" \
|
2010-03-17 22:59:17 +00:00
|
|
|
-o -n "${CT_CLOOG}" \
|
|
|
|
-o -n "${CT_MPC}" \
|
|
|
|
-o -n "${CT_LIBELF}" \
|
2015-11-07 06:15:11 +00:00
|
|
|
-o -n "${CT_EXPAT}" \
|
2015-11-08 07:31:46 +00:00
|
|
|
-o -n "${CT_NCURSES}" \
|
2010-03-19 17:46:57 +00:00
|
|
|
-o -n "${CT_GMP_TARGET}" \
|
|
|
|
-o -n "${CT_MPFR_TARGET}" \
|
2015-12-08 17:09:49 +00:00
|
|
|
-o -n "${CT_ISL_TARGET}" \
|
2010-03-19 17:46:57 +00:00
|
|
|
-o -n "${CT_CLOOG_TARGET}" \
|
|
|
|
-o -n "${CT_MPC_TARGET}" \
|
|
|
|
-o -n "${CT_LIBELF_TARGET}" \
|
2015-11-07 06:15:11 +00:00
|
|
|
-o -n "${CT_EXPAT_TARGET}" \
|
2015-11-08 07:31:46 +00:00
|
|
|
-o -n "${CT_NCURSES_TARGET}" \
|
2010-02-17 22:47:47 +00:00
|
|
|
]; then
|
2012-07-23 20:02:23 +00:00
|
|
|
printf " %-*s :" ${width} "Companion libs"
|
2010-02-17 22:47:47 +00:00
|
|
|
complibs=1
|
2009-09-07 17:03:09 +00:00
|
|
|
fi
|
2015-11-08 07:31:46 +00:00
|
|
|
[ -z "${CT_GMP}" -a -z "${CT_GMP_TARGET}" ] || printf " gmp-%s" "${CT_GMP_VERSION}"
|
|
|
|
[ -z "${CT_MPFR}" -a -z "${CT_MPFR_TARGET}" ] || printf " mpfr-%s" "${CT_MPFR_VERSION}"
|
2015-12-08 17:09:49 +00:00
|
|
|
[ -z "${CT_ISL}" -a -z "${CT_ISL_TARGET}" ] || printf " isl-%s" "${CT_ISL_VERSION}"
|
|
|
|
[ -z "${CT_CLOOG}" -a -z "${CT_CLOOG_TARGET}" ] || printf " cloog-%s" "${CT_CLOOG_VERSION}"
|
2015-11-08 07:31:46 +00:00
|
|
|
[ -z "${CT_MPC}" -a -z "${CT_MPC_TARGET}" ] || printf " mpc-%s" "${CT_MPC_VERSION}"
|
|
|
|
[ -z "${CT_LIBELF}" -a -z "${CT_LIBELF_TARGET}" ] || printf " libelf-%s" "${CT_LIBELF_VERSION}"
|
|
|
|
[ -z "${CT_EXPAT}" -a -z "${CT_EXPAT_TARGET}" ] || printf " expat-%s" "${CT_EXPAT_VERSION}"
|
|
|
|
[ -z "${CT_NCURSES}" -a -z "${CT_NCURSES_TARGET}" ] || printf " ncurses-%s" "${CT_NCURSES_VERSION}"
|
2010-02-17 22:47:47 +00:00
|
|
|
[ -z "${complibs}" ] || printf "\n"
|
2012-07-23 20:02:23 +00:00
|
|
|
printf " %-*s : %s\n" ${width} "binutils" "binutils-${CT_BINUTILS_VERSION}"
|
2015-05-29 20:40:51 +00:00
|
|
|
printf " %-*s :" ${width} "C compilers"
|
2015-11-17 19:41:08 +00:00
|
|
|
cc=$(echo ${CT_CC} | ${awk} '{ print toupper($0)}')
|
|
|
|
version=$(eval echo \${CT_CC_${cc}_VERSION})
|
|
|
|
compiler=$(echo $cc | ${awk} '{print tolower($0)}')
|
2017-05-14 19:27:53 +00:00
|
|
|
printf " $compiler-$version"
|
2015-05-29 20:40:51 +00:00
|
|
|
printf "\n"
|
|
|
|
printf " %-*s : %s" ${width} "Languages" "C"
|
2008-07-07 21:25:57 +00:00
|
|
|
[ "${CT_CC_LANG_CXX}" = "y" ] && printf ",C++"
|
|
|
|
[ "${CT_CC_LANG_FORTRAN}" = "y" ] && printf ",Fortran"
|
|
|
|
[ "${CT_CC_LANG_JAVA}" = "y" ] && printf ",Java"
|
|
|
|
[ "${CT_CC_LANG_ADA}" = "y" ] && printf ",ADA"
|
|
|
|
[ "${CT_CC_LANG_OBJC}" = "y" ] && printf ",Objective-C"
|
|
|
|
[ "${CT_CC_LANG_OBJCXX}" = "y" ] && printf ",Objective-C++"
|
2013-11-08 14:18:09 +00:00
|
|
|
[ "${CT_CC_LANG_GOLANG}" = "y" ] && printf ",Go"
|
2008-07-13 20:45:24 +00:00
|
|
|
[ -n "${CT_CC_LANG_OTHERS}" ] && printf ",${CT_CC_LANG_OTHERS}"
|
2015-05-29 20:40:51 +00:00
|
|
|
printf "\n"
|
2015-11-17 21:18:14 +00:00
|
|
|
printf " %-*s : %s (threads: %s)\n" ${width} "C library" "${libc_name}${libc_ver:+-}${libc_ver}" "${CT_THREADS}"
|
2012-07-23 20:02:23 +00:00
|
|
|
printf " %-*s :" ${width} "Tools"
|
2009-09-07 16:55:11 +00:00
|
|
|
[ "${CT_TOOL_sstrip}" ] && printf " sstrip"
|
|
|
|
[ "${CT_DEBUG_duma}" ] && printf " duma-${CT_DUMA_VERSION}"
|
|
|
|
[ "${CT_DEBUG_gdb}" ] && printf " gdb-${CT_GDB_VERSION}"
|
|
|
|
[ "${CT_DEBUG_ltrace}" ] && printf " ltrace-${CT_LTRACE_VERSION}"
|
|
|
|
[ "${CT_DEBUG_strace}" ] && printf " strace-${CT_STRACE_VERSION}"
|
2009-09-07 16:40:30 +00:00
|
|
|
printf "\n"
|
2008-06-15 19:25:51 +00:00
|
|
|
fi
|
|
|
|
else
|
2009-06-26 17:09:22 +00:00
|
|
|
case "${CT_TOOLCHAIN_TYPE}" in
|
2009-11-25 22:56:59 +00:00
|
|
|
cross)
|
|
|
|
printf "| ''${sample}'' | "
|
|
|
|
;;
|
|
|
|
canadian)
|
|
|
|
printf "| ''"
|
2017-02-27 03:06:35 +00:00
|
|
|
printf "${sample}" |${sed} -r -e 's/.*,//'
|
2009-11-25 22:56:59 +00:00
|
|
|
printf "'' | ${CT_HOST} "
|
|
|
|
;;
|
2009-06-26 17:09:22 +00:00
|
|
|
*) ;;
|
|
|
|
esac
|
2009-11-25 22:56:59 +00:00
|
|
|
printf "| "
|
2009-11-25 23:22:17 +00:00
|
|
|
[ "${CT_EXPERIMENTAL}" = "y" ] && printf "**X**"
|
|
|
|
[ -f "${sample_top}/samples/${sample}/broken" ] && printf "**B**"
|
2009-06-26 17:09:22 +00:00
|
|
|
printf " | ''${CT_KERNEL}'' |"
|
2008-11-01 16:49:00 +00:00
|
|
|
if [ "${CT_KERNEL}" != "bare-metal" ];then
|
|
|
|
if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" = "y" ]; then
|
|
|
|
printf " //custom// "
|
|
|
|
else
|
|
|
|
printf " ${CT_KERNEL_VERSION} "
|
|
|
|
fi
|
2008-07-25 14:08:03 +00:00
|
|
|
fi
|
2008-07-07 21:25:57 +00:00
|
|
|
printf "| ${CT_BINUTILS_VERSION} "
|
2015-05-29 20:40:51 +00:00
|
|
|
printf "| "
|
2015-11-17 19:41:08 +00:00
|
|
|
cc=$(echo ${CT_CC} | ${awk} '{ print toupper($0)}')
|
|
|
|
version=$(eval echo \${CT_CC_${cc}_VERSION})
|
|
|
|
compiler=$(echo $cc | ${awk} '{print tolower($0)}')
|
|
|
|
printf " $compiler | $version"
|
2015-05-29 20:40:51 +00:00
|
|
|
printf " "
|
2015-11-17 21:18:14 +00:00
|
|
|
printf "| ''${libc_name}'' |"
|
|
|
|
if [ "${libc_name}" != "none" ]; then
|
|
|
|
printf " ${libc_ver} "
|
2008-11-01 16:49:00 +00:00
|
|
|
fi
|
|
|
|
printf "| ${CT_THREADS:-none} "
|
2011-11-14 17:53:14 +00:00
|
|
|
printf "| ${CT_ARCH_FLOAT} "
|
2008-07-13 20:45:24 +00:00
|
|
|
printf "| C"
|
|
|
|
[ "${CT_CC_LANG_CXX}" = "y" ] && printf ", C++"
|
|
|
|
[ "${CT_CC_LANG_FORTRAN}" = "y" ] && printf ", Fortran"
|
|
|
|
[ "${CT_CC_LANG_JAVA}" = "y" ] && printf ", Java"
|
|
|
|
[ "${CT_CC_LANG_ADA}" = "y" ] && printf ", ADA"
|
|
|
|
[ "${CT_CC_LANG_OBJC}" = "y" ] && printf ", Objective-C"
|
|
|
|
[ "${CT_CC_LANG_OBJCXX}" = "y" ] && printf ", Objective-C++"
|
|
|
|
[ -n "${CT_CC_LANG_OTHERS}" ] && printf "\\\\\\\\ Others: ${CT_CC_LANG_OTHERS}"
|
2008-07-19 18:12:35 +00:00
|
|
|
printf " "
|
2008-10-14 21:30:27 +00:00
|
|
|
( . "${sample_top}/samples/${sample}/reported.by"
|
|
|
|
if [ -n "${reporter_name}" ]; then
|
2008-06-25 08:53:17 +00:00
|
|
|
if [ -n "${reporter_url}" ]; then
|
2008-07-07 21:25:57 +00:00
|
|
|
printf "| [[${reporter_url}|${reporter_name}]] "
|
2008-06-25 08:53:17 +00:00
|
|
|
else
|
2008-07-07 21:25:57 +00:00
|
|
|
printf "| ${reporter_name} "
|
2008-06-25 08:53:17 +00:00
|
|
|
fi
|
2008-10-14 21:30:27 +00:00
|
|
|
else
|
2011-10-18 18:17:41 +00:00
|
|
|
printf "| (//unknown//) "
|
2008-10-14 21:30:27 +00:00
|
|
|
fi
|
|
|
|
)
|
2014-06-28 11:10:23 +00:00
|
|
|
sample_updated="$( git log -n1 --pretty=format:'%ci' "${sample_top}/samples/${sample}" \
|
2015-05-10 00:38:43 +00:00
|
|
|
|${awk} '{ print $1; }' )"
|
2008-07-29 16:48:20 +00:00
|
|
|
printf "| ${sample_updated} "
|
2008-06-15 19:25:51 +00:00
|
|
|
echo "|"
|
2008-05-02 21:49:43 +00:00
|
|
|
fi
|
2007-05-08 10:57:34 +00:00
|
|
|
}
|
|
|
|
|
2012-07-23 20:02:23 +00:00
|
|
|
if [ "${opt}" = "-w" -a ${#} -eq 0 ]; then
|
2009-11-25 23:22:17 +00:00
|
|
|
printf "^ %s |||||||||||||||\n" "$( date "+%Y%m%d.%H%M %z" )"
|
2009-11-25 22:56:59 +00:00
|
|
|
printf "^ Target "
|
|
|
|
printf "^ Host "
|
2008-09-04 15:42:25 +00:00
|
|
|
printf "^ Status "
|
2008-07-19 18:12:35 +00:00
|
|
|
printf "^ Kernel headers\\\\\\\\ version ^"
|
2008-09-14 16:54:12 +00:00
|
|
|
printf "^ binutils\\\\\\\\ version "
|
2008-07-19 18:12:35 +00:00
|
|
|
printf "^ C compiler\\\\\\\\ version ^"
|
2008-09-14 16:54:12 +00:00
|
|
|
printf "^ C library\\\\\\\\ version ^"
|
|
|
|
printf "^ Threading\\\\\\\\ model "
|
2008-07-13 21:35:09 +00:00
|
|
|
printf "^ Floating point\\\\\\\\ support "
|
|
|
|
printf "^ Languages "
|
2008-07-29 16:48:20 +00:00
|
|
|
printf "^ Initially\\\\\\\\ reported by "
|
|
|
|
printf "^ Last\\\\\\\\ updated "
|
2008-07-07 21:25:57 +00:00
|
|
|
echo "^"
|
2012-07-23 20:02:23 +00:00
|
|
|
exit 0
|
|
|
|
elif [ "${opt}" = "-W" ]; then
|
|
|
|
printf "^ Total: ${#} samples || **X**: sample uses features marked as being EXPERIMENTAL.\\\\\\\\ **B**: sample is currently BROKEN. |||||||||||||"
|
|
|
|
echo ""
|
|
|
|
exit 0
|
2008-06-15 19:25:51 +00:00
|
|
|
fi
|
2008-07-25 16:14:42 +00:00
|
|
|
|
2007-05-08 10:57:34 +00:00
|
|
|
for sample in "${@}"; do
|
2012-07-23 20:02:23 +00:00
|
|
|
( dump_single_sample ${opt} "${sample}" )
|
2010-01-03 17:33:23 +00:00
|
|
|
done
|