Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Ralf Corsepius <ralf.corsepius@rtems.org>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: Ralf Corsepius <ralf.corsepius@rtems.org>, tromey@redhat.com
Subject: Re: [Patch] Exit gdb/configure.tgt for unsupported targets
Date: Thu, 25 Feb 2010 05:40:00 -0000	[thread overview]
Message-ID: <4B860D57.3070408@rtems.org> (raw)
In-Reply-To: <4B855B1A.7050006@rtems.org>

[-- Attachment #1: Type: text/plain, Size: 807 bytes --]

On 02/24/2010 06:00 PM, Ralf Corsepius wrote:
> On 02/24/2010 05:51 PM, Tom Tromey wrote:
>>>>>>> "Ralf" == Ralf Corsepius<ralf.corsepius@rtems.org> writes:
>> Ralf> 2010-02-23 Ralf Corsépius<ralf.corsepius@rtems.org>
>> Ralf> * configure.tgt: Exit if ${gdb_target_obs}" is not set.
>>
>> Ralf> +if test -z "${gdb_target_obs}"; then
>> Ralf> + echo "*** Configuration ${targ} is unsupported.">&2
>> Ralf> + exit 1
>> Ralf> +fi
>>
>> I think it would be better to do the test in configure.ac and use
>> AC_MSG_ERROR.
> I wasn't aware "${gdb_target_obs}" is exported to configure.ac and
> intended to keep configure.tgt self-contained ;)
>
> Now that it apparently is exported and used in configure.ac, I agree
> with you, configure.ac+AC_MSG_ERROR would be better.

Reworked patch enclosed below.

Ralf



[-- Attachment #2: gdb-7.0.90-gdb-configure.diff --]
[-- Type: text/plain, Size: 1176 bytes --]

2010-02-25	Ralf Corsépius <ralf.corsepius@rtems.org>

	* configure.ac: Exit if ${gdb_target_obs}" is not set.
	* configure: Regenerate.

diff -Naur gdb-7.0.90.orig/gdb/configure gdb-7.0.90-rtems4.10-20100225/gdb/configure
--- gdb-7.0.90.orig/gdb/configure	2010-02-19 01:23:00.000000000 +0100
+++ gdb-7.0.90-rtems4.10-20100225/gdb/configure	2010-02-25 05:25:54.000000000 +0100
@@ -6927,6 +6927,10 @@
 
     . ${srcdir}/configure.tgt
 
+    if test -z "${gdb_target_obs}"; then :
+  as_fn_error "configuration ${targ} is unsupported." "$LINENO" 5
+fi
+
     # Target-specific object files
     for i in ${gdb_target_obs}; do
         case " $TARGET_OBS " in
diff -Naur gdb-7.0.90.orig/gdb/configure.ac gdb-7.0.90-rtems4.10-20100225/gdb/configure.ac
--- gdb-7.0.90.orig/gdb/configure.ac	2010-02-19 01:23:00.000000000 +0100
+++ gdb-7.0.90-rtems4.10-20100225/gdb/configure.ac	2010-02-25 05:25:48.000000000 +0100
@@ -161,6 +161,9 @@
 
     . ${srcdir}/configure.tgt
 
+    AS_IF([test -z "${gdb_target_obs}"],
+      [AC_MSG_ERROR([configuration ${targ} is unsupported.])])
+
     # Target-specific object files
     for i in ${gdb_target_obs}; do
         case " $TARGET_OBS " in

  reply	other threads:[~2010-02-25  5:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24 10:56 Ralf Corsepius
2010-02-24 16:51 ` Tom Tromey
2010-02-24 17:00   ` Ralf Corsepius
2010-02-25  5:40     ` Ralf Corsepius [this message]
2010-02-25 17:46       ` Tom Tromey
2010-03-11 16:57         ` Ralf Corsepius
2010-03-15 17:10           ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B860D57.3070408@rtems.org \
    --to=ralf.corsepius@rtems.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox