Linker Issue on FreeBSD

Hi! I have recently shifted from EndeavourOS to FreeBSD, and I am having an interesting problem with building packages.

If I am to cargo install a crate, it builds well enough, and I can run the resultant executable just fine. However, if I am to cargo build a crate, I get a linker error of the following flavour

 = note: ld: error: undefined symbol: main
         >>> referenced by crt1_s.S:64 (/usr/src/lib/csu/amd64/crt1_s.S:64)
          >>>               /usr/lib/Scrt1.o:(_start)

This was from an empty crate produced with cargo new, with no dependencies whatsoever. I could reproduce it from both the rustc installed from the FreeBSD ports tree, as well as that installed by rustup.

How can I circumvent this?

Does this help?

Alas, this does not.
The specific rustc process that is producing an error is

rustc --crate-name freedom --edition=2024 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=191 --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values())' -C metadata=ea5bbe1cdfde9ea9 -C extra-filename=-bba0c039d0114bd7 --out-dir /home/jonisavage/Z/Programs/RustCrates/freedom/target/debug/deps -C incremental=/home/jonisavage/Z/Programs/RustCrates/freedom/target/debug/incremental -L dependency=/home/jonisavage/Z/Programs/RustCrates/freedom/target/debug/deps -C default_linker_libraries

Works fine for me:

(installed the Rust toolchain with rustup, the rest is a standard FreeBSD 15.0 install)