Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Apr 2017 18:02:20 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd@pdx.rh.CN85.dnsmgr.net>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        Gleb Smirnoff <glebius@freebsd.org>, Ngie Cooper <yaneurabeya@gmail.com>,  Ed Maste <emaste@freebsd.org>, "Pedro F. Giffuni" <pfg@freebsd.org>, "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-stable@freebsd.org" <svn-src-stable@freebsd.org>, "svn-src-stable-10@freebsd.org" <svn-src-stable-10@freebsd.org>
Subject:   Re: svn commit: r314937 - in stable/10/sys: fs/ext2fs modules/ext2fs
Message-ID:  <201704280102.v3S12KFL073904@pdx.rh.CN85.dnsmgr.net>
In-Reply-To: <20170428081746.H4303@besplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Thu, 27 Apr 2017, Gleb Smirnoff wrote:
> 
> > On Thu, Apr 27, 2017 at 03:00:56PM -0700, Ngie Cooper wrote:
> > N> On Thu, Apr 27, 2017 at 1:52 PM, Ed Maste <emaste@freebsd.org> wrote:
> > N> > On 8 March 2017 at 21:47, Pedro F. Giffuni <pfg@freebsd.org> wrote:
> > N> >> Author: pfg
> > N> >> Date: Thu Mar  9 02:47:01 2017
> > N> >> New Revision: 314937
> > N> >> URL: https://svnweb.freebsd.org/changeset/base/314937
> > N> >>
> > N> >> Log:
> > N> >>   Revert 294545:
> > N> >>   Bringing back ext4: add support for reading sparse files
> > N> >
> > N> > Tinderbox is broken on GCC architectures, e.g. from powerpc.LINT64:
> > N> >
> > N> > In file included from /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/inode.h:46,
> > N> >                  from /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_alloc.c:50:
> > N> > /scratch/tmp/emaste/freebsd/sys/fs/ext2fs/ext2_extents.h:91: warning:
> > N> > declaration does not declare anything
> > N>
> > N> ... because of anonymous unions not being supported in gcc 4.2.1.
> 
> Anonymous unions have been a standard gcc feature since nearly gcc-1.
> 
> > The whole kernel is built with option that enables them on 4.2.1.
> >
> > CFLAGS.gcc+=    -fms-extensions
> 
> This is a bad way to enable standard gcc anonymous unions.  It also
> enables ms extensions which also gives unused extensions of standard
> gcc anonymous, and other even more unwanted ms features.
> 
> The correct way to enable gcc features is to compile with -std=gnu99.
> This has been done for a long time in userland, but the has been
                                                         ^+kernel?

> misconfigured to use -std=c99 for a long time.  This is sort of
> backwards -- the kernel is inherently more unportable and can't
> possible be compiled by a C99 compiler, while parts of userland
> can.  However, userland is larger, so people setting excessive
> -std flags soon found that -std=c99 doesn't work.
> 
> With no -std flag, gcc defaults to something like -std=gnu89, so
> it supports its old anonymous unions feature but not the many
> C99 features needed to compile almost anything now.
> 
> Bruce
> 
> 

-- 
Rod Grimes                                                 rgrimes@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704280102.v3S12KFL073904>