summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2020-11-20 09:38:39 +0200
committerToomas Soome <tsoome@me.com>2021-04-30 09:52:17 +0300
commit37630fa7bc917bff982fad0be16789eba84c5486 (patch)
tree38befe9bdae4117c5845fc1c3b79a6cc8ba18122
parente0cbdd5af707390adb289995fdf2dd8a3869dcca (diff)
downloadillumos-joyent-37630fa7bc917bff982fad0be16789eba84c5486.tar.gz
13728 build zdb command as 64-bit binary
Reviewed by: Yuri Pankov <yuripv@yuripv.dev> Reviewed by: Andy Fiddaman <Andy@omnios.org> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--exception_lists/check_rtime5
-rw-r--r--usr/src/cmd/zdb/Makefile57
-rw-r--r--usr/src/cmd/zdb/Makefile.com89
-rw-r--r--usr/src/cmd/zdb/amd64/Makefile32
-rw-r--r--usr/src/cmd/zdb/i386/Makefile31
-rw-r--r--usr/src/cmd/zdb/sparcv9/Makefile32
-rw-r--r--usr/src/cmd/zdb/zdb.c4
-rw-r--r--usr/src/pkg/manifests/system-file-system-zfs.mf4
8 files changed, 41 insertions, 213 deletions
diff --git a/exception_lists/check_rtime b/exception_lists/check_rtime
index d7dde844c5..c8897aed78 100644
--- a/exception_lists/check_rtime
+++ b/exception_lists/check_rtime
@@ -245,10 +245,7 @@ FORBIDDEN_DEP usr/lib/MACH(smbsrv)/libfksmbsrv.so.1
FORBIDDEN_DEP usr/lib/smbsrv/fksmbd
FORBIDDEN_DEP usr/lib/smbsrv/test-msgbuf
FORBIDDEN_DEP usr/lib/smbsrv/testoplock
-FORBIDDEN_DEP usr/sbin/amd64/zdb
-FORBIDDEN_DEP usr/sbin/i86/zdb
-FORBIDDEN_DEP usr/sbin/sparcv7/zdb
-FORBIDDEN_DEP usr/sbin/sparcv9/zdb
+FORBIDDEN_DEP usr/sbin/zdb
# libucb is intended for legacy compatibility, not general use
FORBIDDEN libucb\.so
diff --git a/usr/src/cmd/zdb/Makefile b/usr/src/cmd/zdb/Makefile
index 0ab3c2b8f0..2acafe7d5c 100644
--- a/usr/src/cmd/zdb/Makefile
+++ b/usr/src/cmd/zdb/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -19,37 +18,53 @@
#
# CDDL HEADER END
#
+
#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
+# Copyright (c) 2012 by Delphix. All rights reserved.
+# Copyright 2020 Joyent, Inc.
+# Copyright 2017 RackTop Systems.
#
-PROG:sh= basename `pwd`
+PROG= zdb
+OBJS= zdb.o zdb_il.o
include ../Makefile.cmd
+include ../Makefile.cmd.64
+include ../Makefile.ctf
+
+INCS += -I../../lib/libzpool/common
+INCS += -I../../uts/common/fs/zfs
+INCS += -I../../common/zfs
+INCS += -I../../lib/libzutil/common
+
+LDLIBS += -lzpool -lumem -lnvpair -lzutil -lavl -lfakekernel
+
+CSTD= $(CSTD_GNU99)
+
+CPPFLAGS.first = -I$(SRC)/lib/libfakekernel/common -D_FAKE_KERNEL
+CPPFLAGS += $(INCS)
+$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
-$(INTEL_BLD)SUBDIRS = $(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
+# re-enable warnings that we can tolerate, which are disabled by default
+# in Makefile.master
+CERRWARN += -_gcc=-Wmissing-braces
+CERRWARN += -_gcc=-Wsign-compare
-all := TARGET = all
-install := TARGET = install
-clean := TARGET = clean
-clobber := TARGET = clobber
-lint := TARGET = lint
+SMOFF += 64bit_shift,all_func_returns
.KEEP_STATE:
-all clean clobber lint: $(SUBDIRS)
+all: $(PROG)
-install: $(SUBDIRS)
- -$(RM) $(ROOTUSRSBINPROG)
- -$(LN) $(ISAEXEC) $(ROOTUSRSBINPROG)
+$(PROG): $(OBJS)
+ $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
+ $(POST_PROCESS)
-$(SUBDIRS): FRC
- @cd $@; pwd; $(MAKE) $(TARGET)
+install: all $(ROOTUSRSBINPROG)
-FRC:
+clean:
+ $(RM) $(OBJS)
include ../Makefile.targ
diff --git a/usr/src/cmd/zdb/Makefile.com b/usr/src/cmd/zdb/Makefile.com
deleted file mode 100644
index 42925319f4..0000000000
--- a/usr/src/cmd/zdb/Makefile.com
+++ /dev/null
@@ -1,89 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-# Copyright (c) 2012 by Delphix. All rights reserved.
-# Copyright 2020 Joyent, Inc.
-# Copyright 2017 RackTop Systems.
-#
-
-PROG:sh= cd ..; basename `pwd`
-SRCS= ../$(PROG).c ../zdb_il.c
-OBJS= $(PROG).o zdb_il.o
-
-include ../../Makefile.cmd
-include ../../Makefile.ctf
-
-INCS += -I../../../lib/libzpool/common
-INCS += -I../../../uts/common/fs/zfs
-INCS += -I../../../common/zfs
-INCS += -I../../../lib/libzutil/common
-
-LDLIBS += -lzpool -lumem -lnvpair -lzutil -lavl -lfakekernel
-
-CSTD= $(CSTD_GNU99)
-C99LMODE= -Xc99=%all
-
-CFLAGS += $(CCVERBOSE)
-CFLAGS64 += $(CCVERBOSE)
-CPPFLAGS.first = -I$(SRC)/lib/libfakekernel/common -D_FAKE_KERNEL
-CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS) -DDEBUG
-
-# re-enable warnings that we can tolerate, which are disabled by default
-# in Makefile.master
-CERRWARN += -_gcc=-Wmissing-braces
-CERRWARN += -_gcc=-Wsign-compare
-
-SMOFF += 64bit_shift,all_func_returns
-
-# lint complains about unused _umem_* functions
-LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
-LINTFLAGS64 += -xerroff=E_NAME_DEF_NOT_USED2
-
-# lint complains about unused inline functions, even though
-# they are "inline", not "static inline", with "extern inline"
-# implementations and usage in libzpool.
-LINTFLAGS += -erroff=E_STATIC_UNUSED
-LINTFLAGS64 += -erroff=E_STATIC_UNUSED
-
-LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
-LINTFLAGS64 += -erroff=E_BAD_PTR_CAST_ALIGN
-
-.KEEP_STATE:
-
-all: $(PROG)
-
-$(PROG): $(OBJS)
- $(LINK.c) -o $(PROG) $(OBJS) $(LDLIBS)
- $(POST_PROCESS)
-
-clean:
- $(RM) $(OBJS)
-
-lint: lint_SRCS
-
-include ../../Makefile.targ
-
-%.o: ../%.c
- $(COMPILE.c) $<
- $(POST_PROCESS_O)
diff --git a/usr/src/cmd/zdb/amd64/Makefile b/usr/src/cmd/zdb/amd64/Makefile
deleted file mode 100644
index c2f8b37b5d..0000000000
--- a/usr/src/cmd/zdb/amd64/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../Makefile.com
-include ../../Makefile.cmd.64
-
-install: all $(ROOTUSRSBINPROG64)
diff --git a/usr/src/cmd/zdb/i386/Makefile b/usr/src/cmd/zdb/i386/Makefile
deleted file mode 100644
index 5c93bf6ac6..0000000000
--- a/usr/src/cmd/zdb/i386/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../Makefile.com
-
-install: all $(ROOTUSRSBINPROG32)
diff --git a/usr/src/cmd/zdb/sparcv9/Makefile b/usr/src/cmd/zdb/sparcv9/Makefile
deleted file mode 100644
index c2f8b37b5d..0000000000
--- a/usr/src/cmd/zdb/sparcv9/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-include ../Makefile.com
-include ../../Makefile.cmd.64
-
-install: all $(ROOTUSRSBINPROG64)
diff --git a/usr/src/cmd/zdb/zdb.c b/usr/src/cmd/zdb/zdb.c
index 24fc8b9e76..d367120589 100644
--- a/usr/src/cmd/zdb/zdb.c
+++ b/usr/src/cmd/zdb/zdb.c
@@ -4240,7 +4240,9 @@ zdb_leak_init_prepare_indirect_vdevs(spa_t *spa, zdb_cb_t *zcb)
*/
VERIFY0(vdev_metaslab_init(vd, 0));
+#if defined(DEBUG)
vdev_indirect_mapping_t *vim = vd->vdev_indirect_mapping;
+#endif
uint64_t vim_idx = 0;
for (uint64_t m = 0; m < vd->vdev_ms_count; m++) {
@@ -5214,7 +5216,7 @@ verify_checkpoint_vdev_spacemaps(spa_t *checkpoint, spa_t *current)
for (uint64_t c = ckpoint_rvd->vdev_children;
c < current_rvd->vdev_children; c++) {
vdev_t *current_vd = current_rvd->vdev_child[c];
- ASSERT3P(current_vd->vdev_checkpoint_sm, ==, NULL);
+ VERIFY3P(current_vd->vdev_checkpoint_sm, ==, NULL);
}
}
diff --git a/usr/src/pkg/manifests/system-file-system-zfs.mf b/usr/src/pkg/manifests/system-file-system-zfs.mf
index 71d4781811..7a7561a903 100644
--- a/usr/src/pkg/manifests/system-file-system-zfs.mf
+++ b/usr/src/pkg/manifests/system-file-system-zfs.mf
@@ -100,8 +100,7 @@ file path=usr/lib/sysevent/modules/zfs_mod.so group=sys
file path=usr/lib/zfs/availdevs mode=0555
file path=usr/lib/zfs/pyzfs.py mode=0555
file path=usr/lib/zfs/pyzfs.pyc mode=0555
-$(i386_ONLY)file path=usr/sbin/$(ARCH32)/zdb mode=0555
-file path=usr/sbin/$(ARCH64)/zdb mode=0555
+file path=usr/sbin/zdb mode=0555
file path=usr/sbin/zstreamdump mode=0555
file path=usr/share/man/man1m/zdb.1m
file path=usr/share/man/man1m/zfs-program.1m
@@ -112,7 +111,6 @@ file path=usr/share/man/man1m/ztest.1m
file path=usr/share/man/man5/zpool-features.5
hardlink path=kernel/fs/$(ARCH64)/zfs target=../../../kernel/drv/$(ARCH64)/zfs
hardlink path=usr/lib/fs/zfs/fstyp target=../../../sbin/fstyp
-hardlink path=usr/sbin/zdb target=../../usr/lib/isaexec
legacy pkg=SUNWzfskr desc="ZFS kernel root components" \
name="ZFS Kernel (Root)"
legacy pkg=SUNWzfsr desc="ZFS root components" name="ZFS (Root)"