build: wasm: wamrc: Make WAMR and its toolchain buildable on raspbian
Signed-off-by: Hiroshi Hatake [email protected]
In raspbian, its provided gcc does not support -mindirect-branch-register compiler option.
We should check whether the compiler option is supported or not before specifying it on C_FLAGS.
Also, we have to handle armv6 or armv7 platform on our CMakeLists.txt for WAMR,
Enter [N/A] in the box, if an item is not applicable to your change.
Testing Before we can approve your change; please submit the following in a comment:
- [ ] Example configuration file for the change
- [ ] Debug log output from testing the change
- [ ] Attached Valgrind output that shows no leaks or memory corruption was found
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
- [x] Attached local packaging test output showing all targets (including any new ones) build.
# ...
checking size of int... no
checking for TLS... [ 15%] Building C object src/wasm/CMakeFiles/vmlib-static.dir/__/__/lib/wasm-micro-runtime-fast-jit-06-29-2022/core/iwasm/libraries/thread-mgr/thread_manager.c.o
yes
checking whether C11 atomics is compilable... [ 16%] Linking C static library ../../../library/libxxhash.a
4
checking size of short... no
checking whether GCC __atomic atomics is compilable... [ 16%] Built target xxhash
Scanning dependencies of target snappy-c
[ 16%] Building C object lib/snappy-fef67ac/CMakeFiles/snappy-c.dir/snappy.c.o
[ 16%] Linking C static library ../../library/libvmlib-static.a
[ 16%] Built target vmlib-static
The details of building log is attached: raspbian-build.log
Documentation
- [ ] Documentation required for this feature
Backporting
- [ ] Backport to latest stable release.
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.
We need to this PR to build WAMR for armv7 or armv6 environment such as raspbian.