Re: Crossbuild failure on 8-stable

From: Hans Petter Selasky <hselasky_at_c2i.net>
Date: Thu, 30 Jun 2011 22:42:36 +0200
On Thursday 30 June 2011 18:59:04 Garrett Cooper wrote:
> On Thu, Jun 30, 2011 at 9:14 AM, Mark Tinguely <marktinguely_at_gmail.com> 
wrote:
> > On 6/30/2011 4:22 AM, Hans Petter Selasky wrote:
> >> Hi,
> >> 
> >> Trying to cross build ARM fails in the following way on 8-stable:
> >> 
> >> 8.2-STABLE FreeBSD 8.2-STABLE #1: Wed Jun 29 13:09:23 UTC 2011
> >> 
> >> make toolchain TARGET=arm
> >> 
> >> Is this perhaps also an issue in 9-current?
> >> 
> >> Any clues?
> >> 
> >> 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=gnu99  -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'
> > 
> > and you also said:
> >> Tracing down the issue:
> >> 
> >> /usr/include/machine/endian.h
> >> 
> >> #define __byte_swap_int_var(x) \
> >> __extension__ ({ register __uint32_t __X = (x); \
> >>    __asm ("bswap %0" : "+r" (__X)); \
> >>    __X; })
> >> 
> >> r0 looks like an ARM register passed to a non-arm assembler. I'm going
> >> to
> > 
> >> try:
> > Looks like you have an ARM compiler/assembler because the assembler
> > rejects the i386/amd64 "bswap" assembly command.
> > 
> > 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.
> > 
> > You manually test the "cc" command with the included "-I" option.
> 
> Adding -v to the command line might yield more interesting results in
> tracking down the culprit header.
> -Garrett

I can add that:

make toolchains

succeeded.

--HPS
Received on Thu Jun 30 2011 - 18:44:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:15 UTC