Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: explicitly link the atomic library
For arm & mips architecture, the linker must explicitly be asked to link the atomic library (with `-latomic`). Otherwise, the linking fails with: ``` | devel/lib/libmavros.so: undefined reference to `__atomic_load_8' | devel/lib/libmavros.so: undefined reference to `__atomic_store_8' | collect2: error: ld returned 1 exit status ``` Linking `atomic` unconditionally as library is strictly needed only for arm & mips, but it seems not to imply any further differences with other architectures. Hence, this commit simply adds `atomic` unconditionally for a uniform handling of all machine architectures. This is an alternative solution to the proposed solution in mavlink#790. The issue was discovered cross-compiling mavros in meta-ros, the OpenEmbedded layer for ROS. Some further pointers are available at: ros/meta-ros#525 Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
- Loading branch information