membar-related compiler errors on sparc64
(too old to reply)
Kaashif Hymabaccus
2017-12-20 22:32:48 UTC
Raw Message
I've been trying to get some programs to compile and run on sparc64. I
have been running into some issues compiling some ports, like
games/lugaru and games/hyperrogue. Looking at the mail archive, I see
that the sparc64 bulk build has the same error, look at
for an example.

The error is something to do with the membar instruction being an
unexpected token, so it's something to do with being on sparc64:

In file included from /usr/local/include/c++/4.9.4/bits/shared_ptr.h:52:
/usr/local/include/c++/4.9.4/bits/shared_ptr_base.h:156:10: error: unexpected token
/usr/local/include/c++/4.9.4/sparc64-unknown-openbsd6.2/bits/atomic_word.h:38:21: note: expanded from macro '_GLIBCXX_READ_MEM_BARRIER'
__asm __volatile ("membar #LoadLoad":::"memory")
<inline asm>:1:9: note: instantiated into assembly here
membar #LoadLoad

I don't have any idea how to overcome this, any help would be
Kaashif Hymabaccus
GPG: 3E810B04