From owner-freebsd-current@FreeBSD.ORG Sat Sep 3 20:58:15 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 31D25106566C for ; Sat, 3 Sep 2011 20:58:15 +0000 (UTC) (envelope-from c.kworr@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id BA00B8FC15 for ; Sat, 3 Sep 2011 20:58:14 +0000 (UTC) Received: by fxe4 with SMTP id 4so3366019fxe.13 for ; Sat, 03 Sep 2011 13:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=8WNDBwsfYm8Clv1V+UoP2deRDC6IL5eGsZDKwLoBcC4=; b=L1yJxHzqffS2hZeE1kMZpW+54PKEterX25mJXYT7IFRMZO76fTPefqzSct7lx7YiJa iBZe3v2NUgJS4jGGkwi9vxGkkTJ4/MgRgBCzWi9UvgzZXI+kA/gd3WSgi/ziFSkp6ZO7 ZwVSNk3dEC8aBZhwohlOOLnHIWll9vJ4VqETk= Received: by 10.223.26.71 with SMTP id d7mr288918fac.23.1315083493427; Sat, 03 Sep 2011 13:58:13 -0700 (PDT) Received: from limbo.lan ([195.225.157.86]) by mx.google.com with ESMTPS id m8sm1864103fae.17.2011.09.03.13.58.11 (version=SSLv3 cipher=OTHER); Sat, 03 Sep 2011 13:58:12 -0700 (PDT) Message-ID: <4E6294E0.5010104@gmail.com> Date: Sat, 03 Sep 2011 23:58:08 +0300 From: Volodymyr Kostyrko User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:6.0.1) Gecko/20110902 Thunderbird/6.0.1 MIME-Version: 1.0 To: Dimitry Andric References: <4E62915E.1010405@FreeBSD.org> In-Reply-To: <4E62915E.1010405@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-current@freebsd.org Subject: Re: Compiling BETA2 with clang fails 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: Sat, 03 Sep 2011 20:58:15 -0000 03.09.2011 23:43, Dimitry Andric написав(ла): > On 2011-09-03 22:22, Volodymyr Kostyrko wrote: >> Hi all. >> >> ===> libexec/bootpd (all) > ... >> /usr/local/libexec/ccache/world/clang -O2 -pipe -Qunused-arguments -fPIC >> -march=native -DETC_ETHERS -DSYSLOG -DDEBUG -DVEND_CMU -std=gnu99 >> -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k >> -Wno-uninitialized -Wno-pointer-sign -Wformat=2 -Wno-format-extra-args >> -o bootpd bootpd.o dovend.o readfile.o hash.o dumptab.o lookup.o getif.o >> hwaddr.o report.o tzone.o rtmsg.o >> /usr/obj/usr/src/tmp/usr/lib/crt1.o: In function `_start1': >> /usr/src/lib/csu/i386-elf/crt1_c.c:(.text+0x94): undefined reference to >> `atexit' >> /usr/src/lib/csu/i386-elf/crt1_c.c:(.text+0x9d): undefined reference to >> `_init_tls' >> /usr/src/lib/csu/i386-elf/crt1_c.c:(.text+0xad): undefined reference to >> `atexit' >> /usr/src/lib/csu/i386-elf/crt1_c.c:(.text+0xd6): undefined reference to >> `exit' >> bootpd.o: In function `main': >> /var/db/ccache/tmp/bootpd.tmp.limbo.lan.76586.i:(.text+0x31): undefined >> reference to `strrchr' >> /var/db/ccache/tmp/bootpd.tmp.limbo.lan.76586.i:(.text+0xa2): undefined >> reference to `malloc' >> /var/db/ccache/tmp/bootpd.tmp.limbo.lan.76586.i:(.text+0xe0): undefined >> reference to `exit' >> /var/db/ccache/tmp/bootpd.tmp.limbo.lan.76586.i:(.text+0x12a): undefined >> reference to `__error' >> /var/db/ccache/tmp/bootpd.tmp.limbo.lan.76586.i:(.text+0x150): undefined >> reference to `getsockname' >> /var/db/ccache/tmp/bootpd.tmp.limbo.lan.76586.i:(.text+0x1c7): undefined >> reference to `gethostname' >> bootpd.o: In function `.LBB0_31': >> /var/db/ccache/tmp/bootpd.tmp.limbo.lan.76586.i:(.text+0x385): undefined >> reference to `sscanf' >> bootpd.o: In function `.LBB0_42': >> /var/db/ccache/tmp/bootpd.tmp.limbo.lan.76586.i:(.text+0x44d): undefined >> reference to `sscanf' >> bootpd.o: In function `.LBB0_55': >> >> There may be some problems integrating clang into Makefiles, because if >> I cd to /usr/src/libexec/bootpd and run make there everything works fine. > > Please post your make.conf/src.conf, and any other environmental > settings which may influence the build. For starters, does it still > fail if you remove ccache and the non-standard CFLAGS? Yes it does. It's still not the clean tree so I'll try to retest without ccache. I don't think ccache is really involved because as I said before when I issue the same command from /usr/obj/usr/src/libexec/bootpd it succeeds. /etc/make.conf follows: CPUTYPE?=native INSTALL:=install -C WITHOUT_NOUVEAU:=yes KERNCONF?=MINIMAL #GENERIC NO_CLEAN:=yes .if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*)) . if !defined(NOCCACHE) # GCC 4.2 #CC:=${CC:C,^cc,/usr/local/libexec/ccache/world/cc,1} #CXX:=${CXX:C,^c\+\+,/usr/local/libexec/ccache/world/c++,1} # clang CC:=${CC:C,^cc,/usr/local/libexec/ccache/world/clang,1} CXX:=${CXX:C,^c\+\+,/usr/local/libexec/ccache/world/clang++,1} CPP:=${CXX:C,^cpp,/usr/local/libexec/ccache/world/clang -E,1} # clang without ccache #CC:=${CC:C,^cc,clang,1} #CXX:=${CXX:C,^c\+\+,clang++,1} #CPP:=${CXX:C,^cpp,clang -E,1} # Don't die on warnings NO_WERROR= WERROR= # Don't forget this when using Jails! NO_FSCHG= . endif .else . if (empty(.CURDIR:M*/java/openjdk6*) && empty(.CURDIR:M*/java/openjdk7*) && empty(.CURDIR:M*-kmod*) && empty(.CURDIR:M*/java/jdk16*)) #CFLAGS+= -mfpmath=sse,387 #COPTFLAGS+= -mfpmath=sse,387 . endif .endif WRKDIRPREFIX=/tmp/ports DISABLE_MAKE_JOBS=true .if ${CC:T} == "clang" CFLAGS+= -Qunused-arguments -fPIC .endif -- Sphinx of black quartz judge my vow.