From owner-svn-ports-all@FreeBSD.ORG Wed Apr 2 16:13:45 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FB036B9; Wed, 2 Apr 2014 16:13:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D2B568F; Wed, 2 Apr 2014 16:13:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s32GDjgJ055027; Wed, 2 Apr 2014 16:13:45 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s32GDjs0055026; Wed, 2 Apr 2014 16:13:45 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201404021613.s32GDjs0055026@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 2 Apr 2014 16:13:45 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r349928 - head/Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2014 16:13:45 -0000 Author: bapt Date: Wed Apr 2 16:13:44 2014 New Revision: 349928 URL: http://svnweb.freebsd.org/changeset/ports/349928 QAT: https://qat.redports.org/buildarchive/r349928/ Log: First bit of support to cross build the ports tree will only work with simple ports for now, lots of improvements are pending cd devel/pkgconf; make X_BUILD_FOR=armv6-freebsd10.0 package Will create a armv6 ready package Note that right now the generated package does not have the proper ABI defined But the content is the right one Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Wed Apr 2 16:07:38 2014 (r349927) +++ head/Mk/bsd.port.mk Wed Apr 2 16:13:44 2014 (r349928) @@ -1132,6 +1132,22 @@ NOTPHONY?= .include "${PORTSDIR}/Mk/bsd.commands.mk" +.if defined(X_BUILD_FOR) +BUILD_DEPENDS= ${X_BUILD_FOR}-cc:${PORTSDIR}/devel/${X_BUILD_FOR}-xdev +# Do not define CPP on purpose +CC= ${X_BUILD_FOR}-cc +CXX= ${X_BUILD_FOR}-c++ +LD= ${X_BUILD_FOR}-ld +AS= ${X_BUILD_FOR}-as +NM= ${X_BUILD_FOR}-nm +STRIP_CMD= ${X_BUILD_FOR}-strip +CFLAGS+= -B${LOCALBASE}/${X_BUILD_FOR}/usr/bin +CXXFLAGS+= -B${LOCALBASE}/${X_BUILD_FOR}/usr/bin +LDFLAGS+= -B${LOCALBASE}/${X_BUILD_FOR}/usr/bin +CONFIGURE_ENV+= LD=${LD} AS=${AS} NM=${NM} +MAKE_ENV+= LD=${LD} AS=${AS} NM=${NM} +.endif + # # DESTDIR section to start a chrooted process if invoked with DESTDIR set # @@ -2757,6 +2773,9 @@ GNU_CONFIGURE_PREFIX?= ${PREFIX} GNU_CONFIGURE_MANPREFIX?= ${MANPREFIX} CONFIG_SITE?= ${PORTSDIR}/Templates/config.site CONFIGURE_ARGS+= --prefix=${GNU_CONFIGURE_PREFIX} $${_LATE_CONFIGURE_ARGS} +.if defined(X_BUILD_FOR) +CONFIGURE_ARGS+= --host=${X_BUILD_FOR} +.endif CONFIGURE_ENV+= CONFIG_SITE=${CONFIG_SITE} lt_cv_sys_max_cmd_len=${CONFIGURE_MAX_CMD_LEN} HAS_CONFIGURE= yes