From owner-freebsd-toolchain@FreeBSD.ORG Sun Feb 20 04:11:07 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 7206D1065675; Sun, 20 Feb 2011 04:11:07 +0000 (UTC) Date: Sun, 20 Feb 2011 04:11:07 +0000 From: Alexander Best To: Roman Divacky Message-ID: <20110220041107.GA80143@freebsd.org> References: <20110219010136.GA92824@freebsd.org> <20110219115112.GA65227@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110219115112.GA65227@freebsd.org> Cc: freebsd-toolchain@freebsd.org Subject: Re: [RFC] code changes/removal in boot2.c and ufsread.c so clang can compile boot2 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2011 04:11:07 -0000 On Sat Feb 19 11, Roman Divacky wrote: > On Sat, Feb 19, 2011 at 01:01:36AM +0000, Alexander Best wrote: > > hi everybody, > > > > r218745 triggered quite a discussion about dead code in boot2.c. i talked to > > roman (rdivacky@) and we were trying to improve the situation so that boot2 > > would build with clang 2.8 (base) and the latest development version of > > clang (trunk). a lot of the ideas came from Bruce (bde@). > > > > i'd really appreciate, if somebody could have a look at this patchset. for me > > it strips down the boot2 code so clang is able to compile it just fine. please > > bear in mind that this has to work with boot2 supporting UFS1 *and* UFS2. so > > please be sure not to override BOOT2_UFS in your src.conf or some place else. > > > > you should be able to test the (hopefully sucessfully) compiled boot2 binary > > by copying it to /boot. please be sure to keep a backup of your existing boot2 > > file in case something breaks. > > no, just copying it to /boot is not enough. you have to run bsdlabel -B to > actually install it > > > the patchset (against a recent HEAD) can be found here: > > http://people.freebsd.org/~arundel/patches/boot2.c.diff2 > > the patch is wrong - you cant remove a.out support as "loader" still uses that > > I like the int -> unsigned parts of the patch and also the memsize() removal > may be interesting. here's an updated patchset: http://people.freebsd.org/~arundel/patches/boot2.c.diff3 maybe we could somehow get rid of the last printf() in ufsread.c: while ((n = fsread(*ino, buf, DEV_BSIZE)) > 0) for (s = buf; s < buf + DEV_BSIZE;) { d = (void *)s; if (ls) printf("%s ", d->d_name); else if (!strcmp(name, d->d_name)) { *ino = d->d_ino; return d->d_type; } s += d->d_reclen; } if (n != -1 && ls) printf("\n"); return 0; this would us gain another 26 bytes. cheers. alex > > roman -- a13x From owner-freebsd-toolchain@FreeBSD.ORG Tue Feb 22 18:17:05 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11AAC106566B for ; Tue, 22 Feb 2011 18:17:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C19768FC08 for ; Tue, 22 Feb 2011 18:17:04 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id p1MIDPqa024544 for ; Tue, 22 Feb 2011 11:13:26 -0700 (MST) (envelope-from imp@bsdimp.com) Message-ID: <4D63FCC1.4040108@bsdimp.com> Date: Tue, 22 Feb 2011 11:13:21 -0700 From: Warner Losh User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.13) Gecko/20101211 Thunderbird/3.1.7 MIME-Version: 1.0 To: freebsd-toolchain@freebsd.org References: <20110219010136.GA92824@freebsd.org> In-Reply-To: <20110219010136.GA92824@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [RFC] code changes/removal in boot2.c and ufsread.c so clang can compile boot2 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2011 18:17:05 -0000 On 02/18/2011 18:01, Alexander Best wrote: > hi everybody, > > r218745 triggered quite a discussion about dead code in boot2.c. i talked to > roman (rdivacky@) and we were trying to improve the situation so that boot2 > would build with clang 2.8 (base) and the latest development version of > clang (trunk). a lot of the ideas came from Bruce (bde@). > > i'd really appreciate, if somebody could have a look at this patchset. for me > it strips down the boot2 code so clang is able to compile it just fine. please > bear in mind that this has to work with boot2 supporting UFS1 *and* UFS2. so > please be sure not to override BOOT2_UFS in your src.conf or some place else. > > you should be able to test the (hopefully sucessfully) compiled boot2 binary > by copying it to /boot. please be sure to keep a backup of your existing boot2 > file in case something breaks. > > the patchset (against a recent HEAD) can be found here: > http://people.freebsd.org/~arundel/patches/boot2.c.diff2 > > cheers. > alex > Here's some comments: @@ -88,7 +97,7 @@ static ino_t lookup(const char *); static ssize_t fsread(ino_t, void *, size_t); static int ls, dsk_meta; -static uint32_t fs_off; +static uint32_t fs_off = 0; static __inline int fsfind(const char *name, ino_t * ino) @@ -98,7 +107,6 @@ fsfind(const char *name, ino_t * ino) char *s; ssize_t n; - fs_off = 0; while ((n = fsread(*ino, buf, DEV_BSIZE))> 0) for (s = buf; s< buf + DEV_BSIZE;) { d = (void *)s; How does the first part of this diff change things? bss gets the uninitialized and the data initialized to 0. but we also have this later: @@ -238,7 +245,6 @@ fsread(ino_t inode, void *buf, size_t nbyte) #endif inomap = inode; - fs_off = 0; blkmap = indmap = 0; } s = buf; - if (N_GETMAGIC(hdr.ex) == ZMAGIC) - fmt = 0; - else if (IS_ELF(hdr.eh)) + if (IS_ELF(eh)) fmt = 1; Doesn't this remove a.out support? Warner From owner-freebsd-toolchain@FreeBSD.ORG Tue Feb 22 18:30:16 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 0BA931065695; Tue, 22 Feb 2011 18:30:16 +0000 (UTC) Date: Tue, 22 Feb 2011 18:30:16 +0000 From: Alexander Best To: Warner Losh Message-ID: <20110222183015.GA37986@freebsd.org> References: <20110219010136.GA92824@freebsd.org> <4D63FCC1.4040108@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D63FCC1.4040108@bsdimp.com> Cc: freebsd-toolchain@freebsd.org Subject: Re: [RFC] code changes/removal in boot2.c and ufsread.c so clang can compile boot2 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2011 18:30:16 -0000 On Tue Feb 22 11, Warner Losh wrote: > On 02/18/2011 18:01, Alexander Best wrote: > >hi everybody, > > > >r218745 triggered quite a discussion about dead code in boot2.c. i talked > >to > >roman (rdivacky@) and we were trying to improve the situation so that boot2 > >would build with clang 2.8 (base) and the latest development version of > >clang (trunk). a lot of the ideas came from Bruce (bde@). > > > >i'd really appreciate, if somebody could have a look at this patchset. for > >me > >it strips down the boot2 code so clang is able to compile it just fine. > >please > >bear in mind that this has to work with boot2 supporting UFS1 *and* UFS2. > >so > >please be sure not to override BOOT2_UFS in your src.conf or some place > >else. > > > >you should be able to test the (hopefully sucessfully) compiled boot2 > >binary > >by copying it to /boot. please be sure to keep a backup of your existing > >boot2 > >file in case something breaks. > > > >the patchset (against a recent HEAD) can be found here: > >http://people.freebsd.org/~arundel/patches/boot2.c.diff2 > > > >cheers. > >alex > > > > Here's some comments: > > @@ -88,7 +97,7 @@ static ino_t lookup(const char *); > static ssize_t fsread(ino_t, void *, size_t); > > static int ls, dsk_meta; > -static uint32_t fs_off; > +static uint32_t fs_off = 0; > > static __inline int > fsfind(const char *name, ino_t * ino) > @@ -98,7 +107,6 @@ fsfind(const char *name, ino_t * ino) > char *s; > ssize_t n; > > - fs_off = 0; > while ((n = fsread(*ino, buf, DEV_BSIZE))> 0) > for (s = buf; s< buf + DEV_BSIZE;) { > d = (void *)s; > > How does the first part of this diff change things? bss gets the > uninitialized and the data initialized to 0. > > but we also have this later: > > @@ -238,7 +245,6 @@ fsread(ino_t inode, void *buf, size_t nbyte) > > #endif > inomap = inode; > - fs_off = 0; > blkmap = indmap = 0; > } > s = buf; > > > - if (N_GETMAGIC(hdr.ex) == ZMAGIC) > - fmt = 0; > - else if (IS_ELF(hdr.eh)) > + if (IS_ELF(eh)) > fmt = 1; > > > Doesn't this remove a.out support? indeed i removed that part from the newest patch: http://people.freebsd.org/~arundel/patches/boot2.c.diff3 > > Warner -- a13x From owner-freebsd-toolchain@FreeBSD.ORG Tue Feb 22 19:14:46 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CE2E106564A; Tue, 22 Feb 2011 19:14:46 +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 42ABD8FC0C; Tue, 22 Feb 2011 19:14:45 +0000 (UTC) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 141059CB0BC; Tue, 22 Feb 2011 20:14:44 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by lev.vlakno.cz (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s+yveTtWGZmT; Tue, 22 Feb 2011 20:14:31 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id CA00E9CB526; Tue, 22 Feb 2011 20:14:31 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.4/8.14.4/Submit) id p1MJEVvV040482; Tue, 22 Feb 2011 20:14:31 +0100 (CET) (envelope-from rdivacky) Date: Tue, 22 Feb 2011 20:14:31 +0100 From: Roman Divacky To: Alexander Best Message-ID: <20110222191431.GA40313@freebsd.org> References: <20110219010136.GA92824@freebsd.org> <4D63FCC1.4040108@bsdimp.com> <20110222183015.GA37986@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110222183015.GA37986@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-toolchain@freebsd.org Subject: Re: [RFC] code changes/removal in boot2.c and ufsread.c so clang can compile boot2 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2011 19:14:46 -0000 fwiw, this is what I have: http://lev.vlakno.cz/~rdivacky/boot2-diet.patch with some llvm changed (-mrtd implementation + earlycse at the end of -O2) I am still at -113 bytes short on UFS1+UFS2 boot2 this is with latest llvm, with the one in fbsd it was at roughly -80 (stack alignment changes) On Tue, Feb 22, 2011 at 06:30:16PM +0000, Alexander Best wrote: > On Tue Feb 22 11, Warner Losh wrote: > > On 02/18/2011 18:01, Alexander Best wrote: > > >hi everybody, > > > > > >r218745 triggered quite a discussion about dead code in boot2.c. i talked > > >to > > >roman (rdivacky@) and we were trying to improve the situation so that boot2 > > >would build with clang 2.8 (base) and the latest development version of > > >clang (trunk). a lot of the ideas came from Bruce (bde@). > > > > > >i'd really appreciate, if somebody could have a look at this patchset. for > > >me > > >it strips down the boot2 code so clang is able to compile it just fine. > > >please > > >bear in mind that this has to work with boot2 supporting UFS1 *and* UFS2. > > >so > > >please be sure not to override BOOT2_UFS in your src.conf or some place > > >else. > > > > > >you should be able to test the (hopefully sucessfully) compiled boot2 > > >binary > > >by copying it to /boot. please be sure to keep a backup of your existing > > >boot2 > > >file in case something breaks. > > > > > >the patchset (against a recent HEAD) can be found here: > > >http://people.freebsd.org/~arundel/patches/boot2.c.diff2 > > > > > >cheers. > > >alex > > > > > > > Here's some comments: > > > > @@ -88,7 +97,7 @@ static ino_t lookup(const char *); > > static ssize_t fsread(ino_t, void *, size_t); > > > > static int ls, dsk_meta; > > -static uint32_t fs_off; > > +static uint32_t fs_off = 0; > > > > static __inline int > > fsfind(const char *name, ino_t * ino) > > @@ -98,7 +107,6 @@ fsfind(const char *name, ino_t * ino) > > char *s; > > ssize_t n; > > > > - fs_off = 0; > > while ((n = fsread(*ino, buf, DEV_BSIZE))> 0) > > for (s = buf; s< buf + DEV_BSIZE;) { > > d = (void *)s; > > > > How does the first part of this diff change things? bss gets the > > uninitialized and the data initialized to 0. > > > > but we also have this later: > > > > @@ -238,7 +245,6 @@ fsread(ino_t inode, void *buf, size_t nbyte) > > > > #endif > > inomap = inode; > > - fs_off = 0; > > blkmap = indmap = 0; > > } > > s = buf; > > > > > > - if (N_GETMAGIC(hdr.ex) == ZMAGIC) > > - fmt = 0; > > - else if (IS_ELF(hdr.eh)) > > + if (IS_ELF(eh)) > > fmt = 1; > > > > > > Doesn't this remove a.out support? > > indeed i removed that part from the newest patch: > > http://people.freebsd.org/~arundel/patches/boot2.c.diff3 > > > > > Warner > > -- > a13x > _______________________________________________ > freebsd-toolchain@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > To unsubscribe, send any mail to "freebsd-toolchain-unsubscribe@freebsd.org" From owner-freebsd-toolchain@FreeBSD.ORG Tue Feb 22 19:23:13 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 47B1E1065694; Tue, 22 Feb 2011 19:23:13 +0000 (UTC) Date: Tue, 22 Feb 2011 19:23:13 +0000 From: Alexander Best To: Roman Divacky Message-ID: <20110222192313.GA44517@freebsd.org> References: <20110219010136.GA92824@freebsd.org> <4D63FCC1.4040108@bsdimp.com> <20110222183015.GA37986@freebsd.org> <20110222191431.GA40313@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110222191431.GA40313@freebsd.org> Cc: freebsd-toolchain@freebsd.org Subject: Re: [RFC] code changes/removal in boot2.c and ufsread.c so clang can compile boot2 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2011 19:23:13 -0000 On Tue Feb 22 11, Roman Divacky wrote: > fwiw, this is what I have: > > http://lev.vlakno.cz/~rdivacky/boot2-diet.patch > > with some llvm changed (-mrtd implementation + earlycse at the > end of -O2) I am still at -113 bytes short on UFS1+UFS2 boot2 i was wondering...could we get rid of all the PATH_CONFIG and PATH_KERNEL stuff? i tried this the other day with gptboot (which is pretty much identical to boot2) and it seems booting a kernel directly got broken a long time ago. so since invoking the loader is mandatory we could dump the kernel loading code and the code that looks for entries in /boot.config completely. you should be able to verify this by hitting a key before boot2 comes up and enter the path to your kernel directly. for me it failed loading the kernel (that's on amd64) with some btx error. cheers. alex > > this is with latest llvm, with the one in fbsd it was at roughly -80 > (stack alignment changes) > > On Tue, Feb 22, 2011 at 06:30:16PM +0000, Alexander Best wrote: > > On Tue Feb 22 11, Warner Losh wrote: > > > On 02/18/2011 18:01, Alexander Best wrote: > > > >hi everybody, > > > > > > > >r218745 triggered quite a discussion about dead code in boot2.c. i talked > > > >to > > > >roman (rdivacky@) and we were trying to improve the situation so that boot2 > > > >would build with clang 2.8 (base) and the latest development version of > > > >clang (trunk). a lot of the ideas came from Bruce (bde@). > > > > > > > >i'd really appreciate, if somebody could have a look at this patchset. for > > > >me > > > >it strips down the boot2 code so clang is able to compile it just fine. > > > >please > > > >bear in mind that this has to work with boot2 supporting UFS1 *and* UFS2. > > > >so > > > >please be sure not to override BOOT2_UFS in your src.conf or some place > > > >else. > > > > > > > >you should be able to test the (hopefully sucessfully) compiled boot2 > > > >binary > > > >by copying it to /boot. please be sure to keep a backup of your existing > > > >boot2 > > > >file in case something breaks. > > > > > > > >the patchset (against a recent HEAD) can be found here: > > > >http://people.freebsd.org/~arundel/patches/boot2.c.diff2 > > > > > > > >cheers. > > > >alex > > > > > > > > > > Here's some comments: > > > > > > @@ -88,7 +97,7 @@ static ino_t lookup(const char *); > > > static ssize_t fsread(ino_t, void *, size_t); > > > > > > static int ls, dsk_meta; > > > -static uint32_t fs_off; > > > +static uint32_t fs_off = 0; > > > > > > static __inline int > > > fsfind(const char *name, ino_t * ino) > > > @@ -98,7 +107,6 @@ fsfind(const char *name, ino_t * ino) > > > char *s; > > > ssize_t n; > > > > > > - fs_off = 0; > > > while ((n = fsread(*ino, buf, DEV_BSIZE))> 0) > > > for (s = buf; s< buf + DEV_BSIZE;) { > > > d = (void *)s; > > > > > > How does the first part of this diff change things? bss gets the > > > uninitialized and the data initialized to 0. > > > > > > but we also have this later: > > > > > > @@ -238,7 +245,6 @@ fsread(ino_t inode, void *buf, size_t nbyte) > > > > > > #endif > > > inomap = inode; > > > - fs_off = 0; > > > blkmap = indmap = 0; > > > } > > > s = buf; > > > > > > > > > - if (N_GETMAGIC(hdr.ex) == ZMAGIC) > > > - fmt = 0; > > > - else if (IS_ELF(hdr.eh)) > > > + if (IS_ELF(eh)) > > > fmt = 1; > > > > > > > > > Doesn't this remove a.out support? > > > > indeed i removed that part from the newest patch: > > > > http://people.freebsd.org/~arundel/patches/boot2.c.diff3 > > > > > > > > Warner > > > > -- > > a13x > > _______________________________________________ > > freebsd-toolchain@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > > To unsubscribe, send any mail to "freebsd-toolchain-unsubscribe@freebsd.org" -- a13x From owner-freebsd-toolchain@FreeBSD.ORG Tue Feb 22 21:44:02 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94AF610656B7 for ; Tue, 22 Feb 2011 21:44:02 +0000 (UTC) (envelope-from giffunip@tutopia.com) Received: from nm24-vm0.bullet.mail.sp2.yahoo.com (nm24-vm0.bullet.mail.sp2.yahoo.com [98.139.91.226]) by mx1.freebsd.org (Postfix) with SMTP id 711C18FC16 for ; Tue, 22 Feb 2011 21:44:02 +0000 (UTC) Received: from [98.139.91.69] by nm24.bullet.mail.sp2.yahoo.com with NNFMP; 22 Feb 2011 21:44:02 -0000 Received: from [98.139.91.36] by tm9.bullet.mail.sp2.yahoo.com with NNFMP; 22 Feb 2011 21:44:02 -0000 Received: from [127.0.0.1] by omp1036.mail.sp2.yahoo.com with NNFMP; 22 Feb 2011 21:44:02 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 237350.8405.bm@omp1036.mail.sp2.yahoo.com Received: (qmail 25167 invoked by uid 60001); 22 Feb 2011 21:44:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1298411041; bh=yTaDZA6jqNArnamKXLZC2vpPmbxGD2P084PDOCfwpN0=; h=Message-ID:X-YMail-OSG:Received:X-RocketYMMF:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=YLBQx5qp3gei16wGdtSegS7n22hwjIjfyhqZIjpx/GLHO0oxItPhkQFxGtvqUT3V51dw0dib6X79LuNfB6d9ueLBmrScWGdO5tBSbWAASEwsfvFz+mxfiSg5K67JUx8ZWsqtPtZ7K31N6R/f/w0XXHOAcLvt2eenf2vdscVW9L8= Message-ID: <729674.24938.qm@web113508.mail.gq1.yahoo.com> X-YMail-OSG: UdyL5L0VM1lTioi8_RN0jKIemiVvs1IXiAPt_Mw.KUqbX5b 5yIKgxFLVwRoM45myUoXTQy1nzF.AyZCYsI0oC_1c6DNgmEp8l0byv_50lR0 y5VI_.xCq6IU0GXJwalUlcsEJfl7ScE3sSvz6UeoNPEZnf8dWT0ATjelOS35 g6VJZFuxzIpDcO2zgtNML5leER_An7vs.CSaluY0saJpN_uM8MIoITSpgQhC NduCUX2UYGjY.nh7XJ5OFuSXbrmodzSr5vYukNRCRzSCA.9zqrUnmeXK1NLK HDO6M3E9EF9yGuz7I8vlmmV_B3QZBcvnUeS2LdDExgdtfDpvKh.eDD58Iohg jqctSjb9yMoBTQNFK6Ud4blA2hMvkQWtXWfIAlrsTDhHWpCVrHnmP9qYdRO6 kTAQqn1oxoGOlMQ-- Received: from [190.157.140.248] by web113508.mail.gq1.yahoo.com via HTTP; Tue, 22 Feb 2011 13:44:01 PST X-RocketYMMF: giffunip X-Mailer: YahooMailClassic/11.4.20 YahooMailWebService/0.8.109.292656 Date: Tue, 22 Feb 2011 13:44:01 -0800 (PST) From: "Pedro F. Giffuni" To: freebsd-toolchain@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Subject: BSD format-extensions break the gcc testsuite X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: giffunip@tutopia.com List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Feb 2011 21:44:02 -0000 Hello; I have been trying to build kernels with llvm-gcc4 so I took the code to add -fformat-extensions from our system gcc and I added it to llvm-gcc4. Unfortunately, even when format-extensions are not set, it seems to alter gcc's behaviour. The llvm committer reported this issue: _______ ... I applied the three patches in PR9097, and ran the LLVM test suite and the GCC test suite. The news is generally positive, but this test case: .../llvmgcc42.test/gcc/testsuite/gcc.dg/format/attr-3.c now segfaults on this declaration: extern void fe0 (const char *, ...) __attribute__((format(12345, 1, 2))); Both the patched and unpatched compiler generate lots of diagnostics for this test case, but the unpatched compiler doesn't segfault. ... _____ Anyone that can help? I suspect this issue may also be causing trouble in our base compiler. cheers, Pedro.