-Wl,--as-needed omits libm when building with BFD linker (e.g., from GNU binutils 2.32). Affects FreeBSD 11.* amd64/armv6/i386, 12.0 armv6/i386 (where LLD is not default yet).
Fixes https://bugs.llvm.org/show_bug.cgi?id=32279
$ LDFLAGS=-fuse-ld=bfd cmake . $ make libomp-micro-tests [...] ld: error: runtime/src/libomp.so: undefined reference to scalbnl ld: error: runtime/src/libomp.so: undefined reference to fmaxl ld: error: runtime/src/libomp.so: undefined reference to logbl ld: error: runtime/src/libomp.so: undefined reference to scalbnf ld: error: runtime/src/libomp.so: undefined reference to scalbn