[cfe-users] Clang9 UBSan and GMP

Hans Åberg via cfe-users cfe-users at lists.llvm.org
Sat Nov 2 02:30:35 PDT 2019


> On 2 Nov 2019, at 02:36, Matthew Fernandez <matthew.fernandez at gmail.com> wrote:
> 
>> Both GCC and Clang can be conveniently installed using MacPorts. The Apple inhouse clang is weird.
> 
> I haven’t followed the rest of this thread closely, but do you have a reference for the GMP developers abandoning Clang on macOS? Or were you referring to their comment about Clang on the page I linked? Personally I regularly use GMP with a macOS-supplied Clang without any issues. Admittedly not for any extreme numerical computation, but my experience is that GMP works fine in this scenario.

It was reported on the GMP developer list that 'make check’ failed for the Apple inhouse Clang, and the developers suggested using GCC instead, which however was not available at that time on MacOS 10.15. So I called it “not supported” meaning that they do not actively work on handling such issues, though it may still work.

If you have worries for accuracy, you might compile the GMP library using GCC, or turning off optimization with Clang.





More information about the cfe-users mailing list