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

John Baldwin jhb at FreeBSD.org
Tue Aug 21 06:28:01 UTC 2018


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


More information about the svn-src-all mailing list