This is the mail archive of the
mailing list for the GCC project.
Re: gnat 4.9.2 on arm with rtems
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: Jan Sommer <soja-lists at aries dot uberspace dot de>, gcc at gcc dot gnu dot org
- Cc: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- Date: Thu, 29 Oct 2015 11:46:12 +0100
- Subject: Re: gnat 4.9.2 on arm with rtems
- Authentication-results: sourceware.org; auth=none
- References: <7240505 dot X6MuHlINPd at kubuntu> <5675608 dot 1aALmrqTrt at kubuntu> <2C374C6C-1183-4F0D-9DF4-7AD574462DB1 at oarcorp dot com> <1527588 dot 3E1Hr2Vsep at kubuntu>
On 28/10/15 15:22, Jan Sommer wrote:
I got it working. The Set function was always overwriting the address of the previous ATCB, so STPO.Self was always returning the ATCB of the task created last.
It turns out that I was building rtems without the --enable-ada option. The option is not mentioned in configure --help and gnat still builds fine.
Would it be possible to not have the symbol rtems_task_self if the --enable-ada switch is off? Then linking gnat should fail with an undefined reference.
I don't know too much of the rtems internals, but maybe it is as easy as adding ifdefs around the SCORE_EXTERN void *rtems_ada_self in score/threadimpl.h?
Since you work on this area, this task variable should go way, since its
broken on SMP systems. I would replace it
o with functions, e.g. rtems_ada_get_self() and
o POSIX keys, or
o thread-local storage.
POSIX keys and thread-local storage would make the --enable-ada option
superfluous. Thread-local storage is more efficient. It is well
supported on ARM, PowerPC and SPARC on RTEMS.
@Joel: What shall I do about the changes I made to gcc/ada/s-osinte-rtems.ads and newlib/libc/sys/rtems/sys/cpuset.h ? Just send the patches to you or should I push them to the respective lists with you CC?
Please send them as patches to the corresponding lists and CC
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 : firstname.lastname@example.org
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.