I am running FreeBSD 14 on arm64. I need to build some binaries (from C source) targeting FreeBSD 14 on amd64.
I can cross compile without issue:
But I am not able to link:
Presumably I need to install some package(s) that includes the amd64 libraries? Can anyone advise which package(s) are needed? Also, is anything else needed to get this working?
Thanks.
I can cross compile without issue:
$ cc -target x86_64-unknown-freebsd -c -o mss.o mss.c
$ file mss.o
mss.o: ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), not stripped
But I am not able to link:
$ cc -target x86_64-unknown-freebsd -o mss mss.c
ld: error: /tmp/mss-46ecd7.o is incompatible with /usr/lib/crt1.o
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Presumably I need to install some package(s) that includes the amd64 libraries? Can anyone advise which package(s) are needed? Also, is anything else needed to get this working?
Thanks.