Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Dec 2015 11:06:33 +0200
From:      Daniel Braniss <danny@cs.huji.ac.il>
To:        Warner Losh <imp@bsdimp.com>
Cc:        freebsd-arm <freeBSD-arm@freebsd.org>, "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: cross compiling
Message-ID:  <9BF2F5EC-E6B6-4E35-B637-389A571A8687@cs.huji.ac.il>
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

> On 5 Dec 2015, at 7:32 AM, Warner Losh <imp@bsdimp.com> wrote:
>=20
>=20
> On Fri, Dec 4, 2015 at 10:39 AM, Daniel Braniss <danny@cs.huji.ac.il =
<mailto:danny@cs.huji.ac.il>> wrote:
>=20
>> On 4 Dec 2015, at 6:33 PM, Warner Losh <imp@bsdimp.com =
<mailto:imp@bsdimp.com>> wrote:
>>=20
>>>=20
>>> On Dec 4, 2015, at 9:31 AM, Daniel Braniss <danny@cs.huji.ac.il =
<mailto:danny@cs.huji.ac.il>> wrote:
>>>=20
>>> 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 <moduledir>
>>> $ make
>>>=20
>>> but today, after a fresh svn update of current, I get:
>>>=20
>>> 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
>>>=20
>>> so, what magic am I missing?
>>=20
>> What does which cc say?
>>=20
>=20
> the host I use to cross compile is running 10.1,
>=20
> /usr/bin/cc
>=20
> 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)
>=20
>=20
> If which cc returns /usr/bin/cc, then you  haven't built the =
toolchain.

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

there is still a small problem, apart from the MK_FORMAT issue, in my =
module directory,
make =E2=80=A6 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.


>=20
> Warner




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9BF2F5EC-E6B6-4E35-B637-389A571A8687>