RaspberryPI ADA-build causes: undefined reference to `__sync_synchronize'
Jan Sommer
soja-misc at aries.uberspace.de
Thu Jun 4 21:19:36 UTC 2015
Ok, in case someone else stumbles upon this, here is how I solved it with
Sebastians help:
Create a file cpukit/score/cpu/arm/armv4-sync-synchronize.c with:
void
__sync_synchronize (void)
{
asm volatile("" : : : "memory");
}
Add "libscorecpu_a_SOURCES += arm-exception-default.c" to
cpukit/score/cpu/arm/Makefile.am
Bootstrap and recompile. The linking now works fine. Running the binary still
shows some issues, but this can very well be due to my configuration.
One last question would be if there is a define I could use with an ifdef to
check if the build is used for the raspberry pi, so that other bsps won't be
affected?
Best regards,
Jan
Am Montag, 1. Juni 2015, 22:29:31 schrieb Sebastian Huber:
> ----- Jan Sommer <soja-misc at aries.uberspace.de> schrieb:
> > Am Freitag, 22. Mai 2015, 08:30:24 schrieb Sebastian Huber:
> > > > I found this thread where it seems to have been discussed before, but
> > > > don't see if and how it was solved:
> > > > http://gcc.gnu.org/ml/gcc/2012-03/msg00083.html What would be a
> > > > starting
> > > > point to fix this issue?
> > >
> > > Which GCC options do you use to build or link to the Ada library? It
> > > should work for the RPI 2, for the RPI 1 we lack a suitable multilib. So
> > > something like this is necessarry:
> > >
> > > https://gcc.gnu.org/ml/gcc/2012-03/msg00090.html
> >
> > It may be a stupid question, but for the RPI1 I still don't get where I
> > would add the function. Somewhere in the gcc sources before compiling the
> > cross compiler toolchain, in the rtems sources or in the user program?
> > I found the same mailinglist thread you point to, but unfortunately there
> > it's not explained.
>
> Its not a stupid question. Adding this to GCC would be a very difficult
> task. I would add it to RTEMS
> (cpukit/score/cpu/arm/armv4-sync-synchronize.c).
More information about the users
mailing list