Cross-compiling Go with CGO for ARM64

Hey Team,

I’m looking for some advice on cross-compiling a Go application for ARM64 where CGO_ENABLED=1.

We previously tackled a runtime issue in AWS Lambda related to missing shared libraries (libpcsclite.so.1). The fix involved using an Amazon Linux 2 base image, installing the required libraries, and manually copying them into our deployment package.

Now, the challenge is building the ARM64 binary from our Jenkins agent, which runs on AMD64. Since we need CGO_ENABLED=1, I’m a bit lost on which cross-compiler (CC) I should be using to correctly target the ARM64 architecture in this setup.

Any tips or recommended approaches would be super helpful!