Cc linking errors on freebsd

I am currently running on Aarch64. I run into these linking errors a couple of times, what are the reasons?
Error occurs after : env RUSTC_BOOTSTRAP=1 rustc lib.rs
linking with cc failed: exit code: 1 |

= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/usr/local/lib/rustlib/aarch64-unknown-freebsd/lib" "lib.lib.7rcbfp3g-cgu.0.rcgu.o" "lib.lib.7rcbfp3g-cgu.1.rcgu.o" "lib.lib.7rcbfp3g-cgu.10.rcgu.o" "lib.lib.7rcbfp3g-cgu.11.rcgu.o" "lib.lib.7rcbfp3g-cgu.12.rcgu.o" "lib.lib.7rcbfp3g-cgu.13.rcgu.o" "lib.lib.7rcbfp3g-cgu.14.rcgu.o" "lib.lib.7rcbfp3g-cgu.15.rcgu.o" "lib.lib.7rcbfp3g-cgu.2.rcgu.o" "lib.lib.7rcbfp3g-cgu.3.rcgu.o" "lib.lib.7rcbfp3g-cgu.4.rcgu.o" "lib.lib.7rcbfp3g-cgu.5.rcgu.o" "lib.lib.7rcbfp3g-cgu.6.rcgu.o" "lib.lib.7rcbfp3g-cgu.7.rcgu.o" "lib.lib.7rcbfp3g-cgu.8.rcgu.o" "lib.lib.7rcbfp3g-cgu.9.rcgu.o" "-o" "lib" "lib.tfopzikheuhsghu.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/usr/local/lib/rustlib/aarch64-unknown-freebsd/lib" "-Wl,-Bstatic" "/usr/local/lib/rustlib/aarch64-unknown-freebsd/lib/liballoc-d5ce234b3bdf21fa.rlib" "/usr/local/lib/rustlib/aarch64-unknown-freebsd/lib/librustc_std_workspace_core-78862a1491686402.rlib" "/usr/local/lib/rustlib/aarch64-unknown-freebsd/lib/libcore-d17265b5cbf31d7a.rlib" "/usr/local/lib/rustlib/aarch64-unknown-freebsd/lib/libcompiler_builtins-091b6a68b7cf060c.rlib" "-Wl,-Bdynamic"

      '= note: ld: error: undefined symbol: atexit
      referenced by crt1.c:73 (/usr/src/lib/csu/aarch64/crt1.c:73)
      >>>               /usr/lib/Scrt1.o:(start)
      >>> referenced by ignore_init.c:111 (/usr/src/lib/csu/common/ignore_init.c:111)
      >>>               /usr/lib/Scrt1.o:(handle_static_init)`

      ld: error: undefined symbol: _init_tls
      >>> referenced by crt1.c:75 (/usr/src/lib/csu/aarch64/crt1.c:75)
      >>>               /usr/lib/Scrt1.o:(start)

      ld: error: undefined symbol: exit
      >>> referenced by crt1.c:84 (/usr/src/lib/csu/aarch64/crt1.c:84)
      >>>               /usr/lib/Scrt1.o:(__start)

     ld: error: undefined symbol: _Unwind_Resume
      referenced by lib.7rcbfp3g-cgu.10
      >>>               lib.lib.7rcbfp3g-cgu.10.rcgu.o:(core::result::Result$LT$T$C$E$GT$::unwrap::hcfee0ec9387ace91)
      >>> referenced by lib.7rcbfp3g-cgu.4
      >>>               lib.lib.7rcbfp3g-cgu.4.rcgu.o:(start)

      ld: error: undefined symbol: memset
      >>> referenced by lib.7rcbfp3g-cgu.12
      >>>               lib.lib.7rcbfp3g-cgu.12.rcgu.o:(core::fmt::Arguments::new_v1::hd77a6f8c38fe4579)
      >>> referenced by lib.7rcbfp3g-cgu.3
      >>>               lib.lib.7rcbfp3g-cgu.3.rcgu.o:(core::fmt::Write::write_char::h013bf1499320176c)

      ld: error: undefined symbol: memmove
      >>> referenced by lib.7rcbfp3g-cgu.2
      >>>               lib.lib.7rcbfp3g-cgu.2.rcgu.o:(core::intrinsics::copy::h982f52f9d948f0ca)

      ld: error: undefined symbol: memcpy
      >>> referenced by lib.7rcbfp3g-cgu.3
      >>>               lib.lib.7rcbfp3g-cgu.3.rcgu.o:(core::fmt::Write::writefmt::h160af0867b64b16c)
      >>> referenced by lib.7rcbfp3g-cgu.3
      >>>               lib.lib.7rcbfp3g-cgu.3.rcgu.o:($LT$$RF$mut$u20$W$u20$as$u20$core..fmt..Write$GT$::write_fmt::h25835a4113b5a201)
      >>> referenced by lib.7rcbfp3g-cgu.6
      >>>               lib.lib.7rcbfp3g-cgu.6.rcgu.o:(rust_begin_unwind)

      ld: er`

These function names (memset, memcpy, memmove, exit, atexit) look suspiciously like they are from the C standard library. Do you have a working C toolchain installed?