From owner-freebsd-arm@freebsd.org Sat Dec 5 07:48:01 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 53DF4A41B47 for ; Sat, 5 Dec 2015 07:48:01 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-vk0-x229.google.com (mail-vk0-x229.google.com [IPv6:2607:f8b0:400c:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AC8F107F for ; Sat, 5 Dec 2015 07:48:01 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by vkay187 with SMTP id y187so78333805vka.3 for ; Fri, 04 Dec 2015 23:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Dht1O3nilbHPOcZwRLyf1zClEVVTivLUhxsgQdIlRCE=; b=oF/vD8tckXzze1yMKuYGyr6CzYouo8u1I34uUkhldDUZUeXqKzQjztlv8BfCiR8xCB NkrbWN9CACxwlwWVELR2lJMystjMF/GvsUDlxm2qeald0TeyfLdpKvmEz3NPn8wZhDIC 387yF93NFWL0In5HCR87VLO1lIC3YKsqMw4BaD8a44UArZ9+NYIBYb1YUbhfYzJ8zboI J99aMNUUDTK8bPvx3sy/Opuo7v9TrrgpqJ3Siewo9w0ER3XlPE8EyrfxvGbO/WwncizN 3OUSRnpe4sBykLRqVLbWXhsz4OHXJ14CsYGuOORlRIj49CONMenh79lC82WKmwmUNrOq vMeQ== MIME-Version: 1.0 X-Received: by 10.31.192.199 with SMTP id q190mr13370152vkf.96.1449301680088; Fri, 04 Dec 2015 23:48:00 -0800 (PST) Received: by 10.31.47.137 with HTTP; Fri, 4 Dec 2015 23:48:00 -0800 (PST) In-Reply-To: References: <4E33BE7E-5443-438A-A45C-04B4B90528F9@cs.huji.ac.il> Date: Fri, 4 Dec 2015 23:48:00 -0800 Message-ID: Subject: Re: cross compiling From: Russell Haley To: Warner Losh , danny@cs.huji.ac.il, freebsd-arm 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 07:48:01 -0000 root@Jailbird:/usr/src# make TARGET=3Darm TARGET_ARCH=3Darmv6 -j10 toolchai= n ... =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 Have I missed something? Russ On Fri, Dec 4, 2015 at 9:56 PM, Russell Haley wrote: > BUILD(7)=09 > ... > *buildenv* Spawn an interactive shell with environment variabl= es > set up for cross-building the system. The target archi- > tecture needs to be specified with make(1) variables > *TARGET**_**ARCH* and *TARGET*. > > OMG I've been looking for this for about a year now and it's been right t= here. I even submitted a patch on this page! > > Thanks guys!!! Please tell me this works? > > Russ > > > On Fri, Dec 4, 2015 at 9:32 PM, Warner Losh wrote: > >> On Fri, Dec 4, 2015 at 10:39 AM, Daniel Braniss >> wrote: >> >> > >> > 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/sh= ell >> > $ 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 setti= ng >> > MK_FORMAT_EXTENSIONS=3Dno >> > (which out it complains =E2=80=A6 malformed conditional (${MK_FORMAT_E= XTENSIONS) >> > =3D=3D =E2=80=9Cno=E2=80=9D) >> > >> > >> If which cc returns /usr/bin/cc, then you haven't built the toolchain. >> >> 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" >> > >