Skip to content

Conversation

@wyr-7
Copy link
Contributor

@wyr-7 wyr-7 commented Oct 10, 2024

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 function metal_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

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 function `metal_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

Signed-off-by: chao an <anchao@lixiang.com>
@arnopo arnopo requested review from arnopo, edmooring and tnmysh October 16, 2024 14:55
@arnopo
Copy link
Contributor

arnopo commented Oct 16, 2024

This PR is a duplication of #301 ( waiting more details on the issue)
@anchao, @wyr-7 , please close one of the PR and provide more details on the issue as requested by @wmamills

@CV-Bowen
Copy link
Contributor

@anchao Could you continue your PR? If so, @wyr-7 will close PR.

@anchao
Copy link
Contributor

anchao commented Oct 17, 2024

@anchao Could you continue your PR? If so, @wyr-7 will close PR.

@CV-Bowen OK, thanks, I updated some test results in this PR
#301 (comment)

@wyr-7 wyr-7 closed this Oct 18, 2024
@arnopo arnopo modified the milestone: Release v2024.10 Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants