From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 5 06:40:58 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C9F97106566C for ; Wed, 5 Sep 2012 06:40:58 +0000 (UTC) (envelope-from yerenkow@gmail.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id 92CCA8FC12 for ; Wed, 5 Sep 2012 06:40:58 +0000 (UTC) Received: by iebc12 with SMTP id c12so501107ieb.13 for ; Tue, 04 Sep 2012 23:40:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=+/yIZEyGPe+dOg/ifPcCLGfJbAhFvV4fqqw3jtVhqXg=; b=rNat/OqaLI2mU2Z3vLOvd5MSz0VS4JzTFOy8UNtqNUIGrzAicshMubJdOYRqEHSnOY FAklQ1tNvL0138kLHukmCWl/tEOMjJBJj1nPXcWyKlvKEdi1BoH9o55nFJfcJlN95B1P LhuPMSjZpK2SSfnG5xmZaCj0pbKzuHiErrhx1PQnP/8ZbkBo1up/j1ekBT0ip/nhyPr9 X/7UlLNTFSfaZ+XzWPJbKOZggrNjfwOP/Y0HiKglfUp2BH5F/XufLC4I225jYa/Zi9zM Q0iE7G1gLQWRDKDYA/TS3nMXSYkjbZSMBmJtH4X7uLiGJ3IX6RN0crGGe/XdagovWFiF ZfGg== MIME-Version: 1.0 Received: by 10.50.33.239 with SMTP id u15mr668584igi.54.1346827257817; Tue, 04 Sep 2012 23:40:57 -0700 (PDT) Received: by 10.64.28.36 with HTTP; Tue, 4 Sep 2012 23:40:57 -0700 (PDT) Date: Wed, 5 Sep 2012 09:40:57 +0300 Message-ID: From: Alexander Yerenkow To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Ports cross-compiling X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 06:40:58 -0000 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