[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: cross compiling
From:       Daniel Braniss <danny () cs ! huji ! ac ! il>
Date:       2015-12-05 9:06:33
Message-ID: 9BF2F5EC-E6B6-4E35-B637-389A571A8687 () cs ! huji ! ac ! il
[Download RAW message or body]


> On 5 Dec 2015, at 7:32 AM, Warner Losh <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.

ok, the problem is solved by setting BUILDING_SHELL=/bin/sh

there is still a small problem, apart from the MK_FORMAT issue, in my module \
directory, make … symlinks @ and machine to /usr/src/ and /usr/src/sys/arm/include  \
instead of the one from which buildenv was lauchend, in my case /r+d/vanilla/11/src. \
setting it by hand gets me a working loadable module.


> 
> Warner

_______________________________________________
freebsd-hackers@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic