Cross compile FreeBSD on amd64 for arm64 failes via compile determination error
Ian Lepore
ian at freebsd.org
Fri Jun 5 23:25:51 UTC 2020
On Fri, 2020-06-05 at 20:30 +0200, Gordon Bergling via freebsd-hackers
wrote:
> Hi,
>
> I usualy use a pretty straight forward technique to update some
> development systems to -CURRENNT. On amd64 -> amd64 everything
> went well, but on arm64 (Rasperry PI 4b) I get the following
> error messages, while I try to update the system via a NFS share.
>
> sh: cc: Exec format error
> make[2]: "/boiler/nfs/src/share/mk/bsd.compiler.mk" line 178: Unable
> to determine compiler type for CC=cc -target aarch64-unknown-
> freebsd13.0 --
> sysroot=/boiler/nfs/obj/boiler/nfs/src/arm64.aarch64/tmp
> -B/boiler/nfs/obj/boiler/nfs/src/arm64.aarch64/tmp/usr/bin. Consider
> setting COMPILER_TYPE.
>
> The command that produces the error is the following, which
> was executed on the arm64 system, so no TARGET directive is set.
>
> # env MAKEOBJDIRPREFIX=/boiler/nfs/obj make KERNCONF=GENERIC-TCP
> SRCCONF=/boiler/nfs/conf/src.conf installkernel
>
> Has anyone an idea what the problem is in this step of the
> installation?
>
> Any help is much appreciated.
>
> Kind regards,
>
> Gordon
>
You cannot do that. The installworld process uses a path that points
into the obj tree that got built (so that new binaries are used to do
the install work), and those binaries are compiled for the arch that
did the build.
-- Ian
More information about the freebsd-hackers
mailing list