libmetal/atomic: enable 64-bit atomic by toolchain builtin flags #313
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix compile error:
arm-none-eabi-ld: (remoteproc_virtio.o): in function
metal_io_read': metal/io.h:252: undefined reference to
__atomic_load_8' arm-none-eabi-ld: (remoteproc_virtio.o): in functionmetal_io_write': metal/io.h:290: undefined reference to
__atomic_store_8'Not all 32-bit architectures support 64bit atomic, gcc/clang toolchains have built-in properties to indicate whether support atomic64:
| $ arm-none-eabi-gcc -march=armv7e-m -dM -E - < /dev/null | grep SYNC | #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
| #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
| #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1