swift 5.9 doesn’t work on Amazon Linux 2023, due to missing ld.gold:
error: link command failed with exit code 1 (use -v to see invocation)
clang-13: error: invalid linker name in argument '-fuse-ld=gold'
there is no way to obtain ld.gold from binutils on AL2023 due to an intentional decision by Amazon to drop support for ld.gold in favor of lld.
how do we use swift on Amazon Linux 2023?