[compiler-rt][libc][GPU] Fix 7 builtin unit test build failure for spirv64 targets (#236324)

When building compiler-rt builtin unit test for spirv64 target, we
encountered a bunch of build failure due to missing symbols from libm
and libc. This PR adds part of required symbols needed by those tests
which can make 7 failed unit tests to build pass.
Using following command to build llvm-project:
cmake ../llvm -G Ninja -DLLVM_ENABLE_PROJECTS="clang"
-DRUNTIMES_spirv64-unknown-unknown_LLVM_ENABLE_RUNTIMES="compiler-rt;libc"
-DLLVM_RUNTIME_TARGETS="default;spirv64-unknown-unknown"
-DRUNTIMES_spirv64-unknown-unknown_COMPILER_RT_INCLUDE_TESTS=ON
-DRUNTIMES_spirv64-unknown-unknown_COMPILER_RT_EMULATOR=/bin/true
ninja all
ninja check-compiler-rt-spirv64-unknown-unknown
Before the fix, the build result was:
Total Discovered Tests: 275
  Unsupported: 125 (45.45%)
  Passed     : 123 (44.73%)
  Failed     :  27 (9.82%)

After the fix, the build result was:
Total Discovered Tests: 275
  Unsupported: 125 (45.45%)
  Passed     : 128 (46.55%)
  Failed     :  22 (8.00%)

All libc and libm symbols added are simple functions without using RPC
mechanism and verified for spirv64 targets with Level_Zero and Intel GPU
devices on Linux platform.

---------

Signed-off-by: jinge90 <ge.jin@intel.com>
Co-authored-by: Joseph Huber <huberjn@outlook.com>
GitOrigin-RevId: c7233566764726c242ffa2335b0aca9781c57235
7 files changed