Building target libraries before the cross-compiler is available is doomed! Move build binutils' target libraries after final gcc.
Have a unique list of steps, it's easier to maintain.
/trunk/scripts/build/binutils.sh | 8 5 3 0 +++++---
/trunk/scripts/crosstool.sh | 16 2 14 0 ++--------------
/trunk/steps.mk | 29 16 13 0 ++++++++++++++++-------------
3 files changed, 23 insertions(+), 30 deletions(-)
1.1 --- a/scripts/build/binutils.sh Sun Apr 27 16:20:57 2008 +0000
1.2 +++ b/scripts/build/binutils.sh Mon Apr 28 07:38:36 2008 +0000
1.3 @@ -57,7 +57,11 @@
1.4 ln -sv "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}" "${CT_CC_CORE_SHARED_PREFIX_DIR}/bin/${CT_TARGET}-${t}"
1.5 done |CT_DoLog ALL
1.6
1.7 - # Now on for the target libraries
1.8 + CT_EndStep
1.9 +}
1.10 +
1.11 +# Now on for the target libraries
1.12 +do_binutils_target() {
1.13 targets=
1.14 [ "${CT_BINUTILS_FOR_TARGET_IBERTY}" = "y" ] && targets="${build_targets} libiberty"
1.15 [ "${CT_BINUTILS_FOR_TARGET_BFD}" = "y" ] && targets="${build_targets} bfd"
1.16 @@ -88,6 +92,4 @@
1.17 CT_Popd
1.18 CT_EndStep
1.19 fi
1.20 -
1.21 - CT_EndStep
1.22 }
2.1 --- a/scripts/crosstool.sh Sun Apr 27 16:20:57 2008 +0000
2.2 +++ b/scripts/crosstool.sh Mon Apr 28 07:38:36 2008 +0000
2.3 @@ -455,20 +455,8 @@
2.4 do_stop=0
2.5 prev_step=
2.6 [ -n "${CT_RESTART}" ] && do_it=0 || do_it=1
2.7 - for step in libc_check_config \
2.8 - kernel_check_config \
2.9 - kernel_headers \
2.10 - binutils \
2.11 - cc_core_pass_1 \
2.12 - libc_headers \
2.13 - libc_start_files \
2.14 - cc_core_pass_2 \
2.15 - libc \
2.16 - cc \
2.17 - libc_finish \
2.18 - tools \
2.19 - debug \
2.20 - ; do
2.21 + # CT_STEPS comes from steps.mk!
2.22 + for step in ${CT_STEPS}; do
2.23 if [ ${do_it} -eq 0 ]; then
2.24 if [ "${CT_RESTART}" = "${step}" ]; then
2.25 CT_DoLoadState "${step}"
3.1 --- a/steps.mk Sun Apr 27 16:20:57 2008 +0000
3.2 +++ b/steps.mk Mon Apr 28 07:38:36 2008 +0000
3.3 @@ -1,19 +1,22 @@
3.4 # Makefile for each steps
3.5 # Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
3.6
3.7 -CT_STEPS := libc_check_config \
3.8 - kernel_check_config \
3.9 - kernel_headers \
3.10 - binutils \
3.11 - cc_core_pass_1 \
3.12 - libc_headers \
3.13 - libc_start_files \
3.14 - cc_core_pass_2 \
3.15 - libc \
3.16 - cc \
3.17 - libc_finish \
3.18 - tools \
3.19 - debug \
3.20 +CT_STEPS := libc_check_config \
3.21 + kernel_check_config \
3.22 + kernel_headers \
3.23 + binutils \
3.24 + cc_core_pass_1 \
3.25 + libc_headers \
3.26 + libc_start_files \
3.27 + cc_core_pass_2 \
3.28 + libc \
3.29 + cc \
3.30 + libc_finish \
3.31 + binutils_target \
3.32 + tools \
3.33 + debug \
3.34 +
3.35 +export CT_STEPS
3.36
3.37 $(CT_STEPS):
3.38 @$(CT_NG) RESTART=$@ STOP=$@ build