I had a similar problem. It seems the symbol is not defined by the gcc compiler support library that my system has, but if I tell clang to use clang's runtime library, it works:
clang --rtlib=compiler-rt ...
(I got the syntax from https://github.com/llvm/llvm-project/issues/54698#issue-1189790559 - which is handy because the manual entry for that option is extremely terse.)