public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RISC-V and Ada: undefined references to `__gnat_raise_nodefer_with_msg'
@ 2018-07-02 13:47 Sebastian Huber
  2018-07-02 20:03 ` Eric Botcazou
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Huber @ 2018-07-02 13:47 UTC (permalink / raw)
  To: GCC

Hello,

I get the following link-time error while building an Ada test program 
on RISC-V and RTEMS:

riscv64-rtems5-gnatlink hello.ali -march=rv64imafd -mabi=lp64d 
-mcmodel=medany -O2 -g -ffunction-sections -fdata-sections -Wall 
-Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes 
-Wnested-externs 
-B/build/git-build/b-rv64imafd_medany/riscv64-rtems5/c/rv64imafd_medany/lib/libbsp/riscv/riscv 
-B/home/EB/sebastian_h/git-rtems-5/bsps/riscv/riscv/start -specs 
bsp_specs -qrtems -L../../../../../../rv64imafd_medany/lib 
-L/home/EB/sebastian_h/git-rtems-5/bsps/riscv/shared/start 
-Wl,--wrap=printf -Wl,--wrap=puts -Wl,--wrap=putchar -Wl,--gc-sections 
init.o -o ada_hello.exe
/build/rtems/5/lib/gcc/riscv64-rtems5/8.1.1/../../../../riscv64-rtems5/bin/ld: 
/build/rtems/5/lib/gcc/riscv64-rtems5/8.1.1/rv64imafd/lp64d/medany/adalib/libgnat.a(a-calend.o): 
in function `ada__calendar__arithmetic_operations__add':
/scratch/git-rtems-source-builder/rtems/build/riscv64-rtems5-gcc-2e2052934b0c82e0726ed44de4a9b0a29ed6b276-newlib-3.0.0-x86_64-linux-gnu-1/build/gcc/ada/rts_rv64imafd_lp64d_medany/a-calend.adb:797: 
undefined reference to `__gnat_raise_nodefer_with_msg'
/build/rtems/5/lib/gcc/riscv64-rtems5/8.1.1/../../../../riscv64-rtems5/bin/ld: 
/build/rtems/5/lib/gcc/riscv64-rtems5/8.1.1/rv64imafd/lp64d/medany/adalib/libgnat.a(a-calend.o): 
in function `ada__calendar__arithmetic_operations__subtract':
/scratch/git-rtems-source-builder/rtems/build/riscv64-rtems5-gcc-2e2052934b0c82e0726ed44de4a9b0a29ed6b276-newlib-3.0.0-x86_64-linux-gnu-1/build/gcc/ada/rts_rv64imafd_lp64d_medany/a-calend.adb:894: 
undefined reference to `__gnat_raise_nodefer_with_msg'
/build/rtems/5/lib/gcc/riscv64-rtems5/8.1.1/../../../../riscv64-rtems5/bin/ld: 
/build/rtems/5/lib/gcc/riscv64-rtems5/8.1.1/rv64imafd/lp64d/medany/adalib/libgnat.a(a-calend.o): 
in function `ada__calendar__conversion_operations__to_ada_time':
/scratch/git-rtems-source-builder/rtems/build/riscv64-rtems5-gcc-2e2052934b0c82e0726ed44de4a9b0a29ed6b276-newlib-3.0.0-x86_64-linux-gnu-1/build/gcc/ada/rts_rv64imafd_lp64d_medany/a-calend.adb:917: 
undefined reference to `__gnat_raise_nodefer_with_msg'
/build/rtems/5/lib/gcc/riscv64-rtems5/8.1.1/../../../../riscv64-rtems5/bin/ld: 
/build/rtems/5/lib/gcc/riscv64-rtems5/8.1.1/rv64imafd/lp64d/medany/adalib/libgnat.a(a-calend.o): 
in function `ada__calendar__conversion_operations__to_unix_time':
/scratch/git-rtems-source-builder/rtems/build/riscv64-rtems5-gcc-2e2052934b0c82e0726ed44de4a9b0a29ed6b276-newlib-3.0.0-x86_64-linux-gnu-1/build/gcc/ada/rts_rv64imafd_lp64d_medany/a-calend.adb:1095: 
undefined reference to `__gnat_raise_nodefer_with_msg'
/build/rtems/5/lib/gcc/riscv64-rtems5/8.1.1/../../../../riscv64-rtems5/bin/ld: 
/build/rtems/5/lib/gcc/riscv64-rtems5/8.1.1/rv64imafd/lp64d/medany/adalib/libgnat.a(a-calend.o): 
in function `ada__calendar__Oadd':
/scratch/git-rtems-source-builder/rtems/build/riscv64-rtems5-gcc-2e2052934b0c82e0726ed44de4a9b0a29ed6b276-newlib-3.0.0-x86_64-linux-gnu-1/build/gcc/ada/rts_rv64imafd_lp64d_medany/a-calend.adb:249: 
undefined reference to `__gnat_raise_nodefer_with_msg'
/build/rtems/5/lib/gcc/riscv64-rtems5/8.1.1/../../../../riscv64-rtems5/bin/ld: 
/build/rtems/5/lib/gcc/riscv64-rtems5/8.1.1/rv64imafd/lp64d/medany/adalib/libgnat.a(a-calend.o):/scratch/git-rtems-source-builder/rtems/build/riscv64-rtems5-gcc-2e2052934b0c82e0726ed44de4a9b0a29ed6b276-newlib-3.0.0-x86_64-linux-gnu-1/build/gcc/ada/rts_rv64imafd_lp64d_medany/a-calend.adb:261: 
more undefined references to `__gnat_raise_nodefer_with_msg' follow

I cannot find it in the GCC sources:

grep -ri raise_nodefer_with_msg
gcc/ada/gcc-interface/trans.c:      (get_identifier 
("__gnat_raise_nodefer_with_msg"), NULL_TREE, ftype,

Who is supposed to provide an implementation of 
__gnat_raise_nodefer_with_msg?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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

* Re: RISC-V and Ada: undefined references to `__gnat_raise_nodefer_with_msg'
  2018-07-02 13:47 RISC-V and Ada: undefined references to `__gnat_raise_nodefer_with_msg' Sebastian Huber
@ 2018-07-02 20:03 ` Eric Botcazou
  2018-07-03  5:22   ` Sebastian Huber
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Botcazou @ 2018-07-02 20:03 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: gcc

> I cannot find it in the GCC sources:
> 
> grep -ri raise_nodefer_with_msg
> gcc/ada/gcc-interface/trans.c:      (get_identifier
> ("__gnat_raise_nodefer_with_msg"), NULL_TREE, ftype,
> 
> Who is supposed to provide an implementation of
> __gnat_raise_nodefer_with_msg?

No one, it's obsolete.  The port is very likely not (properly) configured.

-- 
Eric Botcazou

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

* Re: RISC-V and Ada: undefined references to `__gnat_raise_nodefer_with_msg'
  2018-07-02 20:03 ` Eric Botcazou
@ 2018-07-03  5:22   ` Sebastian Huber
  2018-07-03  7:10     ` Eric Botcazou
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Huber @ 2018-07-03  5:22 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc

On 02/07/18 22:03, Eric Botcazou wrote:
>> I cannot find it in the GCC sources:
>>
>> grep -ri raise_nodefer_with_msg
>> gcc/ada/gcc-interface/trans.c:      (get_identifier
>> ("__gnat_raise_nodefer_with_msg"), NULL_TREE, ftype,
>>
>> Who is supposed to provide an implementation of
>> __gnat_raise_nodefer_with_msg?
> No one, it's obsolete.  The port is very likely not (properly) configured.

In master and gcc-8-branch:

grep -ri raise_nodefer_with_msg gcc/ada
gcc/ada/gcc-interface/trans.c:      (get_identifier 
("__gnat_raise_nodefer_with_msg"), NULL_TREE, ftype,

In gcc-7-branch:

grep -ri raise_nodefer_with_msg gcc/ada
gcc/ada/a-exexpr.adb:   pragma Export (C, Propagate_Continue, 
"__gnat_raise_nodefer_with_msg");
gcc/ada/gcc-interface/trans.c:      (get_identifier 
("__gnat_raise_nodefer_with_msg"), NULL_TREE, ftype,
gcc/ada/a-except.adb:   pragma Export (C, Raise_Current_Excep, 
"__gnat_raise_nodefer_with_msg");

It seems the a-except.adb was replaced by  a-except-2005.adb in this commit:

commit 4af1de5b4b45c597d63e935dc3fae6d94b27d39e
Author: charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Apr 27 09:48:45 2017 +0000

     2017-04-27  Claire Dross  <dross@adacore.com>

             * a-cfdlli.adb, a-cfdlli.ads (Formal_Model): Adapt to
             modifications in functional containers.
             * a-cofuba.ads, a-cofuma.ads, a-cofuse.ads, a-cofuve.ads 
Reformat
             to improve readablity. Subprograms are separated between basic
             operations, constructors and properties. Universally quantified
             formulas in contracts are factorized in independant functions
             with a name and a comment.  Names of parameters are improved.

     2017-04-27  Gary Dismukes  <dismukes@adacore.com>

             * exp_spark.adb, sem_elab.adb: Minor reformatting and typo fix.

     2017-04-27  Hristian Kirtchev  <kirtchev@adacore.com>

             * sem_res.adb (Resolve_Type_Conversion): Do not
             install a predicate check here since this is already done 
during
             the expansion phase. Verify whether the operand satisfies the
             static predicate (if any) of the target type.
             * sem_ch3.adb (Analyze_Object_Declaration): Do
             not install a predicate check if the object is initialized by
             means of a type conversion because the conversion is subjected
             to the same check.

     2017-04-27  Tristan Gingold  <gingold@adacore.com>

             * raise.c (__gnat_builtin_longjmp): Remove.
             (__gnat_bracktrace):
             Add a dummy definition for the compiler (__gnat_eh_personality,
             __gnat_rcheck_04, __gnat_rcheck_10) (__gnat_rcheck_19,
             __gnat_rcheck_20, __gnat_rcheck_21) (__gnat_rcheck_30,
             __gnat_rcheck_31, __gnat_rcheck_32): Likewise.
             * a-exexpr.adb: Renamed from a-exexpr-gcc.adb
             * a-except.ads, a-except.adb: Renamed from a-except-2005.ads
             and a-except-2005.adb.
             * raise-gcc.c: Allow build in compiler, compiled as a C++
             file.
             (__gnat_Unwind_ForcedUnwind): Adjust prototype.
             (db): Constify msg_format.
             (get_call_site_action_for): Don't use void arithmetic.
             * system.ads (Frontend_Exceptions): Set to False.
             (ZCX_By_Default): Set to True.
             (GCC_ZC_Support): Set to True.
             * gcc-interface/Makefile.in: No more variants for 
a-exexpr.adb and
             a-except.ad[sb].
             * gcc-interface/Make-lang.in: Add support for backend zcx 
exceptions
             in gnat1 and gnatbind.
             * gnat1, gnatbind: link with raise-gcc.o, a-exctra.o, 
s-addima.o,
             s-excmac.o, s-imgint.o, s-traceb.o, s-trasym.o, s-wchstw.o
             * s-excmac.ads, s-excmac.adb: Copy of variants.
             * a-except.o: Adjust preequisites.
             Add handling of s-excmac-arm.adb and s-excmac-gcc.adb.



     git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247301 
138bc75d-0d04-0410-961f-82ee72b054a4

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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

* Re: RISC-V and Ada: undefined references to `__gnat_raise_nodefer_with_msg'
  2018-07-03  5:22   ` Sebastian Huber
@ 2018-07-03  7:10     ` Eric Botcazou
  2018-07-04  5:37       ` Sebastian Huber
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Botcazou @ 2018-07-03  7:10 UTC (permalink / raw)
  To: Sebastian Huber; +Cc: gcc

> It seems the a-except.adb was replaced by  a-except-2005.adb in this commit:

Right, it's by design, the old support for SJLJ exceptions has been ditched 
for full runtimes.  You probably just need to swap the values of

   Frontend_Exceptions       : constant Boolean := True;
   ZCX_By_Default            : constant Boolean := False;

in system-rtems.ads.

-- 
Eric Botcazou

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

* Re: RISC-V and Ada: undefined references to `__gnat_raise_nodefer_with_msg'
  2018-07-03  7:10     ` Eric Botcazou
@ 2018-07-04  5:37       ` Sebastian Huber
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastian Huber @ 2018-07-04  5:37 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: gcc

On 03/07/18 09:10, Eric Botcazou wrote:
>> It seems the a-except.adb was replaced by  a-except-2005.adb in this commit:
> Right, it's by design, the old support for SJLJ exceptions has been ditched
> for full runtimes.  You probably just need to swap the values of
>
>     Frontend_Exceptions       : constant Boolean := True;
>     ZCX_By_Default            : constant Boolean := False;
>
> in system-rtems.ads.

Thanks, this worked.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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

end of thread, other threads:[~2018-07-04  5:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02 13:47 RISC-V and Ada: undefined references to `__gnat_raise_nodefer_with_msg' Sebastian Huber
2018-07-02 20:03 ` Eric Botcazou
2018-07-03  5:22   ` Sebastian Huber
2018-07-03  7:10     ` Eric Botcazou
2018-07-04  5:37       ` Sebastian Huber

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).