From owner-freebsd-arm@freebsd.org Sat Dec 5 08:50:57 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2A163A41971 for ; Sat, 5 Dec 2015 08:50:57 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AAB6B1EED for ; Sat, 5 Dec 2015 08:50:56 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from e-bsd.cs.huji.ac.il ([132.65.80.241] helo=outmail.cs.huji.ac.il ident=exim) by kabab.cs.huji.ac.il with esmtp id 1a58YL-0002iR-AQ; Sat, 05 Dec 2015 10:50:49 +0200 Received: from [132.65.179.20] (helo=mbpro2.bs.cs.huji.ac.il) by outmail.cs.huji.ac.il with esmtpsa id 1a58YL-000Bae-26; Sat, 05 Dec 2015 10:50:49 +0200 Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) Subject: Re: cross compiling From: Daniel Braniss In-Reply-To: Date: Sat, 5 Dec 2015 10:50:48 +0200 Cc: Warner Losh , freebsd-arm Message-Id: <4EC23DEB-911F-4888-B470-67CA9A2253A6@cs.huji.ac.il> References: <4E33BE7E-5443-438A-A45C-04B4B90528F9@cs.huji.ac.il> To: Russell Haley X-Mailer: Apple Mail (2.3096.5) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2015 08:50:57 -0000 > On 5 Dec 2015, at 9:48 AM, Russell Haley wrote: >=20 > root@Jailbird:/usr/src# make TARGET=3Darm TARGET_ARCH=3Darmv6 -j10 = toolchain > ... > =3D=3D=3D> lib/libcuse (install) > --- _libinstall --- > --- _INCSINS --- > --- _libinstall --- > sh /usr/src/tools/install.sh -C -o root -g wheel -m 444 libcuse.a = /usr/obj/arm.armv6/usr/src/tmp/usr/lib/ > --- _INCSINS --- > sh /usr/src/tools/install.sh -C -o root -g wheel -m 444 = /usr/src/lib/libcuse/cuse.h /usr/obj/arm.armv6/usr/src/tmp/usr/include/ > --- _libinstall --- > sh /usr/src/tools/install.sh -s -o root -g wheel -m 444 = libcuse.so.1 /usr/obj/arm.armv6/usr/src/tmp/usr/lib/ > sh /usr/src/tools/install.sh -l s libcuse.so.1 = /usr/obj/arm.armv6/usr/src/tmp/usr/lib/libcuse.so > root@Jailbird:/usr/src# > COPYRIGHT LOCKS Makefile.inc1 UPDATING = contrib/ gnu/ lib/ = rescue/ share/ targets/ usr.bin/ > D4037.diff MAINTAINERS ObsoleteFiles.inc bin/ = crypto/ include/ libexec/ = sbin/ src.kdev4 tests/ usr.sbin/ > FreeBSD-D4338.diff Makefile README cddl/ = etc/ kerberos5/ release/ = secure/ sys/ tools/ > root@Jailbird:/usr/src# make buildenv TARGET_ARCH=3Darmv6 = BUILDENV_SHELL=3D/bin/tcsh > Entering world for armv6:arm > You have mail. > root@Jailbird:/usr/src# which cc > /usr/bin/cc >=20 >=20 > Have I missed something? > Russ >=20 several tries later, it works if BUILDENV_SHELL=3D/bin/sh danny >=20 > On Fri, Dec 4, 2015 at 9:56 PM, Russell Haley > wrote: > BUILD(7)=09 > ... > buildenv Spawn an interactive shell with environment = variables > set up for cross-building the system. The target = archi- > tecture needs to be specified with make(1) = variables > TARGET_ARCH and TARGET. >=20 > OMG I've been looking for this for about a year now and it's been = right there. I even submitted a patch on this page!=20 >=20 > Thanks guys!!! Please tell me this works? >=20 > Russ >=20 > On Fri, Dec 4, 2015 at 9:32 PM, Warner Losh > wrote: > On Fri, Dec 4, 2015 at 10:39 AM, Daniel Braniss > wrote: >=20 > > > > On 4 Dec 2015, at 6:33 PM, Warner Losh > wrote: > > > > > > On Dec 4, 2015, at 9:31 AM, Daniel Braniss > wrote: > > > > Hi, > > I can cross compile for armv6 (raspberry Pi B), and I do get a = working > > version, and till about July, I was > > able to cross compile a module doing something like this: > > $ cd $SRC > > $ make kernel-toolchain TARGET_ARCH=3Darmv6 > > $ make buildenv TARGET_ARCH=3Darmv6 = BUILDENV_SHELL=3D/usr/local/bin/shell > > $ cd > > $ make > > > > but today, after a fresh svn update of current, I get: > > > > Warning: Object directory not changed from original > > /a/fr-05/vol/home/system/danny/src/FreeBSD/ARM/elc/sys/modules/mfrc > > cc -O -pipe -mfloat-abi=3Dsoftfp -DMFRC_DEBUG=3D8 -Werror = -D_KERNEL > > -DKLD_MODULE -nostdinc > > = -I/a/fr-05/vol/home/system/danny/src/FreeBSD/ARM/elc/sys/modules/mfrc/../.= . > > -I. -I@ -I@/contrib/altq -fno-common -ffreestanding -c > > = /a/fr-05/vol/home/system/danny/src/FreeBSD/ARM/elc/sys/modules/mfrc/../../= dev/mfrc/mfrc.c > > -o mfrc.o > > cc: error: argument unused during compilation: '-mfloat-abi=3Dsoftfp' > > *** Error code 1 > > > > so, what magic am I missing? > > > > > > What does which cc say? > > > > the host I use to cross compile is running 10.1, > > > > /usr/bin/cc > > > > but I also tried CC=3Dclang > > there is another error, which appeared before, and I solve it by = setting > > MK_FORMAT_EXTENSIONS=3Dno > > (which out it complains =E2=80=A6 malformed conditional = (${MK_FORMAT_EXTENSIONS) > > =3D=3D =E2=80=9Cno=E2=80=9D) > > > > > If which cc returns /usr/bin/cc, then you haven't built the = toolchain. >=20 > Warner > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm = > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org = " >=20 >=20