Summary: | Undefined reference to __sync_add_and_fetch_8 for int64_t on MIPS32. | ||
---|---|---|---|
Product: | gcc | Reporter: | Balazs Kilvady <kilvadyb> |
Component: | libgcc | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | jakub |
Priority: | P3 | ||
Version: | unknown | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: |
Description
Balazs Kilvady
2013-02-12 11:41:43 UTC
Why do you think this is a bug? If a target doesn't support atomic operations on certain variable sizes, this is what you get, you are out of luck with atomicity in that case. In GCC 4.8 you can use libatomic which will provide emulation for that case using locks (though, of course, in that case all accesses to the var need to be done using atomic builtins). (In reply to comment #1) > Why do you think this is a bug? If a target doesn't support atomic operations > on certain variable sizes, this is what you get, you are out of luck with > atomicity in that case. In GCC 4.8 you can use libatomic which will provide > emulation for that case using locks (though, of course, in that case all > accesses to the var need to be done using atomic builtins). Thank you for the quick reply. To get 64bit __sync_add_and_fetch on MIPS, you need to use either n32, n64 or o64 ABIs or manually use the 64bit instructions if you know you are only to run on some 64bit processors. |