Package: musl
Version: 1.2.2-1
Severity: normal
X-Debbugs-Cc: j...@joshtriplett.org

aarch64 gcc appears to default to -moutline-atomics, which causes gcc to
emit references to function symbols for atomic operations rather than
inlining the corresponding instruction sequences.

However, musl doesn't appear to provide the corresponding function
symbols. This results in errors like these (from compiling libgit2):

attrcache.c:(.text.git_attr_cache__get+0x144): undefined reference to 
`__aarch64_swp8_acq_rel'
attrcache.c:(.text.git_attr_cache__get+0x158): undefined reference to 
`__aarch64_ldadd4_acq_rel'
attrcache.c:(.text.git_attr_cache__get+0x168): undefined reference to 
`__aarch64_swp8_acq_rel'
attrcache.c:(.text.git_attr_cache__get+0x180): undefined reference to 
`__aarch64_swp8_acq_rel'
attrcache.c:(.text.git_attr_cache__get+0x224): undefined reference to 
`__aarch64_cas8_acq_rel'
attrcache.c:(.text.git_attr_cache__get+0x248): undefined reference to 
`__aarch64_swp8_acq_rel'

Would it make sense for the aarch64 musl-gcc wrapper to pass
-mno-outline-atomics, which resolves this problem and makes gcc no
longer emit references to those symbols?

Reply via email to