summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2015-11-10 00:08:28 (GMT)
committerAlexey Neyman <stilor@att.net>2015-11-13 18:31:46 (GMT)
commit4d2d2ba954edc2fb893bd1d2f7a1e0acd4da23de (patch)
treeec1ad202dab99ca807fb71e46646d5c5a16660a3 /scripts
parent6102726147a6e81fd7ec209db14337055a99b84b (diff)
Enable building expat/ncurses for host.
Then re-enable cross-gdb for nios2-spico-elf sample, previously disabled.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/companion_libs/210-expat.sh15
-rw-r--r--scripts/build/companion_libs/220-ncurses.sh37
-rw-r--r--scripts/build/debug/300-gdb.sh4
3 files changed, 54 insertions, 2 deletions
diff --git a/scripts/build/companion_libs/210-expat.sh b/scripts/build/companion_libs/210-expat.sh
index 212bf98..25a69d3 100644
--- a/scripts/build/companion_libs/210-expat.sh
+++ b/scripts/build/companion_libs/210-expat.sh
@@ -18,6 +18,21 @@ do_expat_extract() {
CT_Patch "expat" "${CT_EXPAT_VERSION}"
}
+if [ "${CT_EXPAT}" = "y" ]; then
+# Do not need expat for build at this time.
+
+do_expat_for_host() {
+ CT_DoStep INFO "Installing expat for host"
+ CT_mkdir_pushd "${CT_BUILD_DIR}/build-expat-host-${CT_HOST}"
+
+ do_expat_backend host="${CT_HOST}" \
+ prefix="${CT_HOST_COMPLIBS_DIR}"
+
+ CT_Popd
+ CT_EndStep
+}
+fi
+
if [ "${CT_EXPAT_TARGET}" = "y" ]; then
do_expat_for_target() {
CT_DoStep INFO "Installing expat for target"
diff --git a/scripts/build/companion_libs/220-ncurses.sh b/scripts/build/companion_libs/220-ncurses.sh
index f108214..2011a65 100644
--- a/scripts/build/companion_libs/220-ncurses.sh
+++ b/scripts/build/companion_libs/220-ncurses.sh
@@ -23,6 +23,7 @@ do_ncurses_extract() {
# We need tic that runs on the build when building ncurses for host/target
do_ncurses_for_build() {
local -a opts
+
CT_DoStep INFO "Installing ncurses for build"
CT_mkdir_pushd "${CT_BUILD_DIR}/build-ncurses-build-${CT_BUILD}"
opts=("--enable-symlinks" \
@@ -38,6 +39,33 @@ do_ncurses_for_build() {
CT_EndStep
}
+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" \
+ "--without-manpages" \
+ "--without-tests" \
+ "--without-cxx" \
+ "--without-cxx-binding" \
+ "--without-ada")
+ do_ncurses_backend host="${CT_HOST}" \
+ prefix="${CT_HOST_COMPLIBS_DIR}" \
+ "${opts[@]}"
+ CT_Popd
+ CT_EndStep
+}
+fi
+
if [ "${CT_NCURSES_TARGET}" = "y" ]; then
do_ncurses_for_target() {
CT_DoStep INFO "Installing ncurses for target"
@@ -81,6 +109,15 @@ do_ncurses_backend() {
esac
done
+ case "$host" in
+ *-*-mingw*)
+ # Needed to build for mingw, see
+ # http://lists.gnu.org/archive/html/info-gnu/2011-02/msg00020.html
+ ncurses_opts+=("--enable-term-driver")
+ ncurses_opts+=("--enable-sp-funcs")
+ ;;
+ esac
+
CT_DoLog EXTRA "Configuring ncurses"
CT_DoExecLog CFG \
"${CT_SRC_DIR}/ncurses-${CT_NCURSES_VERSION}/configure" \
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index 4c8116b..657bb53 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -96,8 +96,8 @@ do_debug_gdb_build() {
cd "${CT_BUILD_DIR}/build-gdb-cross"
cross_extra_config=("${extra_config[@]}")
- cross_extra_config+=("--enable-expat")
- cross_extra_config+=("--with-expat=yes")
+ cross_extra_config+=("--with-expat")
+ cross_extra_config+=("--with-libexpat-prefix=${CT_HOST_COMPLIBS_DIR}")
case "${CT_THREADS}" in
none) cross_extra_config+=("--disable-threads");;
*) cross_extra_config+=("--enable-threads");;