Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Dec 2015 21:56:33 -0800
From:      Russell Haley <russ.haley@gmail.com>
To:        Warner Losh <imp@bsdimp.com>, danny@cs.huji.ac.il,  freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: cross compiling
Message-ID:  <CABx9NuTQtY0P5YQ30RSS38y9ifZ4gZUQfV61u0yjXo_Tg7KWRw@mail.gmail.com>
In-Reply-To: <CANCZdfpAb3HZpM3viptuBWPsxdbR-0rKuHyxshPFW=pXDyrOLw@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>

next in thread | previous in thread | raw e-mail | index | archive | help
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)
<https://www.freebsd.org/cgi/man.cgi?query=3Dmake&sektion=3D1&apropos=3D0&m=
anpath=3DFreeBSD+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> wrote:

> On Fri, Dec 4, 2015 at 10:39 AM, Daniel Braniss <danny@cs.huji.ac.il>
> wrote:
>
> >
> > On 4 Dec 2015, at 6:33 PM, Warner Losh <imp@bsdimp.com> wrote:
> >
> >
> > On Dec 4, 2015, at 9:31 AM, Daniel Braniss <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=3Darmv6
> > $ make buildenv TARGET_ARCH=3Darmv6 BUILDENV_SHELL=3D/usr/local/bin/she=
ll
> > $ 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=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 settin=
g
> > MK_FORMAT_EXTENSIONS=3Dno
> > (which out it complains =E2=80=A6 malformed conditional (${MK_FORMAT_EX=
TENSIONS)
> > =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"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABx9NuTQtY0P5YQ30RSS38y9ifZ4gZUQfV61u0yjXo_Tg7KWRw>