Ports cross-compiling

Alexander Yerenkow yerenkow at gmail.com
Wed Sep 5 06:40:58 UTC 2012


Hello all.
I'm currently trying to make poudriere cross compile some ports for arm
arch.
I'm using such command (as example):

env TARGET=arm TARGET_ARCH=armv6 TARGET_CPUARCH=armv6
PATH=/usr/obj/arm.armv6/usr/src/tmp/usr/bin:${PATH} CONFIGURE_HOST=amd64
STRIP_CMD=true make PKGNAMESUFFIX=-arm WRKDIRPREFIX=/tmp WITHOUT_CHECKS=yes
LOCALBASE=/usr/localarm6 -C /usr/ports/A/B package

I have problem:
1. When I run this command from chrooted env, all builds fine; configure
script make check if we cross-compiling, somehow it gets "no" and all goes
well.
2. When this command run by poudriere in jail, all fails as here:

checking whether we are cross compiling... configure: error: in
`/tmp/usr/ports/devel/pcre/work/pcre-8.31':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
===> Script "configure" failed unexpectedly.


So, I'd like to propose small changes to ports/Mk/bsd.port.mk

SET_LATE_CONFIGURE_ARGS= \

.....
if [ ! -z "${CONFIGURE_HOST}" ]; then \
_LATE_CONFIGURE_ARGS="$${_LATE_CONFIGURE_ARGS} --host=${CONFIGURE_HOST}" ; \
fi ; \
.....


And after this, builds going just fine (of course for ports that can be
cross-built).

Is it possible to accept this? Seems to me non-destructive patch.

-- 
Regards,
Alexander Yerenkow


More information about the freebsd-hackers mailing list