RaspberryPI ADA-build causes: undefined reference to `__sync_synchronize'

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Jun 9 08:49:13 UTC 2015



On 05/06/15 15:44, Gedare Bloom wrote:
> On Thu, Jun 4, 2015 at 5:19 PM, Jan Sommer<soja-misc at aries.uberspace.de>  wrote:
>> >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
>> >
> I guess you probably meant add armv4-sync-synchronize.c ?
>
>> >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.
>> >
> It would be great if you could submit a patch when you are confident
> about it.https://devel.rtems.org/wiki/Developer/Contributing
>
>> >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?
>> >
> I would guess this asm is valid across other ARM BSPs too, and the fix
> probably would help them for building Ada also. We avoid any
> BSP-specific ifdef in cpukit.

On ARMv7 this implementation is wrong.  It should be valid for all 
multilib variants (you can use the ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS 
define).

-- 
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 at embedded-brains.de
PGP     : Public key available on request.

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



More information about the users mailing list