diff options
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/binutils/binutils.sh | 2 | ||||
-rw-r--r-- | scripts/build/companion_libs/220-ncurses.sh | 30 | ||||
-rw-r--r-- | scripts/build/debug/300-gdb.sh | 23 | ||||
-rw-r--r-- | scripts/build/libc/uClibc.sh | 1 |
4 files changed, 29 insertions, 27 deletions
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index 2f3f3a5..7625690 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -199,6 +199,8 @@ do_binutils_backend() { CT_DoLog DEBUG "Extra config passed: '${extra_config[*]}'" CT_DoExecLog CFG \ + CC_FOR_BUILD="${CT_BUILD}-gcc" \ + CFLAGS_FOR_BUILD="${cflags_for_build}" \ CFLAGS="${cflags}" \ CXXFLAGS="${cflags}" \ LDFLAGS="${ldflags}" \ diff --git a/scripts/build/companion_libs/220-ncurses.sh b/scripts/build/companion_libs/220-ncurses.sh index 573523b..7a1379d 100644 --- a/scripts/build/companion_libs/220-ncurses.sh +++ b/scripts/build/companion_libs/220-ncurses.sh @@ -31,26 +31,13 @@ do_ncurses_for_build() { "--without-tests" \ "--without-cxx" \ "--without-cxx-binding" \ - "--without-ada") - # If we are not canadian, this is also our host curses - # Unlike other companion libs, we skip host build if build==host - # (i.e. in simple cross or native): ncurses may not be needed for - # host, but we still need them on build to produce 'tic'. - case "${CT_TOOLCHAIN_TYPE}" in - native|cross) - if [ "${CT_NCURSES_HOST_DISABLE_DB}" = "y" ]; then - opts+=( "--disable-database" ) - fi - if [ -n "${CT_NCURSES_HOST_FALLBACKS}" ]; then - opts+=( "--with-fallbacks=${CT_NCURSES_HOST_FALLBACKS}" ) - fi - opts+=( "${CT_NCURSES_HOST_CONFIG_ARGS[@]}" ) - ;; - esac + "--without-ada" \ + "--without-fallbacks" ) do_ncurses_backend host="${CT_BUILD}" \ destdir="${CT_BUILDTOOLS_PREFIX_DIR}" \ cflags="${CT_CFLAGS_FOR_BUILD}" \ ldflags="${CT_LDFLAGS_FOR_BUILD}" \ + install_target=install.progs \ "${opts[@]}" CT_Popd CT_EndStep @@ -60,13 +47,6 @@ if [ "${CT_NCURSES}" = "y" ]; then do_ncurses_for_host() { local -a opts - # Unlike other companion libs, we skip host build if build==host - # (i.e. in simple cross or native): ncurses may not be needed for - # host, but we still need them on build to produce 'tic'. - case "${CT_TOOLCHAIN_TYPE}" in - native|cross) return 0;; - esac - CT_DoStep INFO "Installing ncurses for host" CT_mkdir_pushd "${CT_BUILD_DIR}/build-ncurses-host-${CT_HOST}" opts=("--enable-symlinks" \ @@ -142,7 +122,7 @@ do_ncurses_backend() { local ldflags local shared local arg - local for_target + local install_target=install for arg in "$@"; do case "$arg" in @@ -198,7 +178,7 @@ do_ncurses_backend() { CT_DoLog EXTRA "Building ncurses" CT_DoExecLog ALL make ${JOBSFLAGS} CT_DoLog EXTRA "Installing ncurses" - CT_DoExecLog ALL make install + CT_DoExecLog ALL make "${install_target}" } fi diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index b2cb08f..68510e1 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -48,7 +48,7 @@ do_debug_gdb_build() { if [ "${CT_GDB_CROSS}" = "y" ]; then local -a cross_extra_config - local gcc_version + local gcc_version p _p CT_DoStep INFO "Installing cross-gdb" CT_DoLog EXTRA "Configuring cross-gdb" @@ -75,7 +75,20 @@ do_debug_gdb_build() { *) cross_extra_config+=("--enable-threads");; esac if [ "${CT_GDB_CROSS_PYTHON}" = "y" ]; then - cross_extra_config+=( "--with-python=yes" ) + if [ -z "${CT_GDB_CROSS_PYTHON_BINARY}" ]; then + for p in python python3 python2; do + _p=$( which "${p}" || true ) + if [ -n "${_p}" ]; then + cross_extra_config+=( "--with-python=${_p}" ) + break + fi + done + if [ -z "${_p}" ]; then + CT_Abort "Python support requested in cross-gdb, but Python not found. Set CT_GDB_CROSS_PYTHON_BINARY in your config." + fi + else + cross_extra_config+=( "--with-python=${CT_GDB_CROSS_PYTHON_BINARY}" ) + fi else cross_extra_config+=( "--with-python=no" ) fi @@ -127,6 +140,8 @@ do_debug_gdb_build() { CT_DoLog DEBUG "Extra config passed: '${cross_extra_config[*]}'" CT_DoExecLog CFG \ + CC_FOR_BUILD="${CT_BUILD}-gcc" \ + CFLAGS_FOR_BUILD="${cflags_for_build}" \ CPP="${CPP_for_gdb}" \ CC="${CC_for_gdb}" \ CXX="${CXX_for_gdb}" \ @@ -242,6 +257,8 @@ do_debug_gdb_build() { CT_DoLog DEBUG "Extra config passed: '${native_extra_config[*]}'" CT_DoExecLog CFG \ + CC_FOR_BUILD="${CT_BUILD}-gcc" \ + CFLAGS_FOR_BUILD="${cflags_for_build}" \ CPP="${CPP_for_gdb}" \ CC="${CC_for_gdb}" \ CXX="${CXX_for_gdb}" \ @@ -316,6 +333,8 @@ do_debug_gdb_build() { gdbserver_extra_config+=("--disable-gas") CT_DoExecLog CFG \ + CC_FOR_BUILD="${CT_BUILD}-gcc" \ + CFLAGS_FOR_BUILD="${cflags_for_build}" \ CC="${CT_TARGET}-${CT_CC}" \ CPP="${CT_TARGET}-cpp" \ LD="${CT_TARGET}-ld" \ diff --git a/scripts/build/libc/uClibc.sh b/scripts/build/libc/uClibc.sh index 9f1eb37..a730a1d 100644 --- a/scripts/build/libc/uClibc.sh +++ b/scripts/build/libc/uClibc.sh @@ -119,6 +119,7 @@ do_libc_backend_once() { # - We do _not_ want to strip anything for now, in case we specifically # asked for a debug toolchain, thus the STRIPTOOL= assignment. make_args=( CROSS_COMPILE="${CT_TARGET}-" \ + HOSTCC="${CT_BUILD}-gcc" \ PREFIX="${multi_root}/" \ MULTILIB_DIR="${multilib_dir}" \ LOCALE_DATA_FILENAME="${uclibc_locale_tarball}.tgz" \ |