Make dnode definition uniform on !x86

gcc4 requires -fms-extensions to accept anonymous union members
This commit is contained in:
Matt Macy 2018-08-21 03:45:09 +00:00
parent 2aae9642a5
commit d12e91d584
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=338128
6 changed files with 5 additions and 6 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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) + \

View File

@ -89,6 +89,7 @@ CFLAGS_ARCH_PARAMS?=--param max-inline-insns-single=1000 -DMACHINE_ARCH='"${MACH
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

View File

@ -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