From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 14 20:46:40 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 9E710BD8 for ; Wed, 14 Nov 2012 20:46:40 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 083B58FC14 for ; Wed, 14 Nov 2012 20:46:39 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so899769lah.13 for ; Wed, 14 Nov 2012 12:46:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=gkVc2yjyYOKuwvdiimVvOJ7i+j52oZrKxTdtQ8Jn9/0=; b=PC67WoBL/RcTYFZKNU6YXVfwPzVrMV5TDQwZPAwC2mm79k6mb9XxKGDZ56Zc+OLeJX rUOLawqjsnuj5YLrcalbVs2AvJjNZxP0zg4C+HgzSlswHeN0X0eUc0n68Cya1vhou+dq lF1K3sm8Nhj55WnhhEMT01VlL3mPsRcW7Q8cAk/7j0XB8pvfcEY1GMA0XsVKfJoVuT4j vTZL1FVWIdMj2zogoXwf3JfGxvKtejmpl+mMEHwIHI6YmuuL6e2xmdECOeOmNtXXQdim KtQWiIO4D9m3EQrJBxV71dbXkiMWD2kiDbUJW45YjR7T4sgIhBHZEPHiR7cI3U8kL9im LMBQ== Received: by 10.152.114.100 with SMTP id jf4mr26430299lab.47.1352925998470; Wed, 14 Nov 2012 12:46:38 -0800 (PST) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.112.131.232 with HTTP; Wed, 14 Nov 2012 12:46:08 -0800 (PST) In-Reply-To: References: From: Chris Rees Date: Wed, 14 Nov 2012 20:46:08 +0000 X-Google-Sender-Auth: AHfEFrHlR4Hl1-1D9sqVAq0iuP8 Message-ID: Subject: Re: Ports cross-compiling To: Alexander Yerenkow Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 20:46:40 -0000 On 5 September 2012 07:40, Alexander Yerenkow wrote: > 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. Hi Alexander, Sorry for the late reply. You're definitely better off discussing this on ports@-- there has been some work done on cross-building ports, but it's fairly early days yet; the only real cross that can be done with much degree of success is i386 on amd64 currently. Your patch doesn't look destructive, but it could be better integrated with TARGET_ARCH setting. Chris