summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-01-13 21:30:10 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2010-01-13 21:30:10 (GMT)
commit8f41039a3c85344475fa8097b8c25cd7c9d92bb5 (patch)
tree811aec6af26f7640705ba2f0541b21d0eefc8fe3
parentad943c1a37d5c8b72ea5a0b55c7602c29b9baa21 (diff)
debug/gdb: install ncurses in a temporary place
We only build the static ncurses, to be used to build the native gdb, and it needs not be available for anyone but us. So install it into a temporary place, and get rid of it once gdb is built.
-rw-r--r--scripts/build/debug/300-gdb.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index 50195d7..a81781d 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -190,7 +190,7 @@ do_debug_gdb_build() {
--with-build-cc=${CT_BUILD}-gcc \
--with-build-cpp=${CT_BUILD}-gcc \
--with-build-cflags="${CT_CFLAGS_FOR_HOST}" \
- --prefix=/usr \
+ --prefix="${CT_BUILD_DIR}/ncurses" \
--without-shared \
--without-sysmouse \
--without-progs \
@@ -201,8 +201,7 @@ do_debug_gdb_build() {
CT_DoExecLog ALL make ${PARALLELMFLAGS}
CT_DoLog EXTRA "Installing ncurses"
- mkdir -p "${CT_SYSROOT_DIR}/usr/bin"
- CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install
+ CT_DoExecLog ALL make install
# We no longer need the temporary tic. Remove it
CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/bin/tic"
@@ -233,10 +232,13 @@ do_debug_gdb_build() {
export ac_cv_func_strncmp_works=yes
+ gdb_native_CFLAGS="-I${CT_BUILD_DIR}/ncurses/include -L${CT_BUILD_DIR}/ncurses/lib"
+
CT_DoLog DEBUG "Extra config passed: '${native_extra_config[*]}'"
CC="${CC_for_gdb}" \
LD="${LD_for_gdb}" \
+ CFLAGS="${gdb_native_CFLAGS}" \
CT_DoExecLog ALL \
"${gdb_src_dir}/configure" \
--build=${CT_BUILD} \
@@ -269,6 +271,8 @@ do_debug_gdb_build() {
cd "${CT_BUILD_DIR}/build-ncurses"
CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" uninstall
+ CT_DoExecLog DEBUG rm -rf "${CT_BUILD_DIR}/ncurses"
+
CT_EndStep # native gdb build
fi