westonpace commented on pull request #10404: URL: https://github.com/apache/arrow/pull/10404#issuecomment-858115530
@thisisnic Not quite. We don't want to link to libatomic on all non-windows non-apple architectures. Most Linux architectures will have atomics provided by gcc itself. I googled a bit and it seems there are several options. * You could add an ARROW_IS_RPI cmake flag but, as I understand it, this is the least preferred because it passes the burden back on the user to pass it in at the right time. * Probably the ideal would be to identify a C function that is missing without libatomic and use the test they use for `pow` in this example: https://stackoverflow.com/questions/32816646/can-cmake-detect-if-i-need-to-link-to-libm-when-using-pow-in-c * However, I don't think libatomic actually adds new functions. Instead it adds supports for C builtin language features. However, you could create a small C program and try to compile that, there is an example of that on the same SO page. * Perhaps there is some existing cmake flag or test you could perform to see if you are on raspberry pi, similar to how we detect simd level. Sorry for so many options. I just don't really know which one would be the best to choose. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org