diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-08-23 14:32:16 +0200 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-08-23 14:32:16 +0200 |
commit | 7a70e935c64a9bf7e0eacf11b0b0dfaeaf570e96 (patch) | |
tree | 456aecd22170f5ff57afb7334222cec42b5ca0e4 | |
parent | 1504a1ef106643278e80bd98b21dd4439204e8ec (diff) | |
download | crosstool-ng-7a70e935c64a9bf7e0eacf11b0b0dfaeaf570e96.tar.gz crosstool-ng-7a70e935c64a9bf7e0eacf11b0b0dfaeaf570e96.tar.bz2 crosstool-ng-7a70e935c64a9bf7e0eacf11b0b0dfaeaf570e96.zip |
debug/gdb: install dependable libs in a generic target static libs dir
For now, ncurses is the only dependable target library built for gdb.
But expat is coming, and there's no reason to install each library in
its own place.
So, install ncurses in a generic directory, where other dependable
libraries can be installed as well.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
-rw-r--r-- | scripts/build/debug/300-gdb.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 4eb31be7..2abd3ce1 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -119,9 +119,12 @@ do_debug_gdb_build() { if [ "${CT_GDB_NATIVE}" = "y" ]; then local -a native_extra_config local -a ncurses_opt + local -a gdb_native_CFLAGS CT_DoStep INFO "Installing native gdb" + native_extra_config=("${extra_config[@]}") + # GDB on Mingw depends on PDcurses, not ncurses if [ "${do_ncurses}" = "y" ]; then CT_DoLog EXTRA "Building static target ncurses" @@ -167,7 +170,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="${CT_BUILD_DIR}/ncurses" \ + --prefix="${CT_BUILD_DIR}/static-target" \ --without-shared \ --without-sysmouse \ --without-progs \ @@ -180,6 +183,11 @@ do_debug_gdb_build() { # We no longer need the temporary tic. Remove it CT_DoExecLog DEBUG rm -fv "${CT_PREFIX_DIR}/buildtools/tic${tic_ext}" + + native_extra_config+=("--with-curses") + # There's no better way to tell gdb where to find -lcurses... :-( + gdb_native_CFLAGS+=("-I${CT_BUILD_DIR}/static-target/include") + gdb_native_CFLAGS+=("-L${CT_BUILD_DIR}/static-target/lib") fi # do_ncurses CT_DoLog EXTRA "Configuring native gdb" @@ -187,7 +195,6 @@ do_debug_gdb_build() { mkdir -p "${CT_BUILD_DIR}/build-gdb-native" cd "${CT_BUILD_DIR}/build-gdb-native" - native_extra_config=("${extra_config[@]}") case "${CT_THREADS}" in none) native_extra_config+=("--disable-threads");; *) native_extra_config+=("--enable-threads");; @@ -203,13 +210,11 @@ 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}" \ + CFLAGS="${gdb_native_CFLAGS[@]}" \ CT_DoExecLog ALL \ "${gdb_src_dir}/configure" \ --build=${CT_BUILD} \ |