Scenario: - FreeBSD main latest - Cross-compiling for armv6 target RPI-B on an amd64 machine: [0]# cd /usr/src [0]# make -j8 buildworld buildkernel KERNCONF="RPI-B GENERIC VERSATILEPB" TARGET=arm TARGET_ARCH=armv6 |& tee /usr/obj$PWD/make.-j8.buildworld.buildkernel.KERNCONF=RPI-B.GENERIC.VERSATILEPB.TARGET=arm.TARGET_ARCH=armv6.`stddate`@`hostname -s` - /usr/src and /usr/obj are shared via NFS (autofs) - On the target machine (Raspberry Pi B+, hostname rpi-b), executing [0]# cd /usr/src [0]# nice -20 make installkernel installworld KERNCONF="RPI-B" DESTDIR=/d/26s4a/usr/VOL/rpi-b/tmp/x |& tee /d/26s4a/usr/VOL/rpi-b/tmp/make.installkernel.installworld.KERNCONF=RPI-B.DESTDIR=_d_26s4a_usr_VOL_rpi-b_tmp_x.`stddate`@`hostname -s` Result: - The command fails with (the paths below reflect their absolute position, /usr/src and /usr/obj are appropriate symlinks): /bin/sh: make: Exec format error *** Error code 126 Stop. make[1]: stopped in /net/hal/z/SRC/FreeBSD/src/MBi/main *** Error code 1 Stop. make: stopped in /net/hal/z/SRC/FreeBSD/src/MBi/main - The reason is that make(1) is found in /usr/obj/usr/src/arm.armv6/tmp/legacy/bin/make, but this is an amd64 executable. Expected result: - The directory /usr/obj/usr/src/tmp should be named according to the host architecture, e.g., /usr/obj/usr/src/tmp.amd64.amd64 - This shall avoid it being found on the target machine. -- Martin