Cross-Compiling RPi Ports From amd64 Using Native Toolchain
Jeremy Brown
mischif at mischivous.com
Sun Jan 4 17:19:35 UTC 2015
Okay, so I've run make toolchain, copied it over to my chroot and tried to
run make configure again, but the make still fails at the "checking whether
we are cross compiling" stage; I've checked config.log and it seems that
the cross-compiler can compile the test file (the return code is 0), but
when it tries to execute it the return code is 134 and I get the ELF
interpreter error again. I tried symlinking /libexec to
/usr/obj/usr/src/tmp/usr/libexec, with no success. Is it possible that the
toolchain isn't targeting the correct architecture? Won't env -u TARGET -u
TARGET_ARCH keep make from knowing what it's supposed to target and build
for x64 instead?
-Jeremy
On Sat, Jan 3, 2015 at 2:39 PM, Tim Kientzle <tim at kientzle.com> wrote:
>
> > On Jan 2, 2015, at 7:42 PM, Jeremy Brown <mischif at mischivous.com> wrote:
> >
> > One additional thing: I checked my toolchain and did see that some of my
> > programs (ar, as, cc, gcc, ld, ranlib) are statically linked, whereas the
> > rest are dynamically linked, including cpp and nm which also gave me the
> > ELF interpreter error. So I'll change my question somewhat - if I use the
> > command given on the qemu page (env -u TARGET -u TARGET_ARCH make -j 4
> > toolchain) instead of the one provided by crochet (make XDEV=${XDEV}
> > XDEV_ARCH=${XDEV_ARCH} WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG=1
> > WITHOUT_CLANG_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1 WITHOUT_TESTS=1 xdev),
> > would I be more likely to succeed in cross-compiling my ports and will I
> be
> > able to use this toolchain to build the kernel and world with crochet?
>
> You should install both and use them for different purposes:
>
> Crochet uses the ‘xdev’ tools *only* for compiling the U-Boot boot
> loader. (It does *not* use it for building kernel and world. The
> standard FreeBSD build infrastructure automatically builds appropriate
> cross-compilers as needed for kernel and world.)
>
> Tim
>
>
More information about the freebsd-arm
mailing list