summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Levon <john.levon@joyent.com>2020-02-19 18:56:25 +0000
committerGitHub <noreply@github.com>2020-02-19 18:56:25 +0000
commitdd712f24b7ebd3fb87031dcc089f9198928b2338 (patch)
tree630136ddb899e73f11b49294295eec6cccb15c80
parent77d478ddacb21ab351a7726510b1d81236125173 (diff)
downloadillumos-joyent-dd712f24b7ebd3fb87031dcc089f9198928b2338.tar.gz
OS-8113 enable ld guidance (#262)
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>
-rw-r--r--manifest2
-rw-r--r--usr/src/Makefile.master7
-rw-r--r--usr/src/cmd/ipf/tools/Makefile.tools22
-rw-r--r--usr/src/cmd/rcap/rcapd/Makefile4
-rw-r--r--usr/src/cmd/rcap/rcapstat/Makefile12
-rw-r--r--usr/src/cmd/svc/configd/Makefile2
-rw-r--r--usr/src/cmd/zoneadmd/Makefile.com4
-rw-r--r--usr/src/lib/brand/jcommon/Makefile4
-rw-r--r--usr/src/lib/brand/lx/librtld_db/Makefile.com15
-rw-r--r--usr/src/lib/brand/lx/librtld_db/amd64/Makefile4
-rw-r--r--usr/src/lib/brand/lx/librtld_db/amd64/mapfile-vers44
-rw-r--r--usr/src/lib/brand/lx/librtld_db/common/mapfile-vers58
-rw-r--r--usr/src/lib/brand/lx/lx_brand/Makefile.com8
-rw-r--r--usr/src/lib/brand/lx/lx_brand/common/mapfile47
-rw-r--r--usr/src/lib/brand/lx/lx_brand/common/mapfile-vers9
-rw-r--r--usr/src/lib/fm/libfmd_snmp/Makefile.com2
-rw-r--r--usr/src/lib/libbunyan/Makefile.com4
-rw-r--r--usr/src/lib/libdladm/Makefile.com4
-rw-r--r--usr/src/lib/libsmartsshd/Makefile.com4
-rw-r--r--usr/src/lib/varpd/direct/Makefile.com4
-rw-r--r--usr/src/lib/varpd/files/Makefile.com4
-rw-r--r--usr/src/lib/varpd/svp/Makefile.com4
-rw-r--r--usr/src/test/os-tests/tests/file-locking/Makefile15
-rw-r--r--usr/src/tools/cw/Makefile5
-rw-r--r--usr/src/tools/smatch/Makefile4
25 files changed, 66 insertions, 226 deletions
diff --git a/manifest b/manifest
index 8fcb2c018c..fc6c91986d 100644
--- a/manifest
+++ b/manifest
@@ -1264,6 +1264,8 @@ f lib/amd64/libdevid.so.1 0755 root bin
s lib/amd64/libdevid.so=libdevid.so.1
f lib/amd64/libdevinfo.so.1 0755 root bin
s lib/amd64/libdevinfo.so=libdevinfo.so.1
+f lib/amd64/libdhcpagent.so.1 0755 root bin
+s lib/amd64/libdhcpagent.so=libdhcpagent.so.1
f lib/amd64/libdl.so.1 0755 root bin
s lib/amd64/libdl.so=libdl.so.1
f lib/amd64/libdladm.so.1 0755 root bin
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index 0a3c9c6d9d..d2402d2fff 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -27,9 +27,8 @@
# Copyright 2015 Gary Mills
# Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com>
# Copyright 2016 Toomas Soome <tsoome@me.com>
-# Copyright 2017 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
# Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
-# Copyright 2019, Joyent, Inc.
# Copyright 2019 RackTop Systems.
#
@@ -1013,9 +1012,7 @@ ZTEXT= -ztext
ZVERBOSE= -zverbose
ZASSERTDEFLIB= -zassert-deflib
ZGUIDANCE= -zguidance
-# XXX temporarily disable this to get the SmartOS build working
-# ZFATALWARNINGS= -zfatal-warnings
-ZFATALWARNINGS=
+ZFATALWARNINGS= -zfatal-warnings
GSHARED= -G
CCMT= -mt
diff --git a/usr/src/cmd/ipf/tools/Makefile.tools b/usr/src/cmd/ipf/tools/Makefile.tools
index c57f0ace87..a89fc63f97 100644
--- a/usr/src/cmd/ipf/tools/Makefile.tools
+++ b/usr/src/cmd/ipf/tools/Makefile.tools
@@ -23,7 +23,7 @@
# Use is subject to license terms.
#
# Copyright 2013 Nexenta Systems, Inc. All rights reserved.
-# Copyright 2019 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
PROG= ipf ipfs ipmon ipnat ippool ipfstat
@@ -56,7 +56,7 @@ SRCS= $(OBJSL:%.o=../%.c)
include ../../../Makefile.cmd
include ../../Makefile.ipf
-LDLIBS += $(LIBBPF) -luuid
+LDLIBS += $(LIBBPF)
LDFLAGS += $(MAPFILE.NGB:%=-M%)
CPPFLAGS += -I. -DIPFILTER_LOOKUP -DIPFILTER_LOG
@@ -64,12 +64,12 @@ CPPFLAGS += -I. -DIPFILTER_LOOKUP -DIPFILTER_LOG
ipfstat.o := CPPFLAGS += -DSTATETOP
ipfstat := LDLIBS += -lcurses
-ipf := LDLIBS += -lsocket -lnsl
-ipftest := LDLIBS += -lsocket -lnsl -lmd
-ipfstat := LDLIBS += -lsocket -lnsl -lkvm -lelf
-ipmon := LDLIBS += -lsocket -lnsl
-ipnat := LDLIBS += -lsocket -lnsl -lkvm -lelf
-ippool := LDLIBS += -lsocket -lnsl -lkvm -lelf
+ipf := LDLIBS += -lsocket -lnsl -luuid
+ipftest := LDLIBS += -lsocket -lnsl -lmd -luuid
+ipfstat := LDLIBS += -lsocket -lnsl -lkvm -lelf -luuid
+ipmon := LDLIBS += -lsocket -lnsl -luuid
+ipnat := LDLIBS += -lsocket -lnsl -lkvm -lelf -luuid
+ippool := LDLIBS += -lsocket -lnsl -lkvm -lelf -luuid
CLEANFILES += $(OBJS)
CLOBBERFILES += $(IPFPROG)
@@ -243,17 +243,15 @@ ippool_l.o: ../ippool_l.c $(COMMONIPF)/netinet/ip_pool.h ../ippool_l.h
CLEANFILES += ../ippool_l.c ../ippool_l.h
ipftest: $(IPFTEST_OBJS) $(LIBIPF) $(MAPFILE.NGB)
- $(LINK.c) $(ZIGNORE) -o ipftest $(IPFTEST_OBJS) $(LDLIBS)
+ $(LINK.c) $(ZIGNORE) -o ipftest $(IPFTEST_OBJS) $(LDLIBS)
$(POST_PROCESS)
clean:
-$(RM) $(CLEANFILES)
-lint: lint_SRCS
-
#
# NOTE: all rules must use relative paths otherwise absolute paths will be
-# embedded into the binaries making them false positives and
+# embedded into the binaries making them false positives and
# reported by wsdiff
#
diff --git a/usr/src/cmd/rcap/rcapd/Makefile b/usr/src/cmd/rcap/rcapd/Makefile
index 77f4d6812e..355b5eef0a 100644
--- a/usr/src/cmd/rcap/rcapd/Makefile
+++ b/usr/src/cmd/rcap/rcapd/Makefile
@@ -22,6 +22,8 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2020 Joyent, Inc.
+#
include ../../Makefile.cmd
include ../../Makefile.cmd.64
@@ -62,7 +64,7 @@ LINTSRCS = rcapd_main.c \
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
CPPFLAGS += -DDEBUG_MSG
CPPFLAGS += -I$(COMMON_DIR)
-LDLIBS += -lkstat -lproc -lproject -lzonecfg -lumem -lscf
+LDLIBS += -lkstat -lproc -lproject -lumem -lscf
LDLIBS += $(EXTRA_LDLIBS)
LINTFLAGS64 += -u
diff --git a/usr/src/cmd/rcap/rcapstat/Makefile b/usr/src/cmd/rcap/rcapstat/Makefile
index 1b4e0e6180..a886b05782 100644
--- a/usr/src/cmd/rcap/rcapstat/Makefile
+++ b/usr/src/cmd/rcap/rcapstat/Makefile
@@ -22,6 +22,8 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
+# Copyright 2020 Joyent, Inc.
+#
.KEEP_STATE:
.SUFFIXES:
@@ -29,7 +31,7 @@
include ../../Makefile.cmd
COMMON_DIR= ../common # for Makefile.com
-SRCS = rcapstat.c \
+SRCS = rcapstat.c \
utils.c
LINTSRCS = $(COMMON_DIR)/utils.c \
@@ -41,9 +43,9 @@ STATCOMMONDIR = $(SRC)/cmd/stat/common
STAT_COMMON_OBJS = timestamp.o
STAT_COMMON_SRCS = $(STAT_COMMON_OBJS:%.o=$(STATCOMMONDIR)/%.c)
-$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
-CPPFLAGS += -I$(COMMON_DIR) -I$(STATCOMMONDIR)
-LDLIBS += -lumem -lzonecfg -lscf
+$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
+CPPFLAGS += -I$(COMMON_DIR) -I$(STATCOMMONDIR)
+LDLIBS += -lumem -lscf
LDFLAGS += $(MAPFILE.NGB:%=-M%)
LINTFLAGS += $(LDLIBS) -mnu
@@ -54,7 +56,7 @@ OBJS = $(SRCS:%.c=%.o) rcapd_conf.o
POFILES = $(OBJS:%.o=%.po)
POFILE = p$(PROG).po
-CLOBBERFILES += rcapd_conf.c $(POFILES) $(POFILE)
+CLOBBERFILES += rcapd_conf.c $(POFILES) $(POFILE)
.NO_PARALLEL:
.PARALLEL: $(OBJS) $(LINTFILES)
diff --git a/usr/src/cmd/svc/configd/Makefile b/usr/src/cmd/svc/configd/Makefile
index e498673e40..f80c411e83 100644
--- a/usr/src/cmd/svc/configd/Makefile
+++ b/usr/src/cmd/svc/configd/Makefile
@@ -81,7 +81,7 @@ ROOTSCRIPTFILE = $(ROOTCMDDIR)/$(SCRIPTFILE)
# Native variant (used in ../seed). We only need to set NATIVE_LIBS if
# $(ADJUNCT_PROTO) is pointing outside of /usr/lib.
#
-$(NO_ADJUNCT_PROTO)NATIVE_LIBS += libumem.so libc.so
+$(NATIVE_BUILD)NATIVE_LIBS += libumem.so libc.so
$(NATIVE_BUILD)CC = $(NATIVECC)
$(NATIVE_BUILD)LD = $(NATIVELD)
$(NATIVE_BUILD)CFLAGS = $(NATIVE_CFLAGS)
diff --git a/usr/src/cmd/zoneadmd/Makefile.com b/usr/src/cmd/zoneadmd/Makefile.com
index 6312c00ad5..9725021b17 100644
--- a/usr/src/cmd/zoneadmd/Makefile.com
+++ b/usr/src/cmd/zoneadmd/Makefile.com
@@ -20,7 +20,7 @@
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright 2018 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
PROG= zoneadmd
@@ -35,7 +35,7 @@ OBJS= zoneadmd.o zcons.o zfd.o vplat.o log.o
CFLAGS += $(CCVERBOSE)
LDLIBS += -lsocket -lzonecfg -lnsl -ldevinfo -ldevice -lnvpair \
-lgen -lbsm -lcontract -lzfs -luuid -lbrand -ldladm -ltsnet -ltsol \
- -linetutil -lproc -lscf -lppt
+ -linetutil -lscf -lppt
CSTD= $(CSTD_GNU99)
diff --git a/usr/src/lib/brand/jcommon/Makefile b/usr/src/lib/brand/jcommon/Makefile
index d6ca5fb229..59bc0de644 100644
--- a/usr/src/lib/brand/jcommon/Makefile
+++ b/usr/src/lib/brand/jcommon/Makefile
@@ -8,7 +8,7 @@
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
-# Copyright 2019 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
PROGS = cattach cdetach cinstall cuninstall libhooks.ksh \
@@ -23,4 +23,6 @@ clean:
clobber:
$(RM) $(ROOTPROGS)
+all:
+
install: $(ROOTPROGS)
diff --git a/usr/src/lib/brand/lx/librtld_db/Makefile.com b/usr/src/lib/brand/lx/librtld_db/Makefile.com
index 3f2645f157..0237de1cc3 100644
--- a/usr/src/lib/brand/lx/librtld_db/Makefile.com
+++ b/usr/src/lib/brand/lx/librtld_db/Makefile.com
@@ -23,7 +23,7 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# Copyright 2019 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
LIBRARY = lx_librtld_db.a
VERS = .1
@@ -49,7 +49,8 @@ UTSBASE = $(SRC)/uts
# brand plugin library can use to access a target process are the
# proc_service(3PROC) apis.
#
-DYNFLAGS += $(VERSREF) -M../common/mapfile-vers
+MAPFILES = $(BRAND_SHARED)/librtld_db/common/mapfile-vers
+DYNFLAGS += $(VERSREF)
LIBS = $(DYNLIB)
LDLIBS += -lc -lrtld_db
CFLAGS += $(CCVERBOSE)
@@ -65,10 +66,10 @@ ROOTLIBDIR = $(ROOT)/usr/lib/brand/lx
ROOTLIBDIR64 = $(ROOT)/usr/lib/brand/lx/$(MACH64)
#
-# The top level Makefiles define define TEXT_DOMAIN. But librtld_db.so.1
-# isn't internationalized and this library won't be either. The only
-# messages that this library can generate are messages used for debugging
-# the operation of the library itself.
+# The top level Makefiles define TEXT_DOMAIN. But librtld_db.so.1 isn't
+# internationalized and this library won't be either. The only messages that
+# this library can generate are messages used for debugging the operation of the
+# library itself.
#
DTEXTDOM =
@@ -76,8 +77,6 @@ DTEXTDOM =
all: $(LIBS)
-lint: lintcheck
-
pics/%64.o: ../common/%.c
$(COMPILE.c) -D_ELF64 $(PICFLAGS) -o $@ $<
$(POST_PROCESS_O)
diff --git a/usr/src/lib/brand/lx/librtld_db/amd64/Makefile b/usr/src/lib/brand/lx/librtld_db/amd64/Makefile
index 726e7ef6d3..bdef5f5adb 100644
--- a/usr/src/lib/brand/lx/librtld_db/amd64/Makefile
+++ b/usr/src/lib/brand/lx/librtld_db/amd64/Makefile
@@ -23,7 +23,7 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
+# Copyright 2020 Joyent, Inc.
#
COBJS64 = lx_librtld_db64.o
@@ -31,8 +31,6 @@ COBJS64 = lx_librtld_db64.o
include ../Makefile.com
include $(SRC)/lib/Makefile.lib.64
-DYNFLAGS += -Mmapfile-vers
-
CLOBBERFILES = $(ROOTLIBDIR64)/$(DYNLIB)
install: all $(ROOTLIBS64)
diff --git a/usr/src/lib/brand/lx/librtld_db/amd64/mapfile-vers b/usr/src/lib/brand/lx/librtld_db/amd64/mapfile-vers
deleted file mode 100644
index 4893b02998..0000000000
--- a/usr/src/lib/brand/lx/librtld_db/amd64/mapfile-vers
+++ /dev/null
@@ -1,44 +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.
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-# usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-SUNWprivate_1.1 {
- global:
- rtld_db_brand_ops64;
-};
diff --git a/usr/src/lib/brand/lx/librtld_db/common/mapfile-vers b/usr/src/lib/brand/lx/librtld_db/common/mapfile-vers
deleted file mode 100644
index 5e328d6075..0000000000
--- a/usr/src/lib/brand/lx/librtld_db/common/mapfile-vers
+++ /dev/null
@@ -1,58 +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.
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-# usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-{
- global:
- rtld_db_brand_ops32;
- local:
- *;
-};
-
-#Externally defined symbols
-{
- global:
- ps_pauxv = NODIRECT PARENT;
- ps_pdmodel = NODIRECT PARENT;
- ps_pglobal_lookup = NODIRECT PARENT;
- ps_pglobal_sym = NODIRECT PARENT;
- ps_plog = NODIRECT PARENT;
- ps_pread = NODIRECT PARENT;
- ps_pwrite = NODIRECT PARENT;
-};
diff --git a/usr/src/lib/brand/lx/lx_brand/Makefile.com b/usr/src/lib/brand/lx/lx_brand/Makefile.com
index 01fe63d70e..f506fc49fc 100644
--- a/usr/src/lib/brand/lx/lx_brand/Makefile.com
+++ b/usr/src/lib/brand/lx/lx_brand/Makefile.com
@@ -21,7 +21,7 @@
#
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
-# Copyright 2019 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
LX_CMN = $(SRC)/common/brand/lx
@@ -69,14 +69,16 @@ SRCDIR = ../common
UTSBASE = ../../../../../uts
LIBS = $(DYNLIB)
-LDLIBS += -lc -lsocket -lmapmalloc -lproc -lrtld_db -lrpcsvc -lnsl
+LDLIBS += -lmapmalloc -lsocket -lproc -lrtld_db -lrpcsvc -lnsl -lc
DYNFLAGS += $(DYNFLAGS_$(CLASS))
-DYNFLAGS += $(BLOCAL) $(ZNOVERSION) -Wl,-e_start -M../common/mapfile
+DYNFLAGS += $(BLOCAL) $(ZNOVERSION) -Wl,-e_start
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -D_REENTRANT -I. -I../ -I$(UTSBASE)/common/brand/lx -I$(LX_CMN)
ASFLAGS = -P $(ASFLAGS_$(CURTYPE)) -D_ASM -I../ \
-I$(UTSBASE)/common/brand/lx
+ZGUIDANCE = -zguidance=nounused
+
# not linted
SMATCH=off
diff --git a/usr/src/lib/brand/lx/lx_brand/common/mapfile b/usr/src/lib/brand/lx/lx_brand/common/mapfile
deleted file mode 100644
index 0663f4bc19..0000000000
--- a/usr/src/lib/brand/lx/lx_brand/common/mapfile
+++ /dev/null
@@ -1,47 +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.
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING: STOP NOW. DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-# usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-#
-# Scope everything local -- our .init section is our only public interface.
-#
-{
- local:
- *;
-};
diff --git a/usr/src/lib/brand/lx/lx_brand/common/mapfile-vers b/usr/src/lib/brand/lx/lx_brand/common/mapfile-vers
index 0663f4bc19..9d2712a12f 100644
--- a/usr/src/lib/brand/lx/lx_brand/common/mapfile-vers
+++ b/usr/src/lib/brand/lx/lx_brand/common/mapfile-vers
@@ -20,8 +20,9 @@
#
#
-# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
+# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Copyright 2020 Joyent, Inc.
#
#
@@ -38,10 +39,12 @@
# MAPFILE HEADER END
#
+$mapfile_version 2
+
#
# Scope everything local -- our .init section is our only public interface.
#
-{
+SYMBOL_SCOPE {
local:
*;
};
diff --git a/usr/src/lib/fm/libfmd_snmp/Makefile.com b/usr/src/lib/fm/libfmd_snmp/Makefile.com
index 99dd888363..e0abeeef0d 100644
--- a/usr/src/lib/fm/libfmd_snmp/Makefile.com
+++ b/usr/src/lib/fm/libfmd_snmp/Makefile.com
@@ -53,7 +53,7 @@ $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
-SNMPLIBS = -lnetsnmp -lnetsnmpagent
+SNMPLIBS = -lnetsnmp -lnetsnmpagent -lnetsnmphelpers
NATIVE_LIBS += libnetsnmp.so libnetsnmpagent.so
LDLIBS += $(MACH_LDLIBS)
diff --git a/usr/src/lib/libbunyan/Makefile.com b/usr/src/lib/libbunyan/Makefile.com
index 5214915c56..d0d00bf0e5 100644
--- a/usr/src/lib/libbunyan/Makefile.com
+++ b/usr/src/lib/libbunyan/Makefile.com
@@ -10,7 +10,7 @@
#
#
-# Copyright (c) 2014 Joyent, Inc. All rights reserved.
+# Copyright 2020 Joyent, Inc.
#
LIBRARY = libbunyan.a
@@ -21,7 +21,7 @@ USDT_PROVIDERS = bunyan_provider.d
include ../../Makefile.lib
LIBS = $(DYNLIB) $(LINTLIB)
-LDLIBS += -lc -lumem -lnvpair -lnsl
+LDLIBS += -lc -lumem -lnvpair
CPPFLAGS += -I../common -I. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
SRCDIR = ../common
diff --git a/usr/src/lib/libdladm/Makefile.com b/usr/src/lib/libdladm/Makefile.com
index d3d811b265..348061cb54 100644
--- a/usr/src/lib/libdladm/Makefile.com
+++ b/usr/src/lib/libdladm/Makefile.com
@@ -20,7 +20,7 @@
#
#
# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2018, Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
LIBRARY = libdladm.a
@@ -38,7 +38,7 @@ include ../../Makefile.rootfs
LIBS = $(DYNLIB) $(LINTLIB)
LDLIBS += -ldevinfo -lc -linetutil -lsocket -lscf -lrcm -lnvpair \
- -lexacct -lnsl -lkstat -lpool -lvarpd
+ -lexacct -lkstat -lpool -lvarpd
SRCDIR = ../common
$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/libsmartsshd/Makefile.com b/usr/src/lib/libsmartsshd/Makefile.com
index 1c189a88d8..b9c5b88f23 100644
--- a/usr/src/lib/libsmartsshd/Makefile.com
+++ b/usr/src/lib/libsmartsshd/Makefile.com
@@ -18,7 +18,7 @@
#
# CDDL HEADER END
#
-# Copyright 2016 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
LIBRARY= libsmartsshd.a
@@ -33,7 +33,7 @@ SRCS = $(OBJECTS:%.o=$(SRCDIR)/%.c)
CPPFLAGS += -I$(SRCDIR) -D_REENTRANT -D_FILE_OFFSET_BITS=64
LIBS = $(DYNLIB) $(LINTLIB)
-LDLIBS += -lc -ldoor -lmd5
+LDLIBS += -lc -lmd5
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
diff --git a/usr/src/lib/varpd/direct/Makefile.com b/usr/src/lib/varpd/direct/Makefile.com
index 4072c9a0ab..c9baf53cd4 100644
--- a/usr/src/lib/varpd/direct/Makefile.com
+++ b/usr/src/lib/varpd/direct/Makefile.com
@@ -10,7 +10,7 @@
#
#
-# Copyright 2015 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
LIBRARY = libvarpd_direct.a
@@ -21,7 +21,7 @@ include ../../../Makefile.lib
include ../../Makefile.plugin
LIBS = $(DYNLIB)
-LDLIBS += -lc -lumem -lnvpair -lnsl
+LDLIBS += -lc -lumem -lnvpair
CPPFLAGS += -I../common
C99MODE= -xc99=%all
diff --git a/usr/src/lib/varpd/files/Makefile.com b/usr/src/lib/varpd/files/Makefile.com
index cdd4d019a4..dd8009d002 100644
--- a/usr/src/lib/varpd/files/Makefile.com
+++ b/usr/src/lib/varpd/files/Makefile.com
@@ -10,7 +10,7 @@
#
#
-# Copyright 2018 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
LIBRARY = libvarpd_files.a
@@ -22,7 +22,7 @@ include ../../../Makefile.lib
include ../../Makefile.plugin
LIBS = $(DYNLIB)
-LDLIBS += -lc -lumem -lnvpair -lsocket -lnsl -lcustr
+LDLIBS += -lc -lumem -lnvpair -lsocket -lcustr
CPPFLAGS += -I../common
LINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN
diff --git a/usr/src/lib/varpd/svp/Makefile.com b/usr/src/lib/varpd/svp/Makefile.com
index 15b6540e74..d5e6d73144 100644
--- a/usr/src/lib/varpd/svp/Makefile.com
+++ b/usr/src/lib/varpd/svp/Makefile.com
@@ -10,7 +10,7 @@
#
#
-# Copyright 2015 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
LIBRARY = libvarpd_svp.a
@@ -34,7 +34,7 @@ LIBS = $(DYNLIB)
# functions and better to use that then compile list.o yet again
# ourselves... probably.
#
-LDLIBS += -lc -lumem -lnvpair -lsocket -lnsl -lavl \
+LDLIBS += -lc -lumem -lnvpair -lsocket -lavl \
-lcmdutils -lidspace -lbunyan
CPPFLAGS += -I../common
diff --git a/usr/src/test/os-tests/tests/file-locking/Makefile b/usr/src/test/os-tests/tests/file-locking/Makefile
index 64011074c5..cd0562777d 100644
--- a/usr/src/test/os-tests/tests/file-locking/Makefile
+++ b/usr/src/test/os-tests/tests/file-locking/Makefile
@@ -10,7 +10,7 @@
#
#
-# Copyright 2016 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
#
include $(SRC)/cmd/Makefile.cmd
@@ -28,13 +28,6 @@ SRCS = $(PROGS:%=%.c) $(UTILS:%.o=%.c)
PROGS32 = $(PROGS:%=%.32)
PROGS64 = $(PROGS:%=%.64)
-runtests.32 := LDLIBS += -lgen
-runtests.64 := LDLIBS64 += -lgen
-
-LINTS = $(PROGS:%=%.ln)
-LINTFLAGS += -erroff=E_NAME_DEF_NOT_USED2
-LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2
-
ROOTOPTDIR = $(ROOT)/opt/os-tests/tests/file-locking
ROOTOPTPROGS = $(PROGS32:%=$(ROOTOPTDIR)/%) \
$(PROGS64:%=$(ROOTOPTDIR)/%)
@@ -43,7 +36,6 @@ all := TARGET = all
install := TARGET = install
clean := TARGET = clean
clobber := TARGET = clobber
-lint := TARGET = lint
.KEEP_STATE:
@@ -51,8 +43,6 @@ install: $(ROOTOPTPROGS)
all: $(PROGS32) $(PROGS64)
-lint: $(LINTS)
-
clean:
-rm $(PROGS32) $(PROGS64)
@@ -67,9 +57,6 @@ $(ROOTOPTDIR)/%: %
$(ROOTOPTDIR)/%: %.ksh
$(INS.rename)
-%.ln: %.c
- $(LINT.c) $< $(UTILS) $(LDLIBS)
-
%.64.o: %.c
$(COMPILE64.c) $< -o $@
diff --git a/usr/src/tools/cw/Makefile b/usr/src/tools/cw/Makefile
index cc2e65eab0..af5dab8c6e 100644
--- a/usr/src/tools/cw/Makefile
+++ b/usr/src/tools/cw/Makefile
@@ -22,7 +22,7 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# Copyright 2018 Joyent, Inc.
+# Copyright 2020 Joyent, Inc.
PROG = cw
@@ -47,8 +47,7 @@ $(__SUNC)CFLAGS= -xspace -Xa -xildoff -errtags=yes -errwarn=%all \
$(__GNUC)LDLIBS += -Wl,-zassert-deflib=libc.so -lc
$(__GNUC)LDFLAGS= $(MAPFILE.NES:%=-Wl,-M%)
$(__GNUC)ZASSERTDEFLIB = -Wl,-zassert-deflib
-# XXX disable to fix the build
-# $(__GNUC)ZFATALWARNINGS = -Wl,-zfatal-warnings
+$(__GNUC)ZFATALWARNINGS = -Wl,-zfatal-warnings
$(__GNUC)ZGUIDANCE = -Wl,-zguidance
LDFLAGS += -Wl,$(ZDIRECT)
diff --git a/usr/src/tools/smatch/Makefile b/usr/src/tools/smatch/Makefile
index f40f18c2b6..bc92591526 100644
--- a/usr/src/tools/smatch/Makefile
+++ b/usr/src/tools/smatch/Makefile
@@ -45,9 +45,7 @@ CFLAGS += -DSMATCHDATADIR='"$(SMATCHDATADIR)"'
CFLAGS += -DGCC_BASE='"/no/such/dir"'
CFLAGS += -DMULTIARCH_TRIPLET=NULL
-# XXX remove ZFATALWARNINGS to fix the build
-# LDCHECKS = -Wl,$(ZASSERTDEFLIB) -Wl,$(ZGUIDANCE) -Wl,$(ZFATALWARNINGS)
-LDCHECKS = -Wl,$(ZASSERTDEFLIB) -Wl,$(ZGUIDANCE)
+LDCHECKS = -Wl,$(ZASSERTDEFLIB) -Wl,$(ZGUIDANCE) -Wl,$(ZFATALWARNINGS)
LDLIBS += -Wl,$(ZLAZYLOAD) -Wl,$(ZDIRECT) -lsqlite3 -lcrypto -lgcc -lm -lc
LDFLAGS = $(MAPFILE.NES:%=-Wl,-M%)