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

Sebastian Huber sebastian.huber at embedded-brains.de
Fri May 22 06:30:24 UTC 2015



On 21/05/15 23:01, Jan Sommer wrote:
> Hi,
>
> I managed to build rtems toolchain with ADA support for the raspberry pi, but ran into the following problem when trying to link my first test program:
>
> /opt/rtems-4.11-pi/lib/gcc/arm-rtems4.11/4.9.2/adalib/libgnarl.a(a-retide.o): In function `ada__real_time__delays__delay_until':
> /home/taste/rtems-build/build_rtems-4.11-pi/gcc-cross-ada-4.9.2/b-gcc-4.9.2-arm-rtems4.11/gcc/ada/rts/a-retide.adb:60: undefined reference to `__sync_synchronize'
> /home/taste/rtems-build/build_rtems-4.11-pi/gcc-cross-ada-4.9.2/b-gcc-4.9.2-arm-rtems4.11/gcc/ada/rts/a-retide.adb:60: undefined reference to `__sync_synchronize'
> /opt/rtems-4.11-pi/lib/gcc/arm-rtems4.11/4.9.2/adalib/libgnarl.a(a-sytaco.o): In function `ada__synchronous_task_control__suspend_until_true':
> /home/taste/rtems-build/build_rtems-4.11-pi/gcc-cross-ada-4.9.2/b-gcc-4.9.2-arm-rtems4.11/gcc/ada/rts/a-sytaco.adb:95: undefined reference to `__sync_synchronize'
> /home/taste/rtems-build/build_rtems-4.11-pi/gcc-cross-ada-4.9.2/b-gcc-4.9.2-arm-rtems4.11/gcc/ada/rts/a-sytaco.adb:95: undefined reference to `__sync_synchronize'
> /opt/rtems-4.11-pi/lib/gcc/arm-rtems4.11/4.9.2/adalib/libgnarl.a(s-taprob.o): In function `system__tasking__protected_objects__lock':
> /home/taste/rtems-build/build_rtems-4.11-pi/gcc-cross-ada-4.9.2/b-gcc-4.9.2-arm-rtems4.11/gcc/ada/rts/s-taprob.adb:148: undefined reference to `__sync_synchronize'
> /opt/rtems-4.11-pi/lib/gcc/arm-rtems4.11/4.9.2/adalib/libgnarl.a(s-taprob.o):/home/taste/rtems-build/build_rtems-4.11-pi/gcc-cross-ada-4.9.2/b-gcc-4.9.2-arm-rtems4.11/gcc/ada/rts/s-taprob.adb:148: more undefined references to `__sync_synchronize' follow
> collect2: error: ld returned 1 exit status
> arm-rtems4: error when calling /opt/rtems-4.11-pi/bin/arm-rtems4.11-gcc
>
> 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

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