-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined reference to __atomic_*
for simple c++ program
#183
Comments
oops, i'm on it |
Since these are legacy, it kind of seems like the right thing to do is to link libatomic.a into libgcc_s.so, until they are finally removed... is that possible? |
Nevermind. I've fixed it directly: riscvarchive/riscv-gcc@62da3c0 @kito-cheng @palmer-dabbelt can you give a careful code review? |
Look good to me, but I am curious why change to unsigned type? I seem signed and unsigned are both used in other target. |
For RV, at least, gcc seems to assume the return type is unsigned. If you On Monday, October 3, 2016, Kito Cheng notifications@github.com wrote:
|
We were hitting the same issue (in various packages) while building Fedora packages. |
@davidlt (we have already settled this on IRC, but I'm reposting for the benefit of anyone who stumbles on the ticket) programs which use C11 or C++11 atomics, like The effect is relatively small for x86 which has byte-sized atomic instructions; other arches like ARM see a greater effect (see for instance the Android NDK documentation which encourages |
riscv64 fails to build because the use of #include <atomic> needs to link with -latomic. per riscv-collab/riscv-gnu-toolchain#183 (comment)
riscv64 fails to build because the use of #include <atomic> needs to link with -latomic. per riscv-collab/riscv-gnu-toolchain#183 (comment)
riscv64 fails to build because the use of #include <atomic> needs to link with -latomic. per riscv-collab/riscv-gnu-toolchain#183 (comment)
riscv64 fails to build because the use of #include <atomic> needs to link with -latomic. per riscv-collab/riscv-gnu-toolchain#183 (comment)
Current toolchain will generate lots of undefined reference for simple c++ program, and it's seem cause by this patch riscvarchive/riscv-gcc@48f0f64 , it's made libgcc add dependency to libatomic.
For example:
The text was updated successfully, but these errors were encountered: