scripts/showSamples.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 13 10:32:38 2008 +0000 (2008-07-13)
changeset 645 8e58024f8e37
parent 642 887ce0523903
child 649 dbf389a31c41
permissions -rwxr-xr-x
Ioannis E. VENETIS <venetis@mail.capsl.udel.edu> pointed out that GMP and MPFR were not used by gcc.
Turned out that none could use GMP and MPFR as the config option changed its name, but the change was not propagated to all users.

/trunk/scripts/build/binutils.sh | 2 1 1 0 +-
/trunk/scripts/build/debug/300-gdb.sh | 2 1 1 0 +-
/trunk/scripts/build/cc_gcc.sh | 6 3 3 0 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
     1 #!/bin/bash
     2 
     3 # Parses all samples on the command line, and for each of them, prints
     4 # the versions of the main tools
     5 
     6 [ "$1" = "-v" ] && opt="$1" && shift
     7 [ "$1" = "-w" ] && opt="$1" && shift
     8 
     9 # GREP_OPTIONS screws things up.
    10 export GREP_OPTIONS=
    11 
    12 # Dump a single sample
    13 dump_single_sample() {
    14     local verbose=0
    15     [ "$1" = "-v" ] && verbose=1 && shift
    16     [ "$1" = "-w" ] && wiki=1 && shift
    17     local width="$1"
    18     local sample="$2"
    19     if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then
    20         sample_top="${CT_TOP_DIR}"
    21         sample_type="local"
    22     else
    23         sample_top="${CT_LIB_DIR}"
    24         sample_type="global"
    25     fi
    26     . "${sample_top}/samples/${sample}/crosstool.config"
    27     if [ -z "${wiki}" ]; then
    28         printf "  %-*s  (%s" ${width} "${sample}" "${sample_type}"
    29         [ -f "${sample_top}/samples/${sample}/broken" ] && printf ",broken"
    30         echo ")"
    31         if [ ${verbose} -ne 0 ]; then
    32             echo    "    OS        : ${CT_KERNEL}-${CT_KERNEL_VERSION}"
    33             echo    "    binutils  : binutils-${CT_BINUTILS_VERSION}"
    34             printf  "    C compiler: ${CT_CC}-${CT_CC_VERSION} (C"
    35             [ "${CT_CC_LANG_CXX}" = "y"     ] && printf ",C++"
    36             [ "${CT_CC_LANG_FORTRAN}" = "y" ] && printf ",Fortran"
    37             [ "${CT_CC_LANG_JAVA}" = "y"    ] && printf ",Java"
    38             [ "${CT_CC_LANG_ADA}" = "y"     ] && printf ",ADA"
    39             [ "${CT_CC_LANG_OBJC}" = "y"    ] && printf ",Objective-C"
    40             [ "${CT_CC_LANG_OBJCXX}" = "y"  ] && printf ",Objective-C++"
    41             [ -n "${CT_CC_LANG_OTHERS}"     ] && printf ",$CT_CC_LANG_OTHERS}"
    42             echo    ")"
    43             echo    "    C library : ${CT_LIBC}-${CT_LIBC_VERSION}"
    44             printf  "    Tools     :"
    45             [ "${CT_LIBELF}"  ] && printf " libelf-${CT_LIBELF_VERSION}"
    46             [ "${CT_SSTRIP}"  ] && printf " sstrip"
    47             [ "${CT_DMALLOC}" ] && printf " dmalloc-${CT_DMALLOC_VERSION}"
    48             [ "${CT_DUMA}"    ] && printf " duma-${CT_DUMA_VERSION}"
    49             [ "${CT_GDB}"     ] && printf " gdb-${CT_GDB_VERSION}"
    50             [ "${CT_LTRACE}"  ] && printf " ltrace-${CT_LTRACE_VERSION}"
    51             [ "${CT_STRACE}"  ] && printf " strace-${CT_STRACE_VERSION}"
    52             echo
    53         fi
    54     else
    55         printf "| ''${sample}''  "
    56         printf "|  ${CT_KERNEL_VERSION}  "
    57         printf "|  ${CT_BINUTILS_VERSION}  "
    58         printf "|  ${CT_CC_VERSION}  "
    59         printf "|  ''${CT_LIBC}''  "
    60         printf "|  ${CT_LIBC_VERSION}  "
    61         printf "|  ${CT_THREADS_NPTL:+NPTL}${CT_THREADS_LINUXTHREADS:+linuxthreads}${CT_THREADS_NONE:+none}  "
    62         printf "|  ${CT_ARCH_FLOAT_HW:+hard}${CT_ARCH_FLOAT_SW:+soft} float  "
    63         printf "|  "
    64         if [ -f "${sample_top}/samples/${sample}/reported.by" ]; then
    65             ( . "${sample_top}/samples/${sample}/reported.by"
    66               if [ -n "${reporter_url}" ]; then
    67                   printf "|  [[${reporter_url}|${reporter_name}]]  "
    68               else
    69                   printf "|  ${reporter_name}  "
    70               fi
    71             )
    72         else
    73             printf "|  [[http://ymorin.is-a-geek.org/|YEM]]  "
    74         fi
    75         echo "|"
    76     fi
    77 }
    78 
    79 # Get largest sample width
    80 width=0
    81 for sample in "${@}"; do
    82     [ ${#sample} -gt ${width} ] && width=${#sample}
    83 done
    84 
    85 if [ "${opt}" = -w ]; then
    86     echo "^ $(date +%Y%m%d.%H%M) ^ |||||||||"
    87     printf "^ Target "
    88     printf "^  kernel headers\\\\\\\\ version  "
    89     printf "^  binutils version  "
    90     printf "^  gcc version  "
    91     printf "^  libc  "
    92     printf "^  libc version  "
    93     printf "^  threading model  "
    94     printf "^  float support  "
    95     printf "^  Misc  "
    96     printf "^  Reported by  "
    97     echo   "^"
    98 fi
    99 for sample in "${@}"; do
   100     ( dump_single_sample ${opt} ${width} "${sample}" )
   101 done