From owner-freebsd-current@FreeBSD.ORG Sun Jul 17 11:27:19 2011 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 5F62A1065670 for ; Sun, 17 Jul 2011 11:27:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 65-241-43-4.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 1206014E697 for ; Sun, 17 Jul 2011 11:27:19 +0000 (UTC) Message-ID: <4E22C716.4000007@FreeBSD.org> Date: Sun, 17 Jul 2011 04:27:18 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110706 Thunderbird/5.0 MIME-Version: 1.0 To: FreeBSD Current References: <4E22B560.4040401@FreeBSD.org> In-Reply-To: <4E22B560.4040401@FreeBSD.org> X-Enigmail-Version: 1.2pre OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: sys/boot/i386/boot2 build failure with clang 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: Sun, 17 Jul 2011 11:27:19 -0000 I have DEBUG_FLAGS+= -g in my /etc/make.conf. Commenting that out allows this to work. Doug On 07/17/2011 03:11, Doug Barton wrote: > Howdy, > > Trying to build r224125 with clang, and got this (using no -j): > > ===> boot2 (all) > objcopy -S -O binary boot1.out boot1 > dd if=/dev/zero of=boot2.ldr bs=512 count=1 > 1+0 records in > 1+0 records out > 512 bytes transferred in 0.000040 secs (12782641 bytes/sec) > clang -Os -fno-guess-branch-probability -fomit-frame-pointer > -fno-unit-at-a-time -mno-align-long-strings -mrtd -mregparm=3 > -DUSE_XREAD -DUFS1_AND_UFS2 -DFLAGS=0x80 -DSIOPRT=0x3f8 -DSIOFMT=0x3 > -DSIOSPD=9600 -I/home/svn/head/sys/boot/i386/boot2/../../common > -I/home/svn/head/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 -mllvm -stack-alignment=8 -mllvm > -inline-threshold=3 -mllvm -enable-load-pre=false -ffreestanding > -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 > -mno-sse3 -msoft-float -m32 -march=i386 -g -std=gnu99 -S -o > boot2.s.tmp /home/svn/head/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: > '-fno-guess-branch-probability' > clang: warning: argument unused during compilation: > '-mno-align-long-strings' > clang: warning: argument unused during compilation: '--param > max-inline-insns-single=100' > clang: warning: argument unused during compilation: > '-mpreferred-stack-boundary=2' > In file included from /home/svn/head/sys/boot/i386/boot2/boot2.c:172: > /home/svn/head/sys/boot/i386/boot2/../../common/ufsread.c:232:17: > warning: cast > from 'char *' to 'struct ufs1_dinode *' increases required > alignment from > 1 to 4 [-Wcast-align] > memcpy(&dp1, (struct ufs1_dinode *)blkbuf + n, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /home/svn/head/sys/boot/i386/boot2/../../common/ufsread.c:235:17: > warning: cast > from 'char *' to 'struct ufs2_dinode *' increases required > alignment from > 1 to 4 [-Wcast-align] > memcpy(&dp2, (struct ufs2_dinode *)blkbuf + n, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /home/svn/head/sys/boot/i386/boot2/boot2.c:224:1: warning: no previous > prototype > for function 'main' [-Wmissing-prototypes] > main(void) > ^ > /home/svn/head/sys/boot/i386/boot2/boot2.c:352:4: warning: cast from > 'caddr_t' > (aka 'char *') to 'Elf32_Word *' (aka 'unsigned int *') increases > required > alignment from 1 to 4 [-Wcast-align] > *(Elf32_Word *)p = es[i].sh_size; > ^~~~~~~~~~~~~~~ > /home/svn/head/sys/boot/i386/boot2/boot2.c:611:8: warning: cast from > 'caddr_t' > (aka 'char *') to 'uint32_t *' (aka 'unsigned int *') increases > required > alignment from 1 to 4 [-Wcast-align] > t1 = *(uint32_t *)PTOV(0x46c); > ^~~~~~~~~~~~~~~~~~~~~~~ > 5 warnings 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 > boot2.s: Assembler messages: > boot2.s:4073: Error: unknown pseudo-op: `.cfi_sections' > *** Error code 1 > > > > -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/