This one was hard to build. At least a combination taht works.
/trunk/samples/i686-nptl-linux-gnu/crosstool.config | 114 73 41 0 +++++++++++++++++++++++++++++++++++--------------------
1 file changed, 73 insertions(+), 41 deletions(-)
1 # Build script for the gdb debug facility
6 [ "${CT_GDB}" = "y" ] || return 0
7 echo "gdb`do_debug_gdb_suffix`"
10 do_debug_gdb_suffix() {
11 case "${CT_GDB_VERSION}" in
13 *) echo "-${CT_GDB_VERSION}";;
18 CT_GetFile "gdb`do_debug_gdb_suffix`" \
19 ftp://ftp.gnu.org/pub/gnu/gdb \
20 ftp://sources.redhat.com/pub/gdb/releases \
21 ftp://sources.redhat.com/pub/gdb/old-releases \
22 ftp://sources.redhat.com/pub/gdb/snapshots/current
25 do_debug_gdb_extract() {
26 CT_ExtractAndPatch "gdb`do_debug_gdb_suffix`"
29 do_debug_gdb_build() {
30 gdb_src_dir="${CT_SRC_DIR}/gdb`do_debug_gdb_suffix`"
33 # Version 6.3 and below behave badly with gdbmi
34 case "${CT_GDB_VERSION}" in
35 6.2*|6.3) extra_config="${extra_config} --disable-gdbmi";;
38 if [ "${CT_GDB_CROSS}" = "y" ]; then
39 CT_DoStep INFO "Installing cross-gdb"
40 CT_DoLog EXTRA "Configuring cross-gdb"
42 mkdir -p "${CT_BUILD_DIR}/build-gdb-cross"
43 cd "${CT_BUILD_DIR}/build-gdb-cross"
47 if [ "${CT_GDB_CROSS_STATIC_GDBSERVER}" = "y" ]; then
48 CC_for_gdb="gcc -static"
49 LD_for_gdb="ld -static"
54 "${gdb_src_dir}/configure" \
57 --target=${CT_TARGET} \
58 --prefix="${CT_PREFIX_DIR}" \
59 --with-build-sysroot="${CT_SYSROOT_DIR}" \
61 ${extra_config} 2>&1 |CT_DoLog ALL
63 CT_DoLog EXTRA "Building cross-gdb"
64 make ${PARALLELMFLAGS} 2>&1 |CT_DoLog ALL
66 CT_DoLog EXTRA "Installing cross-gdb"
67 make install 2>&1 |CT_DoLog ALL
71 CT_DoStep INFO "Installing gdbserver"
72 CT_DoLog EXTRA "Configuring gdbserver"
74 mkdir -p "${CT_BUILD_DIR}/build-gdb-gdbserver"
75 cd "${CT_BUILD_DIR}/build-gdb-gdbserver"
77 # Workaround for bad versions, where the configure
78 # script for gdbserver is not executable...
79 # Bah, GNU folks strike again... :-(
80 chmod +x "${gdb_src_dir}/gdb/gdbserver/configure"
83 if [ "${CT_GDB_CROSS_STATIC_GDBSERVER}" = "y" ]; then
84 gdbserver_LDFLAGS=-static
87 LDFLAGS="${gdbserver_LDFLAGS}" \
88 "${gdb_src_dir}/gdb/gdbserver/configure" \
91 --target=${CT_TARGET} \
94 --localstatedir=/var \
95 --includedir="${CT_HEADERS_DIR}" \
96 --with-build-sysroot="${CT_SYSROOT_DIR}" \
102 --without-included-gettext \
103 ${extra_config} 2>&1 |CT_DoLog ALL
105 CT_DoLog EXTRA "Building gdbserver"
106 make ${PARALLELMFLAGS} CC=${CT_TARGET}-${CT_CC} 2>&1 |CT_DoLog ALL
108 CT_DoLog EXTRA "Installing gdbserver"
109 make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install 2>&1 |CT_DoLog ALL
114 if [ "${CT_GDB_NATIVE}" = "y" ]; then
115 CT_DoStep EXTRA "Installing native gdb"
116 CT_DoLog EXTRA "Configuring native gdb"
118 mkdir -p "${CT_BUILD_DIR}/build-gdb-native"
119 cd "${CT_BUILD_DIR}/build-gdb-native"
121 "${gdb_src_dir}/configure" \
122 --build=${CT_BUILD} \
123 --host=${CT_TARGET} \
124 --target=${CT_TARGET} \
126 --with-build-sysroot="${CT_SYSROOT_DIR}" \
132 --disable-gdbserver \
133 --without-included-gettext \
134 ${extra_config} 2>&1 |CT_DoLog ALL
136 CT_DoLog EXTRA "Building native gdb"
137 make ${PARALLELMFLAGS} CC=${CT_TARGET}-${CT_CC} 2>&1 |CT_DoLog ALL
139 CT_DoLog EXTRA "Installing native gdb"
140 make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install 2>&1 |CT_DoLog ALL