From owner-freebsd-current@FreeBSD.ORG Sat May 29 19:45:59 2010 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 6A1AC1065674 for ; Sat, 29 May 2010 19:45:59 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id E4F1D8FC08 for ; Sat, 29 May 2010 19:45:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 1B86E9CB0DF; Sat, 29 May 2010 21:42:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NGJJtKWsOAa2; Sat, 29 May 2010 21:42:29 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 388629CB149; Sat, 29 May 2010 21:42:29 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id o4TJgTSG052155; Sat, 29 May 2010 21:42:29 +0200 (CEST) (envelope-from rdivacky) Date: Sat, 29 May 2010 21:42:29 +0200 From: Roman Divacky To: Norikatsu Shigemura Message-ID: <20100529194229.GA51865@freebsd.org> References: <20100529021741.674bf85f.nork@FreeBSD.org> <20100529233152.a59cd08e.nork@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100529233152.a59cd08e.nork@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@FreeBSD.org Subject: Re: clangBSD build error on r208621 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, 29 May 2010 19:45:59 -0000 On Sat, May 29, 2010 at 11:31:52PM +0900, Norikatsu Shigemura wrote: > Hi rdivacky. > > On Sat, 29 May 2010 02:17:41 +0900 > Norikatsu Shigemura wrote: > > error: unknown argument: '-ferror-limit' > > mkdep: compile failed > > Do you have any idea? Of cause I set following environment: > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > $ cat /etc/src.conf > > NO_WERROR= > > WERROR= > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > OK, I got so that clang is too old. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > $ /usr/bin/clang --version > clang version 1.5 (trunk) > Target: x86_64-undermydesk-freebsd9.0 > Thread model: posix > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > So I did use latest clang by installing devel/llvm-devel. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > $ /usr/local/bin/clang --version > clang version 2.0 (trunk) > Target: x86_64-portbld-freebsd9.0 > Thread model: posix > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > > I can compile to well-known error point. > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > ===> sys/boot/i386/boot2 (all) > dd if=/dev/zero of=boot2.ldr bs=512 count=1 > 1+0 records in > 1+0 records out > 512 bytes transferred in 0.000027 secs (18837576 bytes/sec) > /usr/local/bin/clang -isysroot /usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/lib/ -L/usr/obj/usr/src/tmp/usr/lib/ -Os -fno-guess-branch-probability -fomit-frame-pointer -fno-unit-at-a-time -mno-align-long-strings -mrtd -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -DUFS1_AND_UFS2 -DFLAGS=0x80 -DSIOPRT=0x3f8 -DSIOFMT=0x3 -DSIOSPD=9600 -I/usr/src/sys/boot/i386/boot2/../../common -I/usr/src/sys/boot/i386/boot2/../btx/lib -I. -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings -Winline --param max-inline-insns-single=100 -ffreestanding -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -m32 -march=i386 -std=gnu99 -c /usr/src/sys/boot/i386/boot2/sio.S > clang: warning: the clang compiler does not support '-fno-unit-at-a-time' > clang: warning: argument unused during compilation: '-L/usr/obj/usr/src/tmp/usr/lib/' > clang: warning: argument unused during compilation: '-fno-guess-branch-probability' > clang: warning: argument unused during compilation: '-mno-align-long-strings' > clang: warning: argument unused during compilation: '-mrtd' > clang: warning: argument unused during compilation: '--param max-inline-insns-single=100' > clang: warning: argument unused during compilation: '-mpreferred-stack-boundary=2' > objcopy -S -O binary boot1.out boot1 > /usr/local/bin/clang -isysroot /usr/obj/usr/src/tmp -B/usr/obj/usr/src/tmp/usr/lib/ -L/usr/obj/usr/src/tmp/usr/lib/ -Os -fno-guess-branch-probability -fomit-frame-pointer -fno-unit-at-a-time -mno-align-long-strings -mrtd -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -DUFS1_AND_UFS2 -DFLAGS=0x80 -DSIOPRT=0x3f8 -DSIOFMT=0x3 -DSIOSPD=9600 -I/usr/src/sys/boot/i386/boot2/../../common -I/usr/src/sys/boot/i386/boot2/../btx/lib -I. -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings -Winline --param max-inline-insns-single=100 -ffreestanding -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -m32 -march=i386 -std=gnu99 -S -o boot2.s.tmp /usr/src/sys/boot/i386/boot2/boot2.c > clang: warning: the clang compiler does not support '-fno-unit-at-a-time' > clang: warning: argument unused during compilation: '-L/usr/obj/usr/src/tmp/usr/lib/' > clang: warning: argument unused during compilation: '-fno-guess-branch-probability' > clang: warning: argument unused during compilation: '-mno-align-long-strings' > clang: warning: argument unused during compilation: '-mrtd' > clang: warning: argument unused during compilation: '--param max-inline-insns-single=100' > clang: warning: argument unused during compilation: '-mpreferred-stack-boundary=2' > /usr/src/sys/boot/i386/boot2/boot2.c:234:1: warning: no previous prototype for function 'main' [-Wmissing-prototypes] > main(void) > ^ > 1 warning generated. > sed -e '/align/d' -e '/nop/d' < boot2.s.tmp > boot2.s > rm -f boot2.s.tmp > as --32 -o boot2.o boot2.s > ld -static -N --gc-sections -nostdlib -m elf_i386_fbsd -Ttext 0x2000 -o boot2.out /usr/obj/usr/src/sys/boot/i386/boot2/../btx/lib/crt0.o boot2.o sio.o > objcopy -S -O binary boot2.out boot2.bin > btxld -v -E 0x2000 -f bin -b /usr/obj/usr/src/sys/boot/i386/boot2/../btx/btx/btx -l boot2.ldr -o boot2.ld -P 1 boot2.bin > kernel: ver=1.02 size=690 load=9000 entry=9010 map=16M pgctl=1:1 > client: fmt=bin size=1705 text=0 data=0 bss=0 entry=0 > output: fmt=bin size=1f95 text=200 data=1d95 org=0 entry=0 > -405 bytes available > *** Error code 1 > 1 error clang as is cant compile boot2. there's a makefile goo that forces it to use gcc but for some reason (unknown to me) you force it to use clang. this issue is known and there's even a known fix, documented at http://llvm.org/bugs/show_bug.cgi?id=6623 http://llvm.org/bugs/show_bug.cgi?id=6627 I hope that those problems will be fixed in a few days...