Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Dec 2015 10:50:48 +0200
From:      Daniel Braniss <danny@cs.huji.ac.il>
To:        Russell Haley <russ.haley@gmail.com>
Cc:        Warner Losh <imp@bsdimp.com>, freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: cross compiling
Message-ID:  <4EC23DEB-911F-4888-B470-67CA9A2253A6@cs.huji.ac.il>
In-Reply-To: <CABx9NuQY2PZ0-R3Z41DcOJSFby1UzH8EV5CNg229u-XpBR2b-Q@mail.gmail.com>
References:  <4E33BE7E-5443-438A-A45C-04B4B90528F9@cs.huji.ac.il> <C24D4F43-09B0-4E76-9239-71BDC6AAEE7F@bsdimp.com> <CB96AC95-DC5E-40AF-8CC6-29DF92CC8E1E@cs.huji.ac.il> <CANCZdfpAb3HZpM3viptuBWPsxdbR-0rKuHyxshPFW=pXDyrOLw@mail.gmail.com> <CABx9NuTQtY0P5YQ30RSS38y9ifZ4gZUQfV61u0yjXo_Tg7KWRw@mail.gmail.com> <CABx9NuQY2PZ0-R3Z41DcOJSFby1UzH8EV5CNg229u-XpBR2b-Q@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail


> On 5 Dec 2015, at 9:48 AM, Russell Haley <russ.haley@gmail.com> wrote:
> 
> root@Jailbird:/usr/src# make TARGET=arm TARGET_ARCH=armv6 -j10 toolchain
> ...
> ===> 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=armv6 BUILDENV_SHELL=/bin/tcsh
> Entering world for armv6:arm
> You have mail.
> root@Jailbird:/usr/src# which cc
> /usr/bin/cc
> 
> 
> Have I missed something?
> Russ
> 

several tries later,
it works if BUILDENV_SHELL=/bin/sh

danny

> 
> On Fri, Dec 4, 2015 at 9:56 PM, Russell Haley <russ.haley@gmail.com <mailto:russ.haley@gmail.com>> wrote:
> BUILD(7)	
> ...
>      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) <https://www.freebsd.org/cgi/man.cgi?query=make&sektion=1&apropos=0&manpath=FreeBSD+10.2-RELEASE>; variables
> 		      TARGET_ARCH and TARGET.
> 
> 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! 
> 
> Thanks guys!!! Please tell me this works?
> 
> Russ
> 
> On Fri, Dec 4, 2015 at 9:32 PM, Warner Losh <imp@bsdimp.com <mailto:imp@bsdimp.com>> wrote:
> On Fri, Dec 4, 2015 at 10:39 AM, Daniel Braniss <danny@cs.huji.ac.il <mailto:danny@cs.huji.ac.il>> wrote:
> 
> >
> > On 4 Dec 2015, at 6:33 PM, Warner Losh <imp@bsdimp.com <mailto:imp@bsdimp.com>> wrote:
> >
> >
> > On Dec 4, 2015, at 9:31 AM, Daniel Braniss <danny@cs.huji.ac.il <mailto:danny@cs.huji.ac.il>> 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=armv6
> > $ make buildenv TARGET_ARCH=armv6 BUILDENV_SHELL=/usr/local/bin/shell
> > $ cd <moduledir>
> > $ 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=softfp  -DMFRC_DEBUG=8 -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=softfp'
> > *** 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=clang
> > there is another error, which appeared before, and I solve it by setting
> > MK_FORMAT_EXTENSIONS=no
> > (which out it complains … malformed conditional (${MK_FORMAT_EXTENSIONS)
> > == “no”)
> >
> >
> If which cc returns /usr/bin/cc, then you  haven't built the toolchain.
> 
> Warner
> _______________________________________________
> freebsd-arm@freebsd.org <mailto:freebsd-arm@freebsd.org> mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm <https://lists.freebsd.org/mailman/listinfo/freebsd-arm>;
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org <mailto:freebsd-arm-unsubscribe@freebsd.org>"
> 
> 



help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EC23DEB-911F-4888-B470-67CA9A2253A6>