Commit 9c2d872c by Pascal Obry Committed by Arnaud Charlet

re PR ada/20226 (Error in __gnat_install_SEH_handler breaks bootstrap)

2005-03-08  Pascal Obry  <obry@adacore.com>
	    Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/20226
	PR ada/20344

	* init.c (__gnat_initialize): Do not call __gnat_install_SEH_handler()
	when IN_RTS. This is to work around a bootstrap path problem.

	* misc.c (gnat_parse_file): Create a SEH (Structured Exception Handler)
	table and pass it to __gnat_install_SEH_handler().
	(gnat_handle_option): Accept OPT_fRTS_, not OPT_fRTS.

	* lang.opt: Fix specification of -fRTS=.

From-SVN: r96499
parent 454ff542
...@@ -57,8 +57,9 @@ nostdlib ...@@ -57,8 +57,9 @@ nostdlib
Ada Ada
; Don't look for object files ; Don't look for object files
fRTS fRTS=
Ada RejectNegative Ada Joined RejectNegative
; Selects the runtime
gant gant
Ada Joined Undocumented Ada Joined Undocumented
......
...@@ -218,6 +218,7 @@ extern char **gnat_argv; ...@@ -218,6 +218,7 @@ extern char **gnat_argv;
/* Declare functions we use as part of startup. */ /* Declare functions we use as part of startup. */
extern void __gnat_initialize (void *); extern void __gnat_initialize (void *);
extern void __gnat_install_SEH_handler (void *);
extern void adainit (void); extern void adainit (void);
extern void _ada_gnat1drv (void); extern void _ada_gnat1drv (void);
...@@ -226,9 +227,17 @@ extern void _ada_gnat1drv (void); ...@@ -226,9 +227,17 @@ extern void _ada_gnat1drv (void);
static void static void
gnat_parse_file (int set_yydebug ATTRIBUTE_UNUSED) gnat_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
{ {
int seh[2];
/* call the target specific initializations */ /* call the target specific initializations */
__gnat_initialize (NULL); __gnat_initialize (NULL);
/* ??? call the SEH initialization routine, this is to workaround a
bootstrap path problem. The call below should be removed at some point and
the seh pointer passed to __gnat_initialize() above. */
__gnat_install_SEH_handler((void *)seh);
/* Call the front-end elaboration procedures */ /* Call the front-end elaboration procedures */
adainit (); adainit ();
...@@ -289,7 +298,7 @@ gnat_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED) ...@@ -289,7 +298,7 @@ gnat_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED)
gnat_argc++; gnat_argc++;
break; break;
case OPT_fRTS: case OPT_fRTS_:
gnat_argv[gnat_argc] = xstrdup ("-fRTS"); gnat_argv[gnat_argc] = xstrdup ("-fRTS");
gnat_argc++; gnat_argc++;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment