Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Sep 2012 14:04:52 -0700
From:      Tim Kientzle <tim@kientzle.com>
To:        KCasey42 <kcasey42@gmail.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Unable to build FreeBSD xdev tools for ARM on FreeBSD 10.0-CURRENT
Message-ID:  <B891CFA2-7228-444B-978B-003E6418968D@kientzle.com>
In-Reply-To: <C4C286C9-2B1F-4284-9E30-DB5F5CD7FE00@bsdimp.com>
References:  <5053C7D1.2080308@gmail.com> <C4C286C9-2B1F-4284-9E30-DB5F5CD7FE00@bsdimp.com>

index | next in thread | previous in thread | raw e-mail

I looked at this very briefly a while back.  It looks like a great
opportunity for someone interested in learning more about
toolchain and library issues.

Related:  There's an active discussion on current@ about
switching FreeBSD's default compiler to clang.  Resolving
these issues would be a big help in that effort.

Cheers,

Tim

On Sep 15, 2012, at 9:00 AM, Warner Losh wrote:

> I've never had this working for clang, only gcc.  I've never had cross building working for ARM.  Perhaps we should fix this to force gcc until the underlying issues can be fixed.  Check to see that you don't have WITH_CLANG_AS_CC defined, or CC=clang.
> 
> Warner
> 
> On Sep 14, 2012, at 6:12 PM, KCasey42 wrote:
> 
>> Attempting to build the cross tools
>> # cd /usr/src
>> # make xdev XDEV=arm XDEV_ARCH=arm
>> 
>> on the following system
>> 
>> # uname -a
>> FreeBSD xxx.xxx.xxx 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r240450: Thu Sep 13 05:49:13 PDT 2012 root@xxx.xxx.xxx:/usr/src/sys/amd64/compile/silver  amd64
>> 
>> using
>> 
>> # clang --version
>> FreeBSD clang version 3.2 (trunk 162107) 20120817
>> Target: x86_64-unknown-freebsd10.0
>> Thread model: posix
>> 
>> produces the following error
>> 
>> clang  -O -pipe  -fpic -fvisibility=hidden -DVISIBILITY_HIDDEN -std=gnu99 -Qunused-arguments  -c /usr/src/lib/libcompiler_rt/__sync_fetch_and_add_4.c -o __sync_fetch_and_add_4.o
>> In file included from /usr/src/lib/libcompiler_rt/__sync_fetch_and_add_4.c:6:
>> /usr/src/lib/libcompiler_rt/__sync_fetch_and_op_n.h:34:1: error: conflicting
>>     types for '__sync_fetch_and_add_4'
>> NAME(volatile TYPE *ptr, TYPE value)
>> ^
>> /usr/src/lib/libcompiler_rt/__sync_fetch_and_add_4.c:2:15: note: expanded from
>>     macro 'NAME'
>> #define NAME            __sync_fetch_and_add_4# clang --version
>> FreeBSD clang version 3.2 (trunk 162107) 20120817
>> Target: x86_64-unknown-freebsd10.0
>> Thread model: posix
>> 
>>                       ^
>> /usr/src/lib/libcompiler_rt/__sync_fetch_and_op_n.h:34:1: note:
>>     '__sync_fetch_and_add_4' is a builtin with type 'int (volatile int *, int,
>>     ...)'
>> NAME(volatile TYPE *ptr, TYPE value)
>> ^
>> /usr/src/lib/libcompiler_rt/__sync_fetch_and_add_4.c:2:15: note: expanded from
>>     macro 'NAME'
>> #define NAME            __sync_fetch_and_add_4
>>                       ^
>> In file included from /usr/src/lib/libcompiler_rt/__sync_fetch_and_add_4.c:6:
>> /usr/src/lib/libcompiler_rt/__sync_fetch_and_op_n.h:34:1: error: definition of
>>     builtin function '__sync_fetch_and_add_4'
>> NAME(volatile TYPE *ptr, TYPE value)
>> ^
>> /usr/src/lib/libcompiler_rt/__sync_fetch_and_add_4.c:2:15: note: expanded from
>>     macro 'NAME'
>> #define NAME            __sync_fetch_and_add_4
>>                       ^
>> 2 errors generated.
>> *** [__sync_fetch_and_add_4.o] Error code 1
>> 
>> Stop in /usr/src/lib/libcompiler_rt.
>> *** [lib/libcompiler_rt__PL] Error code 1
>> 
>> Stop in /usr/src.
>> *** [libraries] Error code 1
>> 
>> Stop in /usr/src.
>> *** [_xi-libraries] Error code 1
>> 
>> Stop in /usr/src.
>> *** [xdev] Error code 1
>> 
>> Stop in /usr/src.
>> _______________________________________________
>> freebsd-arm@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-arm
>> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
> 
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"
> 
> 



help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B891CFA2-7228-444B-978B-003E6418968D>