Collect gdb_target_obs of multiple targets into TARGET_OBS.
Call configure.tgt multiple times, using $targ as operand.
* configure.tgt: Operate on $targ instead of $target.
* configure: Regenerate.
* Makefile.in (ALL_TARGET_OBS): Define.
* NEWS: Mention --enable-targets option.
+2007-11-16 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * configure.ac (--enable-targets): New configure option.
+ Collect gdb_target_obs of multiple targets into TARGET_OBS.
+ Call configure.tgt multiple times, using $targ as operand.
+ * configure.tgt: Operate on $targ instead of $target.
+ * configure: Regenerate.
+ * Makefile.in (ALL_TARGET_OBS): Define.
+
+ * NEWS: Mention --enable-targets option.
+
2007-11-16 Ulrich Weigand <uweigand@de.ibm.com>
* mips-tdep.c (show_mipsfpu_command): Do not crash if called when
# Target-dependent object files.
TARGET_OBS = @TARGET_OBS@
+# All target-dependent objects files (used with --enable-targets=all).
+ALL_TARGET_OBS = \
+ alphabsd-tdep.o alphafbsd-tdep.o alpha-linux-tdep.o alpha-mdebug-tdep.o \
+ alphanbsd-tdep.o alphaobsd-tdep.o alpha-osf1-tdep.o alpha-tdep.o \
+ amd64fbsd-tdep.o amd64-linux-tdep.o amd64nbsd-tdep.o amd64obsd-tdep.o \
+ amd64-sol2-tdep.o amd64-tdep.o \
+ armbsd-tdep.o arm-linux-tdep.o armnbsd-tdep.o armobsd-tdep.o \
+ arm-tdep.o arm-wince-tdep.o \
+ avr-tdep.o \
+ cris-tdep.o \
+ frv-linux-tdep.o frv-tdep.o \
+ h8300-tdep.o \
+ hppabsd-tdep.o hppa-hpux-tdep.o hppa-linux-tdep.o hppa-tdep.o \
+ i386bsd-tdep.o i386-cygwin-tdep.o i386fbsd-tdep.o i386gnu-tdep.o \
+ i386-linux-tdep.o i386nbsd-tdep.o i386-nto-tdep.o i386obsd-tdep.o \
+ i386-sol2-tdep.o i386-tdep.o i387-tdep.o \
+ ia64-linux-tdep.o ia64-tdep.o \
+ iq2000-tdep.o \
+ m32c-tdep.o \
+ m32r-linux-tdep.o m32r-tdep.o \
+ m68hc11-tdep.o \
+ m68kbsd-tdep.o m68klinux-tdep.o m68k-tdep.o \
+ m88k-tdep.o \
+ mep-tdep.o \
+ mips64obsd-tdep.o mips-irix-tdep.o mips-linux-tdep.o \
+ mipsnbsd-tdep.o mips-tdep.o \
+ mn10300-linux-tdep.o mn10300-tdep.o \
+ mt-tdep.o \
+ nto-tdep.o \
+ ppc-linux-tdep.o ppcnbsd-tdep.o ppcobsd-tdep.o ppc-sysv-tdep.o \
+ rs6000-aix-tdep.o rs6000-tdep.o \
+ s390-tdep.o \
+ score-tdep.o \
+ sh64-tdep.o sh-linux-tdep.o shnbsd-tdep.o sh-tdep.o \
+ sparc64fbsd-tdep.o sparc64-linux-tdep.o sparc64nbsd-tdep.o \
+ sparc64obsd-tdep.o sparc64-sol2-tdep.o sparc64-tdep.o \
+ sparc-linux-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o \
+ sparc-sol2-tdep.o sparc-tdep.o \
+ spu-tdep.o \
+ v850-tdep.o \
+ vaxnbsd-tdep.o vaxobsd-tdep.o vax-tdep.o \
+ xstormy16-tdep.o \
+ xtensa-config.o xtensa-tdep.o \
+ glibc-tdep.o \
+ bsd-uthread.o \
+ nbsd-tdep.o obsd-tdep.o \
+ sol2-tdep.o \
+ solib.o solib-frv.o solib-irix.o solib-svr4.o solib-target.o \
+ solib-som.o solib-pa64.o \
+ dbug-rom.o dink32-rom.o ppcbug-rom.o m32r-rom.o dsrec.o monitor.o \
+ remote-m32r-sdi.o \
+ xcoffread.o \
+ prologue-value.o \
+ symfile-mem.o \
+ corelow.o
+
# Host-dependent makefile fragment comes in here.
@host_makefile_frag@
# End of host-dependent makefile fragment
error: "Error trying to get information about dynamic linker".
The gdb-6.7 release is also affected.
+* GDB now supports the --enable-targets= configure option to allow
+building a single GDB executable that supports multiple remote
+target architectures.
+
+
*** Changes in GDB 6.7
* Resolved 101 resource leaks, null pointer dereferences, etc. in gdb,
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
+ --enable-targets alternative target configurations
--disable-gdbcli disable command-line interface (CLI)
--disable-gdbmi disable machine-interface (MI)
--enable-tui enable full-screen terminal user interface (TUI)
subdirs="$subdirs doc testsuite"
+# Check whether to support alternative target configurations
+# Check whether --enable-targets or --disable-targets was given.
+if test "${enable_targets+set}" = set; then
+ enableval="$enable_targets"
+ case "${enableval}" in
+ yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
+echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ no) enable_targets= ;;
+ *) enable_targets=$enableval ;;
+esac
+fi;
+
# Provide defaults for some variables set by the per-host and per-target
# configuration.
gdb_host_obs=posix-hdep.o
. $srcdir/configure.host
-. $srcdir/configure.tgt
+# Accumulate some settings from configure.tgt over all enabled targets
+
+TARGET_OBS=
+all_targets=
+
+for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
+do
+ if test "$targ_alias" = "all"; then
+ all_targets=true
+ else
+ # Canonicalize the secondary target names.
+ result=`$ac_config_sub $targ_alias 2>/dev/null`
+ if test -n "$result"; then
+ targ=$result
+ else
+ targ=$targ_alias
+ fi
+
+ . ${srcdir}/configure.tgt
+
+ # Target-specific object files
+ for i in ${gdb_target_obs}; do
+ case " $TARGET_OBS " in
+ *" ${i} "*) ;;
+ *)
+ TARGET_OBS="$TARGET_OBS ${i}"
+ ;;
+ esac
+ done
+ fi
+done
+
+if test x${all_targets} = xtrue; then
+ TARGET_OBS='$(ALL_TARGET_OBS)'
+fi
+
+
+
+# For other settings, only the main target counts.
+gdb_sim=
+gdb_osabi=
+build_gdbserver=
+targ=$target; . ${srcdir}/configure.tgt
# Fetch the default architecture and default target vector from BFD.
targ=$target; . $srcdir/../bfd/config.bfd
fi
-TARGET_OBS="${gdb_target_obs}"
-
-
test "$program_prefix" != NONE &&
program_transform_name="s,^,$program_prefix,;$program_transform_name"
# Use a double $ so make ignores it.
AC_CONFIG_SUBDIRS(doc testsuite)
+# Check whether to support alternative target configurations
+AC_ARG_ENABLE(targets,
+[ --enable-targets alternative target configurations],
+[case "${enableval}" in
+ yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
+ ;;
+ no) enable_targets= ;;
+ *) enable_targets=$enableval ;;
+esac])
+
# Provide defaults for some variables set by the per-host and per-target
# configuration.
gdb_host_obs=posix-hdep.o
. $srcdir/configure.host
-. $srcdir/configure.tgt
+# Accumulate some settings from configure.tgt over all enabled targets
+
+TARGET_OBS=
+all_targets=
+
+for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
+do
+ if test "$targ_alias" = "all"; then
+ all_targets=true
+ else
+ # Canonicalize the secondary target names.
+ result=`$ac_config_sub $targ_alias 2>/dev/null`
+ if test -n "$result"; then
+ targ=$result
+ else
+ targ=$targ_alias
+ fi
+
+ . ${srcdir}/configure.tgt
+
+ # Target-specific object files
+ for i in ${gdb_target_obs}; do
+ case " $TARGET_OBS " in
+ *" ${i} "*) ;;
+ *)
+ TARGET_OBS="$TARGET_OBS ${i}"
+ ;;
+ esac
+ done
+ fi
+done
+
+if test x${all_targets} = xtrue; then
+ TARGET_OBS='$(ALL_TARGET_OBS)'
+fi
+
+AC_SUBST(TARGET_OBS)
+
+# For other settings, only the main target counts.
+gdb_sim=
+gdb_osabi=
+build_gdbserver=
+targ=$target; . ${srcdir}/configure.tgt
# Fetch the default architecture and default target vector from BFD.
targ=$target; . $srcdir/../bfd/config.bfd
[Define to BFD's default target vector. ])
fi
-TARGET_OBS="${gdb_target_obs}"
-AC_SUBST(TARGET_OBS)
-
AC_ARG_PROGRAM
# The CLI cannot be disabled yet, but may be in the future.
# gdb_osabi default OS ABI to use with target
# build_gdbserver set to "yes" if gdbserver supports target
-case $target in
+case $targ in
d10v-*-* | \
hppa*-*-hiux* | \
i[34567]86-ncr-* | \
rs6000-*-lynxos* | \
sh*-*-pe | \
null)
- echo "*** Configuration $target is obsolete." >&2
+ echo "*** Configuration $targ is obsolete." >&2
echo "*** Support has been REMOVED." >&2
exit 1
;;
# map target info into gdb names.
-case "${target}" in
+case "${targ}" in
alpha*-*-osf*)
# Target: Little-endian Alpha running OSF/1
# map target onto default OS ABI
-case "${target}" in
+case "${targ}" in
*-*-freebsd*) gdb_osabi=GDB_OSABI_FREEBSD_ELF ;;
*-*-linux*) gdb_osabi=GDB_OSABI_LINUX ;;
*-*-nto*) gdb_osabi=GDB_OSABI_QNXNTO ;;