Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Aug 2018 03:45:10 +0000 (UTC)
From:      Matt Macy <mmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   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:  <201808210345.w7L3jADR035282@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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

Modified: head/cddl/lib/libzpool/Makefile
==============================================================================
--- head/cddl/lib/libzpool/Makefile	Tue Aug 21 03:33:54 2018	(r338127)
+++ head/cddl/lib/libzpool/Makefile	Tue Aug 21 03:45:09 2018	(r338128)
@@ -61,6 +61,7 @@ CFLAGS+=	-DWANTS_MUTEX_OWNED
 CFLAGS+=	-I${SRCTOP}/lib/libpthread/thread
 CFLAGS+=	-I${SRCTOP}/lib/libpthread/sys
 CFLAGS+=	-I${SRCTOP}/lib/libthr/arch/${MACHINE_CPUARCH}/include
+CFLAGS.gcc+=	-fms-extensions
 
 LIBADD=		md pthread z nvpair avl umem
 

Modified: head/cddl/usr.bin/ztest/Makefile
==============================================================================
--- head/cddl/usr.bin/ztest/Makefile	Tue Aug 21 03:33:54 2018	(r338127)
+++ head/cddl/usr.bin/ztest/Makefile	Tue Aug 21 03:45:09 2018	(r338128)
@@ -24,6 +24,7 @@ CSTD=	c99
 # Since there are many asserts in this program, it makes no sense to compile
 # it without debugging.
 CFLAGS+= -g -DDEBUG=1 -Wno-format
+CFLAGS.gcc+= -fms-extensions
 
 HAS_TESTS=
 SUBDIR.${MK_TESTS}+= tests

Modified: head/cddl/usr.sbin/zdb/Makefile
==============================================================================
--- head/cddl/usr.sbin/zdb/Makefile	Tue Aug 21 03:33:54 2018	(r338127)
+++ head/cddl/usr.sbin/zdb/Makefile	Tue Aug 21 03:45:09 2018	(r338128)
@@ -25,6 +25,7 @@ CFLAGS+= -I${SRCTOP}/cddl/contrib/opensolaris/head
 
 LIBADD=	nvpair umem uutil zfs zpool
 
+CFLAGS.gcc+= -fms-extensions
 # Since there are many asserts in this program, it makes no sense to compile
 # it without debugging.
 CFLAGS+=	-g -DDEBUG=1

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h	Tue Aug 21 03:33:54 2018	(r338127)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dnode.h	Tue Aug 21 03:45:09 2018	(r338128)
@@ -185,7 +185,6 @@ typedef struct dnode_phys {
 	 * | dn_blkptr[0]  | dn_bonus[0..191]      | dn_spill      |
 	 * +---------------+-----------------------+---------------+
 	 */
-#if defined(__i386__) || defined(__amd64__)
 	union {
 		blkptr_t dn_blkptr[1+DN_OLD_MAX_BONUSLEN/sizeof (blkptr_t)];
 		struct {
@@ -199,11 +198,6 @@ typedef struct dnode_phys {
 			blkptr_t dn_spill;
  		};
 	};
-#else
-	blkptr_t dn_blkptr[1];
-	uint8_t dn_bonus[DN_OLD_MAX_BONUSLEN - sizeof (blkptr_t)];
-	blkptr_t dn_spill;
-#endif
 } dnode_phys_t;
 
 #define	DN_SPILL_BLKPTR(dnp)	(blkptr_t *)((char *)(dnp) + \

Modified: head/sys/conf/kern.pre.mk
==============================================================================
--- head/sys/conf/kern.pre.mk	Tue Aug 21 03:33:54 2018	(r338127)
+++ head/sys/conf/kern.pre.mk	Tue Aug 21 03:45:09 2018	(r338128)
@@ -89,6 +89,7 @@ CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=10
 CFLAGS.gcc+= -fno-common -fms-extensions -finline-limit=${INLINE_LIMIT}
 CFLAGS.gcc+= --param inline-unit-growth=${CFLAGS_PARAM_INLINE_UNIT_GROWTH}
 CFLAGS.gcc+= --param large-function-growth=${CFLAGS_PARAM_LARGE_FUNCTION_GROWTH}
+CFLAGS.gcc+= -fms-extensions
 .if defined(CFLAGS_ARCH_PARAMS)
 CFLAGS.gcc+=${CFLAGS_ARCH_PARAMS}
 .endif

Modified: head/sys/modules/zfs/Makefile
==============================================================================
--- head/sys/modules/zfs/Makefile	Tue Aug 21 03:33:54 2018	(r338127)
+++ head/sys/modules/zfs/Makefile	Tue Aug 21 03:45:09 2018	(r338128)
@@ -95,6 +95,7 @@ CFLAGS+=-I${SYSDIR}
 CFLAGS+=-I${SUNW}/common/zfs
 CFLAGS+=-I${SUNW}/common
 CFLAGS+=-DBUILDING_ZFS
+CFLAGS.gcc+=-fms-extensions
 
 .if ${MACHINE_ARCH} == "powerpc64"
 CFLAGS.gcc+=-mminimal-toc



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