[PATCH 6 of 6] debug/gdb: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom
David Holsgrove
david.holsgrove@xilinx.com
Wed Oct 10 06:08:00 GMT 2012
# HG changeset patch
# User David Holsgrove <david.holsgrove@xilinx.com>
# Date 1349847856 -36000
# Node ID 95681eaa5cefc8ac01c9fefc12e0785d185c4a84
# Parent 53e0ec83f0eb86286025821388cbdb82a8510941
debug/gdb: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom
CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.
diff -r 53e0ec83f0eb -r 95681eaa5cef config/debug/gdb.in
--- a/config/debug/gdb.in Wed Oct 10 15:44:15 2012 +1000
+++ b/config/debug/gdb.in Wed Oct 10 15:44:16 2012 +1000
@@ -119,6 +119,13 @@
bool
prompt "6.8a"
+config GDB_CUSTOM
+ bool
+ prompt "Custom gdb"
+ depends on EXPERIMENTAL
+ select GDB_7_0_or_later
+ select GDB_7_2_or_later
+
endchoice
config GDB_7_2_or_later
@@ -152,5 +159,19 @@
default "7.0.1a" if GDB_V_7_0_1a
default "7.0a" if GDB_V_7_0a
default "6.8a" if GDB_V_6_8a
+ default "custom" if GDB_CUSTOM
+
+if GDB_CUSTOM
+
+config GDB_CUSTOM_LOCATION
+ string
+ prompt "full path to custom gdb source"
+ default ""
+ help
+ Enter the path to the directory (or tarball) of your source for gdb,
+ or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/gdb
+
+endif # GDB_CUSTOM
endif
+
diff -r 53e0ec83f0eb -r 95681eaa5cef scripts/build/debug/300-gdb.sh
--- a/scripts/build/debug/300-gdb.sh Wed Oct 10 15:44:15 2012 +1000
+++ b/scripts/build/debug/300-gdb.sh Wed Oct 10 15:44:16 2012 +1000
@@ -48,10 +48,19 @@
do_debug_gdb_parts
if [ "${do_gdb}" = "y" ]; then
- CT_GetFile "gdb-${CT_GDB_VERSION}" \
- {ftp,http}://ftp.gnu.org/pub/gnu/gdb \
- ftp://sources.redhat.com/pub/gdb/{,old-}releases \
- "${linaro_base_url}/${linaro_series}/${linaro_version}/+download"
+ if [ "${CT_GDB_CUSTOM}" = "y" ]; then
+ CT_TestAndAbort "Custom gdb: CT_CUSTOM_LOCATION_ROOT_DIR or CT_GDB_CUSTOM_LOCATION must be set." \
+ -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_GDB_CUSTOM_LOCATION}"
+ if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_GDB_CUSTOM_LOCATION}" ]; then
+ CT_GDB_CUSTOM_LOCATION="${CT_CUSTOM_LOCATION_ROOT_DIR}/gdb"
+ fi
+ CT_GetCustom "gdb-${CT_GDB_VERSION}" "${CT_GDB_CUSTOM_LOCATION}"
+ else
+ CT_GetFile "gdb-${CT_GDB_VERSION}" \
+ {ftp,http}://ftp.gnu.org/pub/gnu/gdb \
+ ftp://sources.redhat.com/pub/gdb/{,old-}releases \
+ "${linaro_base_url}/${linaro_series}/${linaro_version}/+download"
+ fi
fi
if [ "${do_ncurses}" = "y" ]; then
@@ -70,7 +79,10 @@
do_debug_gdb_parts
if [ "${do_gdb}" = "y" ]; then
- CT_Extract "gdb-${CT_GDB_VERSION}"
+ if [ "${CT_GDB_CUSTOM}" != "y" \
+ -o ! -d "${CT_GDB_CUSTOM_LOCATION}" ]; then
+ CT_Extract "gdb-${CT_GDB_VERSION}"
+ fi
CT_Patch "gdb" "${CT_GDB_VERSION}"
fi
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list