public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: ada/9911: gnatmake fails to link when GCC configured for sjlj
@ 2003-03-03 19:26 John David Anglin
  0 siblings, 0 replies; 2+ messages in thread
From: John David Anglin @ 2003-03-03 19:26 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR ada/9911; it has been noted by GNATS.

From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: hainque@ACT-Europe.FR (Olivier Hainque)
Cc: dannysmith@users.sourceforge.net, gcc-gnats@gcc.gnu.org,
   gcc-bugs@gcc.gnu.org, dave.anglin@nrc.ca, gcc-prs@gcc.gnu.org,
   hainque@ACT-Europe.FR
Subject: Re: ada/9911: gnatmake fails to link when GCC configured for sjlj
Date: Mon, 3 Mar 2003 14:21:29 -0500 (EST)

 >  The patch achieves this, basically tested against today's 3.3 sources.
 > 
 >  Please tell me if it allows you to proceed further or not.
 
 Yes, it fixes the problem.  I will close the PR when it is installed.
 
 Thanks,
 Dave
 -- 
 J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
 National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ada/9911: gnatmake fails to link when GCC configured for sjlj
@ 2003-03-03 17:06 Olivier Hainque
  0 siblings, 0 replies; 2+ messages in thread
From: Olivier Hainque @ 2003-03-03 17:06 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR ada/9911; it has been noted by GNATS.

From: Olivier Hainque <hainque@ACT-Europe.FR>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: dannysmith@users.sourceforge.net, gcc-gnats@gcc.gnu.org,
	gcc-bugs@gcc.gnu.org, dave.anglin@nrc.ca, gcc-prs@gcc.gnu.org,
	hainque@ACT-Europe.FR
Subject: Re: ada/9911: gnatmake fails to link when GCC configured for sjlj
Date: Mon, 3 Mar 2003 17:59:50 +0100

 John David Anglin wrote:
 > there probably does need to be a stub for _Unwind_SjLj_RaiseException in
 > raise.c.
 
 > We also need to fix the call issued from a-except.adb.  This is actually
 > what caused the link failure in the PR.
 
  Right.
 
 > I hacked a-except.adb and raise.c use to use _Unwind_SjLj_RaiseException
 > but not being familiar with ada I'm not sure how to conditionalize the ada
 > code. 
 
  To avoid the need for conditional compilation at the Ada level, we eventually
  chose to define stubs with consistent names across the various GCC
  configuration possibilities. 
 
  The patch achieves this, basically tested against today's 3.3 sources.
 
  Please tell me if it allows you to proceed further or not.
 
  Kind Regards,
 
  Olivier
 
 *** a-except.adb.ori	Mon Mar  3 17:04:28 2003
 --- a-except.adb	Mon Mar  3 17:12:01 2003
 *************** package body Ada.Exceptions is
 *** 199,205 ****
      function Unwind_RaiseException
        (E    : access GNAT_GCC_Exception)
         return Unwind_Reason_Code;
 !    pragma Import (C, Unwind_RaiseException, "_Unwind_RaiseException");
   
      -----------------------
      -- Local Subprograms --
 --- 199,205 ----
      function Unwind_RaiseException
        (E    : access GNAT_GCC_Exception)
         return Unwind_Reason_Code;
 !    pragma Import (C, Unwind_RaiseException, "__gnat_Unwind_RaiseException");
   
      -----------------------
      -- Local Subprograms --
 *** raise.c.ori	Mon Mar  3 17:04:16 2003
 --- raise.c	Mon Mar  3 17:18:15 2003
 *************** __gnat_eh_personality (version, actions,
 *** 597,617 ****
   }
   
   
 ! #else   /* IN_RTS - For eh personality routine   */
   
   /* The calls to the GCC runtime interface for exception raising are currently
      issued from a-except.adb, which is used by both the runtime library and
      the compiler. As the compiler binary is not linked against the GCC runtime
      library, we need a stub for this interface in the compiler case.  */
   
   
   _Unwind_Reason_Code
 ! _Unwind_RaiseException (e)
        struct _Unwind_Exception *e ATTRIBUTE_UNUSED;
   {
 -   /* Since we don't link the compiler with a host libgcc, we should not be
 -      using the GCC eh mechanism for the compiler and so expect this function
 -      never to be called.  */
     abort ();
   }
   
 --- 597,644 ----
   }
   
   
 ! /* If the underlying GCC scheme for exception handling is SJLJ, the standard
 !    propagation routine (_Unwind_RaiseException) is actually renamed using a
 !    #define directive (see unwing-sjlj.c). We need a consistently named
 !    interface to import from a-except, so stubs are defined here.  */
 ! 
 ! #ifdef __USING_SJLJ_EXCEPTIONS__
 ! 
 ! _Unwind_Reason_Code
 ! __gnat_Unwind_RaiseException (e)
 !      struct _Unwind_Exception *e;
 ! {
 !   return _Unwind_SjLj_RaiseException (e);
 ! }
 ! 
 ! #else
 ! /* __USING_SJLJ_EXCEPTIONS__ not defined */
 ! 
 ! void
 ! __gnat_Unwind_RaiseException (e)
 !      struct _Unwind_Exception *e;
 ! {
 !   return _Unwind_RaiseException (e);
 ! }
 !  
 ! #endif
 ! 
 ! #else
 ! /* IN_RTS not defined */
   
   /* The calls to the GCC runtime interface for exception raising are currently
      issued from a-except.adb, which is used by both the runtime library and
      the compiler. As the compiler binary is not linked against the GCC runtime
      library, we need a stub for this interface in the compiler case.  */
   
 + /* Since we don't link the compiler with a host libgcc, we should not be
 +    using the GCC eh mechanism for the compiler and so expect this function
 +    never to be called.  */
   
   _Unwind_Reason_Code
 ! __gnat_Unwind_RaiseException (e)
        struct _Unwind_Exception *e ATTRIBUTE_UNUSED;
   {
     abort ();
   }
   
 
 
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-03 19:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-03 19:26 ada/9911: gnatmake fails to link when GCC configured for sjlj John David Anglin
  -- strict thread matches above, loose matches on Subject: below --
2003-03-03 17:06 Olivier Hainque

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).