-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
arch-aarch6464-bit ARM64-bit ARMbugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorenhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.
Milestone
Description
Zig Version
0.9.0-dev.1551+8346e011c
Steps to Reproduce
On aarch64 linux:
#include <stdatomic.h>
#include <stdio.h>
int main() {
atomic_int atomic_counter = 0;
atomic_counter++;
printf("%u\n", atomic_counter);
}
gcc main.c
zig cc main.c
gcc -moutline-atomics main.c
zig cc -moutline-atomics main.c
Expected Behavior
I expect all variations to compile and run correctly.
Actual Behavior
zig cc -moutline-atomics main.c
fails to compile:
ld.lld: error: undefined symbol: __aarch64_ldadd4_acq_rel
I discovered this issue while attempting to cross compile Rust to aarch64-linux with zig cc
. Rust enables outline atomics by default on aarch64-linux and currently prohibits disabling them.
irishgreencitrus, reo101, kassane, jirutka and yisibl
Metadata
Metadata
Assignees
Labels
arch-aarch6464-bit ARM64-bit ARMbugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorenhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.