From owner-freebsd-current@FreeBSD.ORG Thu Jun 30 16:59:06 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 373F6106566B for ; Thu, 30 Jun 2011 16:59:06 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id ED2E38FC19 for ; Thu, 30 Jun 2011 16:59:05 +0000 (UTC) Received: by vws18 with SMTP id 18so2449201vws.13 for ; Thu, 30 Jun 2011 09:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=Avh9YHgd17ZilBoKLfiVfmYglK0ww2WNA5tmb/HkpfY=; b=Hu0JLEcDJUdwONNgeViOyNM1NkCbMcEOnfbCXiV4sGAzWc18pdM2NfRdsAh4tPOWMd bzKCGpe/q5JIwkrsks6vu+1avSQHv2K/e2Y9omaFLiq+hNOIoWLM4UI9YEzGkgjiS9RN 2OZV+kYpxeorU2LIvS9se/aPjsefJ2Q/YYb+Q= MIME-Version: 1.0 Received: by 10.221.13.196 with SMTP id pn4mr842362vcb.73.1309453144884; Thu, 30 Jun 2011 09:59:04 -0700 (PDT) Received: by 10.220.92.201 with HTTP; Thu, 30 Jun 2011 09:59:04 -0700 (PDT) In-Reply-To: <4E0CA0D0.6050500@gmail.com> References: <201106301122.36155.hselasky@c2i.net> <4E0CA0D0.6050500@gmail.com> Date: Thu, 30 Jun 2011 09:59:04 -0700 Message-ID: From: Garrett Cooper To: Mark Tinguely Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, Hans Petter Selasky Subject: Re: Crossbuild failure on 8-stable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jun 2011 16:59:06 -0000 On Thu, Jun 30, 2011 at 9:14 AM, Mark Tinguely wro= te: > 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=3Darm >> >> Is this perhaps also an issue in 9-current? >> >> Any clues? >> >> cc -O -pipe =A0-ffreestanding -Wformat -I/usr/src/lib/libstand -msoft-fl= oat >> - >> D_STANDALONE -DBZ_NO_STDIO -DBZ_NO_COMPRESS -DHAVE_MEMCPY - >> I/usr/src/lib/libstand/../libz -std=3Dgnu99 =A0-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 =3D (x); \ >> =A0 =A0__asm ("bswap %0" : "+r" (__X)); \ >> =A0 =A0__X; }) >> >> r0 looks like an ARM register passed to a non-arm assembler. I'm going t= o >> try: >> > > Looks like you have an ARM compiler/assembler because the assembler rejec= ts > 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 " ? 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