make buildworld with clang fails?

Kernel development, writing drivers, coding, and questions regarding FreeBSD internals.

make buildworld with clang fails?

Postby Carpetsmoker » 11 Nov 2011, 16:44

Using the [FILE]RELENG_9[/FILE] tag I can't get [FILE]make buildworld[/FILE] to build using [FILE]clang[/FILE].

Is this a known issue? As I understood it (and read on wiki.freebsd.org), [FILE]buildworld[/FILE] should work with [FILE]clang[/FILE] ... At first I thought it may be a little "oops" in some commit, but it's been like this for 2 days ...

I'm using a fresh [FILE]/usr/obj/[/FILE]:

Code: Select all
===> gnu/usr.bin/binutils/libbfd (all)
clang -I/usr/local/include/ -DBFD_DEFAULT_TARGET_SIZE=64 -I. -I/usr/src/gnu/usr.bin/binutils/libbfd
 -I/usr/src/gnu/usr.bin/binutils/libbfd/../libbfd -I/usr/obj/usr/src/tmp/usr/src/gnu/usr.bin/binutils/libbfd/../libbfd
 -I/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/include -D_GNU_SOURCE
 -I/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd -DSELECT_ARCHITECTURES="&bfd_i386_arch"
 -DHAVE_bfd_elf64_x86_64_freebsd_vec -DHAVE_bfd_elf64_x86_64_vec -DHAVE_bfd_efi_app_x86_64_vec -DHAVE_bfd_elf32_i386_freebsd_vec
 -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_efi_app_ia32_vec -DSELECT_VECS=" &bfd_elf64_x86_64_freebsd_vec ,&bfd_elf64_x86_64_vec,
&bfd_efi_app_x86_64_vec ,&bfd_elf32_i386_freebsd_vec ,&bfd_elf32_i386_vec ,&bfd_efi_app_ia32_vec"
 -DDEFAULT_VECTOR=bfd_elf64_x86_64_freebsd_vec -DDEBUGDIR="NULL" -std=gnu99   -I/usr/obj/usr/src/tmp/legacy/usr/include
 -c /usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/cofflink.c
/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/cofflink.c:245:71: error: too few arguments
      to function call, expected 4, have 3
              if (! (*info->callbacks->add_archive_element) (info, abfd, name))
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                  ^
/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/cofflink.c:481:20: error: no member named
      'creator' in 'struct bfd_link_hash_table'
          if (info->hash->creator->flavour == bfd_get_flavour (abfd))
              ~~~~~~~~~~  ^
/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/cofflink.c:573:22: error: no member named
      'creator' in 'struct bfd_link_hash_table'
      && info->hash->creator->flavour == bfd_get_flavour (abfd)
         ~~~~~~~~~~  ^


Code: Select all
[/usr/src/]# cat /etc/make.conf
PERL_VERSION=5.10.1
.ifndef (PORTTEST)
WRKDIRPREFIX=/download/tmp/
.endif
WITH_LCD_FILTERING=yes
WITHOUT_GCONF=yes
NOPORTDOCS=yes

.ifndef (NO_CLANG)
.if !defined(CC) || ${CC} == "cc"
CC=clang
.endif
.if !defined(CXX) || ${CXX} == "c++"
CXX=clang++
.endif

NO_WERROR=
WERROR=
NO_FSCHG=
.endif


Code: Select all
[/usr/src]# cat /etc/src.conf
WITHOUT_GCC=yes
WITH_CLANG=yes


Code: Select all
[/usr/src]# uname -a
FreeBSD thinkpad 9.0-BETA3 FreeBSD 9.0-BETA3 #2: Thu Oct  6 01:51:02 CEST 2011     martin@thinkpad:/usr/obj/usr/src/sys/THINKPAD  amd64
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
User avatar
Carpetsmoker
Member
 
Posts: 905
Joined: 16 Nov 2008, 19:07
Location: Eindhoven, Netherlands

Return to FreeBSD Development

Who is online

Users browsing this forum: No registered users and 0 guests