Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jun 2011 15:01:40 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Garrett Cooper <yanegomi@gmail.com>
Cc:        freebsd-current@freebsd.org, Hans Petter Selasky <hselasky@c2i.net>
Subject:   Re: Crossbuild failure on 8-stable
Message-ID:  <F416D901-5B2F-4AD8-8FC2-028CCD2ACFBF@bsdimp.com>
In-Reply-To: <BANLkTimN51uSbBcVUExO--ZNthmAwfBYPA@mail.gmail.com>
References:  <201106301122.36155.hselasky@c2i.net> <4E0CA0D0.6050500@gmail.com> <BANLkTimN51uSbBcVUExO--ZNthmAwfBYPA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Shouldn't that be 'make kernel-toolchain'?

Warner

On Jun 30, 2011, at 10:59 AM, Garrett Cooper wrote:

> On Thu, Jun 30, 2011 at 9:14 AM, Mark Tinguely =
<marktinguely@gmail.com> wrote:
>> On 6/30/2011 4:22 AM, Hans Petter Selasky wrote:
>>>=20
>>> Hi,
>>>=20
>>> Trying to cross build ARM fails in the following way on 8-stable:
>>>=20
>>> 8.2-STABLE FreeBSD 8.2-STABLE #1: Wed Jun 29 13:09:23 UTC 2011
>>>=20
>>> make toolchain TARGET=3Darm
>>>=20
>>> Is this perhaps also an issue in 9-current?
>>>=20
>>> Any clues?
>>>=20
>>> cc -O -pipe  -ffreestanding -Wformat -I/usr/src/lib/libstand =
-msoft-float
>>> -
>>> D_STANDALONE -DBZ_NO_STDIO -DBZ_NO_COMPRESS -DHAVE_MEMCPY -
>>> I/usr/src/lib/libstand/../libz -std=3Dgnu99  -c
>>> /usr/src/lib/libstand/../libc/net/ntoh.c
>>> {standard input}: Assembler messages:
>>> {standard input}:27: Error: bad instruction `bswap r0'
>>> {standard input}:53: Error: bad instruction `bswap r0'
>>>=20
>>=20
>> and you also said:
>>=20
>>> Tracing down the issue:
>>>=20
>>> /usr/include/machine/endian.h
>>>=20
>>> #define __byte_swap_int_var(x) \
>>> __extension__ ({ register __uint32_t __X =3D (x); \
>>>    __asm ("bswap %0" : "+r" (__X)); \
>>>    __X; })
>>>=20
>>> r0 looks like an ARM register passed to a non-arm assembler. I'm =
going to
>>> try:
>>>=20
>>=20
>> Looks like you have an ARM compiler/assembler because the assembler =
rejects
>> the i386/amd64 "bswap" assembly command.
>>=20
>> Does anyone remember if the cross compiler has the cross include =
paths
>> compiled into them or should there be a "-I" in the compile command =
to
>> correctly expand the "#include <machine/endian.h>" ? I thought the =
cross
>> path was compiled into the cross compiler.
>>=20
>> You manually test the "cc" command with the included "-I" option.
>=20
> Adding -v to the command line might yield more interesting results in
> tracking down the culprit header.
> -Garrett
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to =
"freebsd-current-unsubscribe@freebsd.org"
>=20
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F416D901-5B2F-4AD8-8FC2-028CCD2ACFBF>