This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: as -gstabs does not work on ia64
Nick Clifton <nickc@cambridge.redhat.com> writes:
|> Hi Andreas,
|>
|> > How about this:
|> >
|> > case OPTION_GSTABS:
|> > +#ifdef TC_IA64
|> > + as_fatal (_("--gstabs is not supported for ia64"));
|> > +#else
|> > debug_type = DEBUG_STABS;
|> > +#endif
|> > break;
|>
|> I would prefer not to see target specific code enter the generic
|> sources like this. (Even though it has been done elsewhere). I would
|> prefer to see either the IA64 backend detecting that --gstabs had been
|> specified and issuing an error message (say during md_parse_args) or
md_parse_option is only called for arch specific options which are not
recognized by the generic option parser.
|> else have tc-ia64.h define a macro which is then tested in
|> parse_args().
Perhaps introducing md_after_parse_args:
2001-11-28 Andreas Schwab <schwab@suse.de>
* as.c (parse_args): Call md_after_parse_args if defined.
* config/tc-ia64.h (md_after_parse_args): Define.
* config/tc-ia64.c (ia64_after_parse_args): Reject --gstabs.
--- as.c.~1.33.~ Tue Oct 23 10:00:14 2001
+++ as.c Wed Nov 28 15:42:36 2001
@@ -762,6 +762,10 @@
*pargc = new_argc;
*pargv = new_argv;
+
+#ifdef md_after_parse_args
+ md_after_parse_args ();
+#endif
}
static long start_time;
--- config/tc-ia64.c.~1.60.~ Fri Nov 16 11:22:52 2001
+++ config/tc-ia64.c Wed Nov 28 15:46:53 2001
@@ -6310,6 +6310,13 @@
stream);
}
+void
+ia64_after_parse_args ()
+{
+ if (debug_type == DEBUG_STABS)
+ as_fatal (_("--gstabs is not supported for ia64"));
+}
+
/* Return true if TYPE fits in TEMPL at SLOT. */
static int
--- config/tc-ia64.h.~1.15.~ Fri Nov 16 11:22:52 2001
+++ config/tc-ia64.h Wed Nov 28 15:47:51 2001
@@ -86,6 +86,7 @@
extern long ia64_pcrel_from_section PARAMS ((struct fix *fix, segT sec));
extern void ia64_md_do_align PARAMS ((int, const char *, int, int));
extern void ia64_handle_align PARAMS ((fragS *f));
+extern void ia64_after_parse_args PARAMS ((void));
#define md_end() ia64_end_of_source ()
#define md_start_line_hook() ia64_start_line ()
@@ -114,6 +115,7 @@
#define md_do_align(n,f,l,m,j) ia64_md_do_align (n,f,l,m)
#define HANDLE_ALIGN(f) ia64_handle_align (f)
#define md_elf_section_type(str,len) ia64_elf_section_type (str, len)
+#define md_after_parse_args() ia64_after_parse_args ()
#define MAX_MEM_FOR_RS_ALIGN_CODE (15 + 16)
Andreas
--
Andreas Schwab "And now for something
Andreas.Schwab@suse.de completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5