Better handle the second pass core gcc build, differentiating between gcc prior to 4.3 with gcc from 4.3.
Simplify detecting wether gcc is 4.3 and later, or older than 4.3 (we already know from .config).
/trunk/scripts/build/cc/gcc.sh | 22 13 9 0 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
3 # Parses all samples on the command line, and for each of them, prints
4 # the versions of the main tools
6 [ "$1" = "-v" ] && opt="$1" && shift
7 [ "$1" = "-w" ] && opt="$1" && shift
9 # GREP_OPTIONS screws things up.
12 # Dump a single sample
13 dump_single_sample() {
15 [ "$1" = "-v" ] && verbose=1 && shift
16 [ "$1" = "-w" ] && wiki=1 && shift
19 if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then
20 sample_top="${CT_TOP_DIR}"
23 sample_top="${CT_LIB_DIR}"
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 "B" || printf " "
30 [ "${CT_EXPERIMENTAL}" = "y" ] && printf "X" || printf " "
32 if [ ${verbose} -ne 0 ]; then
33 echo " OS : ${CT_KERNEL}${CT_KERNEL_VERSION:+-}${CT_KERNEL_VERSION}"
34 if [ "${CT_GMP_MPFR}" = "y" ]; then
35 echo " GMP/MPFR : gmp-${CT_GMP_VERSION} / mpfr-${CT_MPFR_VERSION}"
37 echo " binutils : binutils-${CT_BINUTILS_VERSION}"
38 printf " C compiler: ${CT_CC}-${CT_CC_VERSION} (C"
39 [ "${CT_CC_LANG_CXX}" = "y" ] && printf ",C++"
40 [ "${CT_CC_LANG_FORTRAN}" = "y" ] && printf ",Fortran"
41 [ "${CT_CC_LANG_JAVA}" = "y" ] && printf ",Java"
42 [ "${CT_CC_LANG_ADA}" = "y" ] && printf ",ADA"
43 [ "${CT_CC_LANG_OBJC}" = "y" ] && printf ",Objective-C"
44 [ "${CT_CC_LANG_OBJCXX}" = "y" ] && printf ",Objective-C++"
45 [ -n "${CT_CC_LANG_OTHERS}" ] && printf ",${CT_CC_LANG_OTHERS}"
47 echo " C library : ${CT_LIBC}${CT_LIBC_VERSION:+-}${CT_LIBC_VERSION}"
49 [ "${CT_LIBELF}" ] && printf " libelf-${CT_LIBELF_VERSION}"
50 [ "${CT_SSTRIP}" ] && printf " sstrip"
51 [ "${CT_DMALLOC}" ] && printf " dmalloc-${CT_DMALLOC_VERSION}"
52 [ "${CT_DUMA}" ] && printf " duma-${CT_DUMA_VERSION}"
53 [ "${CT_GDB}" ] && printf " gdb-${CT_GDB_VERSION}"
54 [ "${CT_LTRACE}" ] && printf " ltrace-${CT_LTRACE_VERSION}"
55 [ "${CT_STRACE}" ] && printf " strace-${CT_STRACE_VERSION}"
59 printf "| ''${sample}'' "
61 [ "${CT_EXPERIMENTAL}" = "y" ] && printf "X"
62 [ -f "${sample_top}/samples/${sample}/broken" ] && printf "B"
64 printf "| ''${CT_KERNEL}'' "
65 if [ "${CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR}" = "y" ]; then
66 printf "| //custom// "
68 printf "| ${CT_KERNEL_VERSION} "
70 printf "| ${CT_BINUTILS_VERSION} "
71 printf "| ''${CT_CC}'' "
72 printf "| ${CT_CC_VERSION} "
73 printf "| ''${CT_LIBC}'' "
74 printf "| ${CT_LIBC_VERSION} "
75 printf "| ${CT_THREADS_NPTL:+NPTL}${CT_THREADS_LINUXTHREADS:+linuxthreads}${CT_THREADS_NONE:+none} "
76 printf "| ${CT_ARCH_FLOAT_HW:+hard}${CT_ARCH_FLOAT_SW:+soft} float "
78 [ "${CT_CC_LANG_CXX}" = "y" ] && printf ", C++"
79 [ "${CT_CC_LANG_FORTRAN}" = "y" ] && printf ", Fortran"
80 [ "${CT_CC_LANG_JAVA}" = "y" ] && printf ", Java"
81 [ "${CT_CC_LANG_ADA}" = "y" ] && printf ", ADA"
82 [ "${CT_CC_LANG_OBJC}" = "y" ] && printf ", Objective-C"
83 [ "${CT_CC_LANG_OBJCXX}" = "y" ] && printf ", Objective-C++"
84 [ -n "${CT_CC_LANG_OTHERS}" ] && printf "\\\\\\\\ Others: ${CT_CC_LANG_OTHERS}"
86 if [ -f "${sample_top}/samples/${sample}/reported.by" ]; then
87 ( . "${sample_top}/samples/${sample}/reported.by"
88 if [ -n "${reporter_url}" ]; then
89 printf "| [[${reporter_url}|${reporter_name}]] "
91 printf "| ${reporter_name} "
95 printf "| [[http://ymorin.is-a-geek.org/|YEM]] "
97 sample_updated=$(date -u "+%Y%m%d" \
98 -d "$(LC_ALL=C svn info ${sample_top}/samples/${sample} \
99 |GREP_OPTIONS= egrep '^Last Changed Date:' \
100 |sed -r -e 's/^[^:]+: //;' \
101 -e 's/^(.+:.. [+-][[:digit:]]{4}) \(.+\)$/\1/;' \
104 printf "| ${sample_updated} "
109 # Get largest sample width
111 for sample in "${@}"; do
112 [ ${#sample} -gt ${width} ] && width=${#sample}
115 if [ "${opt}" = -w ]; then
116 echo "^ @@DATE@@ ^ |||||||||||||"
119 printf "^ Kernel headers\\\\\\\\ version ^"
120 printf "^ binutils\\\\\\\\ version "
121 printf "^ C compiler\\\\\\\\ version ^"
122 printf "^ C library\\\\\\\\ version ^"
123 printf "^ Threading\\\\\\\\ model "
124 printf "^ Floating point\\\\\\\\ support "
125 printf "^ Languages "
126 printf "^ Initially\\\\\\\\ reported by "
127 printf "^ Last\\\\\\\\ updated "
131 for sample in "${@}"; do
132 ( dump_single_sample ${opt} ${width} "${sample}" )
135 if [ "${opt}" = -w ]; then
136 printf "^ Total: ${#@} samples | ''X'': sample uses features marked as being EXPERIMENTAL.\\\\\\\\ ''B'': sample is curently BROKEN. |||||||||||||"
138 elif [ -z "${opt}" ]; then
139 echo ' l (local) : sample was found in current directory'
140 echo ' g (global) : sample was installed with crosstool-NG'
141 echo ' X (EXPERIMENTAL): sample may use EXPERIMENTAL features'
142 echo ' B (BORKEN) : sample is currently broken'