Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2018 07:27:58 +0100
From:      John Baldwin <jhb@FreeBSD.org>
To:        Matt Macy <mmacy@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r338128 - in head: cddl/lib/libzpool cddl/usr.bin/ztest cddl/usr.sbin/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys sys/conf sys/modules/zfs
Message-ID:  <31e29ae2-99ea-ab62-c337-c1d7f0b4aab5@FreeBSD.org>
In-Reply-To: <201808210345.w7L3jADR035282@repo.freebsd.org>
References:  <201808210345.w7L3jADR035282@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/21/18 4:45 AM, Matt Macy wrote:
> Author: mmacy
> Date: Tue Aug 21 03:45:09 2018
> New Revision: 338128
> URL: https://svnweb.freebsd.org/changeset/base/338128
> 
> Log:
>   Make dnode definition uniform on !x86
>   
>   gcc4 requires -fms-extensions to accept anonymous union members
> 
> Modified:
>   head/cddl/lib/libzpool/Makefile
>   head/cddl/usr.bin/ztest/Makefile
>   head/cddl/usr.sbin/zdb/Makefile
>   head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h
>   head/sys/conf/kern.pre.mk
>   head/sys/modules/zfs/Makefile

Are you really sure you need the CFLAGS changes in all these places?  Userland
already defaults to a 'cstd' of 'gnu99' which allows anonymous unions by
default (whereas the kernel uses 'c99'), and kern.pre.mk already adds
-fms-extensions to CFLAGS earlier in the file (so that change is redundant).
kmod.mk also adds -fms-extensions already (so the ZFS change should be redundant).

As mentioned earlier, <sys/mbuf.h> already uses anonymous unions, so nothing
would compile unless this already worked.

I suspect the real issue is that ZFS when compiled into the kernel uses a
custom set of CFLAGS that might not be picking up the CFLAGS.gcc.

In summary, all of the CFLAGS changes look wrong / redundant.  Can you share
what build error you were actually seeing without the CFLAGS changes?

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?31e29ae2-99ea-ab62-c337-c1d7f0b4aab5>