Undefined Atomic Operations for ARM (gph wiz)

I update the recent svn and can build but during linking with the main
app produces these errors:

/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
__sync_lock_test_and_set_4' /arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to__sync_fetch_and_sub_4’
/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
__sync_sub_and_fetch_4' /arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to__sync_fetch_and_add_4’
/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
`__sync_add_and_fetch_4’

From the research ive done so far it appears these are supposed to be
provided by gcc and depends on the arch.
I think It may be that specific implementations need to be added to SDL
itself.
Im cross compiling SDL 1.3 for the gph wiz handheld.

Any ideas to get this working for ARM?

Scott

Does the Wiz have multiple CPUs or multiple CPU cores? If there is
only one concurrent thread of execution, synchronization between
threads is very simple as you only need to synchronize between the CPU
cache and main memory when someone yields the CPU.On Sun, Apr 11, 2010 at 3:07 PM, Scott wrote:

I update the recent svn and can build but during linking with the main
app produces these errors:

/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
__sync_lock_test_and_set_4' /arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to__sync_fetch_and_sub_4’
/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
__sync_sub_and_fetch_4' /arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to__sync_fetch_and_add_4’
/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
`__sync_add_and_fetch_4’

From the research ive done so far it appears these are supposed to be
provided by gcc and depends on the arch.
I think It may be that specific implementations need to be added to SDL
itself.
Im cross compiling SDL 1.3 for the gph wiz handheld.

Any ideas to get this working for ARM?

Scott


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/

Only one core, most ARM devices are. The only multi I know of is the new
OMAP4.On 04/11/2010 04:04 PM, Donny Viszneki wrote:

Does the Wiz have multiple CPUs or multiple CPU cores? If there is
only one concurrent thread of execution, synchronization between
threads is very simple as you only need to synchronize between the CPU
cache and main memory when someone yields the CPU.

On Sun, Apr 11, 2010 at 3:07 PM, Scott <@Scott_Smith> wrote:

I update the recent svn and can build but during linking with the main
app produces these errors:

/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
__sync_lock_test_and_set_4' /arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to__sync_fetch_and_sub_4’
/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
__sync_sub_and_fetch_4' /arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to__sync_fetch_and_add_4’
/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
`__sync_add_and_fetch_4’

From the research ive done so far it appears these are supposed to be
provided by gcc and depends on the arch.
I think It may be that specific implementations need to be added to SDL
itself.
Im cross compiling SDL 1.3 for the gph wiz handheld.

Any ideas to get this working for ARM?

Scott


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Scott writes:

I update the recent svn and can build but during linking with the main
app produces these errors:

/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
__sync_lock_test_and_set_4' /arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to__sync_fetch_and_sub_4’
/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
__sync_sub_and_fetch_4' /arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to__sync_fetch_and_add_4’
/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
`__sync_add_and_fetch_4’

From the research ive done so far it appears these are supposed to be
provided by gcc and depends on the arch.
I think It may be that specific implementations need to be added to SDL
itself.
Im cross compiling SDL 1.3 for the gph wiz handheld.

Any ideas to get this working for ARM?

IIRC this was a bug in gcc 4.3 already solved in gcc 4.4 series.–
Alberto

thanks Ill have to see if I can build that gcc versionOn 4/12/2010 3:36 AM, Alberto Luaces wrote:

Scott writes:

I update the recent svn and can build but during linking with the main
app produces these errors:

/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
__sync_lock_test_and_set_4' /arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to__sync_fetch_and_sub_4’
/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
__sync_sub_and_fetch_4' /arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to__sync_fetch_and_add_4’
/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
`__sync_add_and_fetch_4’

From the research ive done so far it appears these are supposed to be
provided by gcc and depends on the arch.
I think It may be that specific implementations need to be added to SDL
itself.
Im cross compiling SDL 1.3 for the gph wiz handheld.

Any ideas to get this working for ARM?

IIRC this was a bug in gcc 4.3 already solved in gcc 4.4 series.

Scott writes:> On 4/12/2010 3:36 AM, Alberto Luaces wrote:

Scott writes:

I update the recent svn and can build but during linking with the main
app produces these errors:

/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
__sync_lock_test_and_set_4' /arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to__sync_fetch_and_sub_4’
/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
__sync_sub_and_fetch_4' /arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to__sync_fetch_and_add_4’
/arm-openwiz-linux-gnu/lib/libSDL13.so: undefined reference to
`__sync_add_and_fetch_4’

From the research ive done so far it appears these are supposed to be
provided by gcc and depends on the arch.
I think It may be that specific implementations need to be added to SDL
itself.
Im cross compiling SDL 1.3 for the gph wiz handheld.

Any ideas to get this working for ARM?

IIRC this was a bug in gcc 4.3 already solved in gcc 4.4 series.

thanks Ill have to see if I can build that gcc version

In the meantime you can try to add “-lgcc_s -lgcc” to the end of your
link command with 4.3.


Alberto