summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason King <jason.king@joyent.com>2020-10-14 14:35:05 +0000
committerJason King <jason.king@joyent.com>2020-10-14 14:35:05 +0000
commitf73a49a1df8de3160b1a04d8af655f8764143860 (patch)
treeb8edab75e701fc550d11456bfc2759ba2538aa46
parent56f500fd7befb8f09a27bce42ad195bd6b4aa682 (diff)
parent35abe3277cc67d1a650f8fd7ce718b89fbece04d (diff)
downloadillumos-joyent-f73a49a1df8de3160b1a04d8af655f8764143860.tar.gz
[illumos-gate merge]
commit 35abe3277cc67d1a650f8fd7ce718b89fbece04d 13215 qsort_r(3C) manual synopsis was botched commit 85f4cb87104c72587029a6e0f1663332c85ba118 13184 Stop translating ld(1) options through cw(1) commit 0a36db39c3cd88f4799ecd9db875f43d834d0a81 13210 Removing multiple links from aggr leaves last link dangling Conflicts: usr/src/uts/sun4u/opl/unix/Makefile usr/src/lib/krb5/plugins/preauth/pkinit/Makefile.com usr/src/cmd/rcap/rcapstat/Makefile usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile usr/src/cmd/cmd-inet/usr.sbin/Makefile
-rw-r--r--usr/src/Makefile.master67
-rw-r--r--usr/src/cmd/Makefile.cmd12
-rw-r--r--usr/src/cmd/captoinfo/Makefile4
-rw-r--r--usr/src/cmd/cmd-inet/usr.bin/chat/Makefile4
-rw-r--r--usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile4
-rw-r--r--usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile8
-rw-r--r--usr/src/cmd/cmd-inet/usr.sbin/Makefile20
-rw-r--r--usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile4
-rw-r--r--usr/src/cmd/csh/i386/Makefile5
-rw-r--r--usr/src/cmd/csh/sparc/Makefile5
-rw-r--r--usr/src/cmd/dc/Makefile6
-rw-r--r--usr/src/cmd/ed/Makefile15
-rw-r--r--usr/src/cmd/eqn/eqn.d/Makefile9
-rw-r--r--usr/src/cmd/eqn/neqn.d/Makefile7
-rw-r--r--usr/src/cmd/expr/Makefile4
-rw-r--r--usr/src/cmd/fm/fmd/Makefile.fmd32
-rw-r--r--usr/src/cmd/fm/modules/Makefile.plugin28
-rw-r--r--usr/src/cmd/fm/schemes/Makefile.com12
-rw-r--r--usr/src/cmd/fs.d/udfs/fsdb/Makefile14
-rw-r--r--usr/src/cmd/geniconvtbl/Makefile.com4
-rw-r--r--usr/src/cmd/genmsg/Makefile14
-rw-r--r--usr/src/cmd/gss/gssd/Makefile19
-rw-r--r--usr/src/cmd/idmap/idmapd/Makefile15
-rw-r--r--usr/src/cmd/infocmp/Makefile6
-rw-r--r--usr/src/cmd/ipf/tools/Makefile.tools2
-rw-r--r--usr/src/cmd/krb5/kwarn/Makefile10
-rw-r--r--usr/src/cmd/listen/Makefile9
-rw-r--r--usr/src/cmd/lp/cmd/Makefile14
-rw-r--r--usr/src/cmd/lp/cmd/lpadmin/Makefile12
-rw-r--r--usr/src/cmd/mail/Makefile20
-rw-r--r--usr/src/cmd/mailx/Makefile5
-rw-r--r--usr/src/cmd/mdb/Makefile.kmdb.targ53
-rw-r--r--usr/src/cmd/mdb/Makefile.libstandctf20
-rw-r--r--usr/src/cmd/mdb/Makefile.module66
-rw-r--r--usr/src/cmd/nl/Makefile4
-rw-r--r--usr/src/cmd/pools/poolcfg/Makefile9
-rw-r--r--usr/src/cmd/rcap/Makefile.com2
-rw-r--r--usr/src/cmd/rcap/rcapstat/Makefile15
-rw-r--r--usr/src/cmd/rcm_daemon/Makefile.com2
-rw-r--r--usr/src/cmd/saf/Makefile10
-rw-r--r--usr/src/cmd/savecore/Makefile.com19
-rw-r--r--usr/src/cmd/sendmail/src/Makefile4
-rw-r--r--usr/src/cmd/sendmail/util/Makefile11
-rw-r--r--usr/src/cmd/sgs/0@0/Makefile.com6
-rw-r--r--usr/src/cmd/sgs/crle/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/elfdump/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/elfedit/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/elfwrap/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/ld/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/ldd/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/ldprof/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/libcrle/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/moe/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/pvs/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/rtld/Makefile.targ2
-rw-r--r--usr/src/cmd/sh/Makefile6
-rw-r--r--usr/src/cmd/sqlite/Makefile6
-rw-r--r--usr/src/cmd/svc/svccfg/Makefile18
-rw-r--r--usr/src/cmd/tcpd/Makefile18
-rw-r--r--usr/src/cmd/tic/Makefile.common2
-rw-r--r--usr/src/cmd/trapstat/capabilities/Makefile.com2
-rw-r--r--usr/src/cmd/trapstat/capabilities/Makefile.targ6
-rw-r--r--usr/src/cmd/ttymon/Makefile15
-rw-r--r--usr/src/cmd/vi/port/Makefile5
-rw-r--r--usr/src/cmd/ypcmd/Makefile16
-rw-r--r--usr/src/cmd/ypcmd/yppasswd/Makefile6
-rw-r--r--usr/src/cmd/zonecfg/Makefile8
-rw-r--r--usr/src/common/mapfiles/gen/Makefile4
-rw-r--r--usr/src/lib/Makefile.filter.targ2
-rw-r--r--usr/src/lib/Makefile.lib4
-rw-r--r--usr/src/lib/abi/apptrace/Makefile.com2
-rw-r--r--usr/src/lib/brand/shared/librtld_db/Makefile.com2
-rw-r--r--usr/src/lib/brand/sn1/sn1_brand/Makefile.com2
-rw-r--r--usr/src/lib/c_synonyms/Makefile.com6
-rw-r--r--usr/src/lib/c_synonyms/amd64/Makefile2
-rw-r--r--usr/src/lib/c_synonyms/sparcv9/Makefile2
-rw-r--r--usr/src/lib/efcode/extend/sparcv9/Makefile4
-rw-r--r--usr/src/lib/efcode/interpreter/Makefile2
-rw-r--r--usr/src/lib/efcode/packages/sparcv9/Makefile4
-rw-r--r--usr/src/lib/fm/topo/modules/Makefile.plugin4
-rw-r--r--usr/src/lib/gss_mechs/mech_krb5/Makefile.com2
-rw-r--r--usr/src/lib/iconv_modules/Makefile.iconv2
-rw-r--r--usr/src/lib/iconv_modules/euro/utils/Makefile.com2
-rw-r--r--usr/src/lib/krb5/plugins/preauth/pkinit/Makefile.com3
-rw-r--r--usr/src/lib/libc/amd64/Makefile2
-rw-r--r--usr/src/lib/libc/capabilities/Makefile.com2
-rw-r--r--usr/src/lib/libc/capabilities/Makefile.targ2
-rw-r--r--usr/src/lib/libc/i386/Makefile.com2
-rw-r--r--usr/src/lib/libc/i386_hwcap1/Makefile6
-rw-r--r--usr/src/lib/libc/i386_hwcap3/Makefile6
-rw-r--r--usr/src/lib/libc/sparc/Makefile.com2
-rw-r--r--usr/src/lib/libc/sparcv9/Makefile.com2
-rw-r--r--usr/src/lib/libc_db/amd64/Makefile2
-rw-r--r--usr/src/lib/libc_db/i386/Makefile2
-rw-r--r--usr/src/lib/libc_db/sparc/Makefile2
-rw-r--r--usr/src/lib/libc_db/sparcv9/Makefile2
-rw-r--r--usr/src/lib/libdtrace/Makefile.com4
-rw-r--r--usr/src/lib/libfru/i386/Makefile2
-rw-r--r--usr/src/lib/libfru/sparc/Makefile6
-rw-r--r--usr/src/lib/libm1/Makefile.com2
-rw-r--r--usr/src/lib/libmd/amd64/Makefile2
-rw-r--r--usr/src/lib/libmd/capabilities/Makefile.com2
-rw-r--r--usr/src/lib/libmd/capabilities/Makefile.targ2
-rw-r--r--usr/src/lib/libmp/i386/Makefile4
-rw-r--r--usr/src/lib/libmp/sparc/Makefile4
-rw-r--r--usr/src/lib/libumem/Makefile.com4
-rw-r--r--usr/src/lib/mpapi/libmpapi/Makefile.com4
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/capabilities/Makefile.com2
-rw-r--r--usr/src/lib/pkcs11/libsoftcrypto/capabilities/Makefile.targ2
-rw-r--r--usr/src/lib/print/libpapi-lpd/Makefile.com2
-rw-r--r--usr/src/lib/scsi/plugins/scsi/engines/Makefile.engine6
-rw-r--r--usr/src/lib/scsi/plugins/ses/Makefile.lib6
-rw-r--r--usr/src/lib/scsi/plugins/smp/Makefile.lib6
-rw-r--r--usr/src/man/man3c/qsort.3c5
-rw-r--r--usr/src/psm/stand/boot/sparcv9/sun4/Makefile22
-rw-r--r--usr/src/psm/stand/bootlst/common/Makefile.com38
-rw-r--r--usr/src/psm/stand/cpr/common/Makefile.com45
-rw-r--r--usr/src/tools/Makefile.tools9
-rw-r--r--usr/src/tools/cw/cw.c57
-rw-r--r--usr/src/ucbcmd/Makefile.ucbcmd2
-rw-r--r--usr/src/ucbcmd/chown/Makefile2
-rw-r--r--usr/src/ucbcmd/expr/Makefile2
-rw-r--r--usr/src/ucblib/libcurses/amd64/Makefile2
-rw-r--r--usr/src/ucblib/libcurses/sparc/Makefile2
-rw-r--r--usr/src/ucblib/libcurses/sparcv9/Makefile2
-rw-r--r--usr/src/ucblib/libdbm/amd64/Makefile2
-rw-r--r--usr/src/ucblib/libdbm/sparc/Makefile2
-rw-r--r--usr/src/ucblib/libdbm/sparcv9/Makefile2
-rw-r--r--usr/src/ucblib/librpcsoc/amd64/Makefile2
-rw-r--r--usr/src/ucblib/librpcsoc/sparc/Makefile2
-rw-r--r--usr/src/ucblib/librpcsoc/sparcv9/Makefile2
-rw-r--r--usr/src/ucblib/libtermcap/amd64/Makefile2
-rw-r--r--usr/src/ucblib/libtermcap/sparc/Makefile2
-rw-r--r--usr/src/ucblib/libtermcap/sparcv9/Makefile2
-rw-r--r--usr/src/ucblib/libucb/amd64/Makefile2
-rw-r--r--usr/src/ucblib/libucb/sparcv9/Makefile2
-rw-r--r--usr/src/uts/common/Makefile.rules2
-rw-r--r--usr/src/uts/common/io/aggr/aggr_grp.c8
-rw-r--r--usr/src/uts/intel/llc1/Makefile4
-rw-r--r--usr/src/uts/intel/sda/Makefile2
-rw-r--r--usr/src/uts/sun4u/opl/platmod/Makefile5
-rw-r--r--usr/src/uts/sun4u/opl/unix/Makefile8
-rw-r--r--usr/src/uts/sun4u/schumacher/platmod/Makefile6
143 files changed, 314 insertions, 813 deletions
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master
index 1084f91da5..b58eee10d5 100644
--- a/usr/src/Makefile.master
+++ b/usr/src/Makefile.master
@@ -986,39 +986,40 @@ LINT64= $(NATIVELINT64)
# Pass -Y flag to cpp (method of which is release-dependent)
CCYFLAG= -Y I,
-BDIRECT= -Bdirect
-BDYNAMIC= -Bdynamic
-BLOCAL= -Blocal
-BNODIRECT= -Bnodirect
-BREDUCE= -Breduce
-BSTATIC= -Bstatic
-
-ZDEFS= -zdefs
-ZDIRECT= -zdirect
-ZIGNORE= -zignore
-ZINITFIRST= -zinitfirst
-ZINTERPOSE= -zinterpose
-ZLAZYLOAD= -zlazyload
-ZLOADFLTR= -zloadfltr
-ZMULDEFS= -zmuldefs
-ZNODEFAULTLIB= -znodefaultlib
-ZNODEFS= -znodefs
-ZNODELETE= -znodelete
-ZNODLOPEN= -znodlopen
-ZNODUMP= -znodump
-ZNOLAZYLOAD= -znolazyload
-ZNOLDYNSYM= -znoldynsym
-ZNORELOC= -znoreloc
-ZNOVERSION= -znoversion
-ZRECORD= -zrecord
-ZREDLOCSYM= -zredlocsym
-ZTEXT= -ztext
-ZVERBOSE= -zverbose
-ZASSERTDEFLIB= -zassert-deflib
-ZGUIDANCE= -zguidance
-ZFATALWARNINGS= -zfatal-warnings
-
-GSHARED= -G
+BDIRECT= -Wl,-Bdirect
+BDYNAMIC= -Wl,-Bdynamic
+BLOCAL= -Wl,-Blocal
+BNODIRECT= -Wl,-Bnodirect
+BREDUCE= -Wl,-Breduce
+BSTATIC= -Wl,-Bstatic
+BSYMBOLIC= -Wl,-Bsymbolic
+
+ZDEFS= -Wl,-zdefs
+ZDIRECT= -Wl,-zdirect
+ZIGNORE= -Wl,-zignore
+ZINITFIRST= -Wl,-zinitfirst
+ZINTERPOSE= -Wl,-zinterpose
+ZLAZYLOAD= -Wl,-zlazyload
+ZLOADFLTR= -Wl,-zloadfltr
+ZMULDEFS= -Wl,-zmuldefs
+ZNODEFAULTLIB= -Wl,-znodefaultlib
+ZNODEFS= -Wl,-znodefs
+ZNODELETE= -Wl,-znodelete
+ZNODLOPEN= -Wl,-znodlopen
+ZNODUMP= -Wl,-znodump
+ZNOLAZYLOAD= -Wl,-znolazyload
+ZNOLDYNSYM= -Wl,-znoldynsym
+ZNORELOC= -Wl,-znoreloc
+ZNOVERSION= -Wl,-znoversion
+ZRECORD= -Wl,-zrecord
+ZREDLOCSYM= -Wl,-zredlocsym
+ZTEXT= -Wl,-ztext
+ZVERBOSE= -Wl,-zverbose
+ZASSERTDEFLIB= -Wl,-zassert-deflib
+ZGUIDANCE= -Wl,-zguidance
+ZFATALWARNINGS= -Wl,-zfatal-warnings
+
+GSHARED= -shared
CCMT= -mt
# Handle different PIC models on different ISAs
diff --git a/usr/src/cmd/Makefile.cmd b/usr/src/cmd/Makefile.cmd
index 14102c6008..b16a7532b2 100644
--- a/usr/src/cmd/Makefile.cmd
+++ b/usr/src/cmd/Makefile.cmd
@@ -119,14 +119,10 @@ LDLIBS = $(LDLIBS.cmd)
LDFLAGS.cmd = \
$(BDIRECT) $(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) \
- $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
+ $(MAPFILE.NES:%=-Wl,-M%) $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%)
LDFLAGS = $(LDFLAGS.cmd)
-LINTFLAGS= -axsm
-LINTFLAGS64= -axsm -m64
-LINTOUT= lint.out
-
KRB5PROG= $(PROG:%=$(KRB5BIN)/%)
KRB5SBINPROG= $(PROG:%=$(KRB5SBIN)/%)
KRB5LIBPROG= $(PROG:%=$(KRB5LIB)/%)
@@ -162,7 +158,7 @@ ROOTUSRSBINPROG32= $(PROG:%=$(ROOTUSRSBIN32)/%)
ROOTUSRSBINPROG64= $(PROG:%=$(ROOTUSRSBIN64)/%)
# Symlink rules for /usr/ccs/bin commands. Note, those commands under
-# the rule of the linker area, are controlled by a different set of
+# the rule of the linker area, are controlled by a different set of
# rules defined in $(SRC)/cmd/sgs/Makefile.var.
INS.ccsbinlink= \
@@ -264,7 +260,7 @@ CHKMANIFEST= $(MANIFEST:%.xml=%.xmlchk)
ROOTSVCMETHOD= $(SVCMETHOD:%=$(ROOTLIBSVCMETHOD)/%)
ROOTSVCBINDIR= $(ROOTLIBSVCBIN)/__nonexistent_directory__
-ROOTSVCBIN= $(SVCBIN:%=$(ROOTSVCBINDIR)/%)
+ROOTSVCBIN= $(SVCBIN:%=$(ROOTSVCBINDIR)/%)
#
@@ -482,7 +478,7 @@ $(ROOTVARSMB)/%: %
$(POST_PROCESS)
# Define the majority text domain in this directory.
-TEXT_DOMAIN= SUNW_OST_OSCMD
+TEXT_DOMAIN= SUNW_OST_OSCMD
CLOBBERFILES += $(XPG4) $(XPG6) $(DCFILE)
diff --git a/usr/src/cmd/captoinfo/Makefile b/usr/src/cmd/captoinfo/Makefile
index 3318414d11..f689aa11bb 100644
--- a/usr/src/cmd/captoinfo/Makefile
+++ b/usr/src/cmd/captoinfo/Makefile
@@ -32,7 +32,7 @@ SRCS= $(OBJS:%.o=%.c)
include ../Makefile.cmd
-LDFLAGS += $(MAPFILE.INT:%=-M%)
+LDFLAGS += $(MAPFILE.INT:%=-Wl,-M%)
LDLIBS += -lcurses
CPPFLAGS += -I../../lib/libcurses/screen
CERRWARN += -_gcc=-Wno-parentheses
@@ -53,6 +53,4 @@ install: all $(ROOTPROG)
clean:
$(RM) $(OBJS)
-lint: lint_SRCS
-
include ../Makefile.targ
diff --git a/usr/src/cmd/cmd-inet/usr.bin/chat/Makefile b/usr/src/cmd/cmd-inet/usr.bin/chat/Makefile
index f0e4c3e0c9..a7d3914960 100644
--- a/usr/src/cmd/cmd-inet/usr.bin/chat/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.bin/chat/Makefile
@@ -11,7 +11,7 @@ SRCS= $(OBJS:%.o=%.c)
include ../../../Makefile.cmd
CPPFLAGS += -DSOL2
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
CERRWARN += -_gcc=-Wno-unused-value
CERRWARN += -_gcc=-Wno-trigraphs
@@ -27,6 +27,4 @@ install: all $(ROOTPROG)
clean:
$(RM) $(OBJS)
-lint:
-
include ../../../Makefile.targ
diff --git a/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile b/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile
index 67a3656e18..da43174833 100644
--- a/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.bin/ftp/Makefile
@@ -52,7 +52,7 @@ LDLIBS += -lsocket -lnsl -lgss
# ftp defines its own delete and glob - localize all symbols to prevent a
# name clash.
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
.KEEP_STATE:
@@ -67,6 +67,4 @@ install: all $(ROOTPROG) $(ROOTETCDEFAULTFILES)
clean:
$(RM) $(OBJS)
-lint: lint_SRCS
-
include ../../../Makefile.targ
diff --git a/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile b/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile
index 298c1b5793..1a9d5ceb33 100644
--- a/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile
@@ -36,7 +36,7 @@ include ../../Makefile.cmd-inet
CPPFLAGS += -DSYSV -DSTRNET -DBSD_COMP
LDLIBS += -lsocket -lnsl
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
include $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
LDFLAGS += $(KRUNPATH) -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL)
@@ -79,10 +79,4 @@ $(ROOTSYMLINK):
clean:
$(RM) $(OBJS) $(KCMDOBJS) $(YOBJS)
-lint:
- $(YACC.y) $(YSRCS)
- $(LINT.c) $(SRCS) y.tab.c $(LDLIBS)
- $(RM) y.tab.c
-
-
include ../../../Makefile.targ
diff --git a/usr/src/cmd/cmd-inet/usr.sbin/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/Makefile
index 98971bf5b0..3a4b211670 100644
--- a/usr/src/cmd/cmd-inet/usr.sbin/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.sbin/Makefile
@@ -71,20 +71,12 @@ MSGSUBDIRS= ifconfig ilbadm in.routed in.talkd \
inetadm inetconv ipadm ipmpstat ipqosconf ipsecutils \
kssl/ksslcfg nwamadm nwamcfg routeadm sppptun snoop wificonfig
-# As programs get lint-clean, add them here and to the 'lint' target.
-# Eventually this hack should go away, and all in PROG should be
-# lint-clean.
+# This controls the degree of compiler warnings emitted, and is named for
+# 'lint' for historical reasons. Eventually this hack should go away, and all
+# in PROG should be clean.
LINTCLEAN= 6to4relay arp in.rlogind in.rshd in.telnetd in.tftpd \
ipaddrsel ndp route \
in.rarpd if_mpadm $(SYNCPROG)
-# Likewise, as subdirs get lint-clean, add them here. Once
-# they're all clean, replace the dependency of the lint target
-# with SUBDIRS. Also (sigh) deal with the commented-out build lines
-# for the lint rule.
-LINTSUBDIRS= ilbadm in.rdisc in.routed in.talkd inetadm \
- inetconv ipmpstat ipqosconf ipsecutils kssl/kssladm \
- kssl/ksslcfg nwamadm nwamcfg ping routeadm sppptun traceroute \
- wificonfig
# And as programs are verified not to attempt to write into constants,
# -xstrconst should be used to ensure they stay that way.
CONSTCLEAN=
@@ -124,7 +116,6 @@ all:= TARGET= all
install:= TARGET= install
clean:= TARGET= clean
clobber:= TARGET= clobber
-lint:= TARGET= lint
_msg:= TARGET= _msg
CLOBBERFILES += $(ROOTFS_PROG) $(PROG)
@@ -165,7 +156,7 @@ if_mpadm.po := XGETFLAGS += -a
route := CPPFLAGS += -DNDEBUG
ndd := LDLIBS += -ldladm -lipadm
$(RELEASE_BUILD)ndd := CERRWARN += -_gcc=-Wno-unused
-in.comsat := LDFLAGS += $(MAPFILE.NGB:%=-M%)
+in.comsat := LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
route := LDLIBS += -lzonecfg -lcontract
.KEEP_STATE:
@@ -243,6 +234,7 @@ clean_local:
clobber: $(SUBDIRS) clobber_local
clobber_local: clean_local
$(RM) $(CLOBBERFILES)
+<<<<<<< HEAD
lint: $(LINTSUBDIRS)
$(LINT.c) 6to4relay.c $(LDLIBS) -lsocket -ldladm
@@ -279,3 +271,5 @@ lint: $(LINTSUBDIRS)
-lsocket -lnsl
$(LINT.c) in.tftpd.c ../usr.bin/tftp/tftpsubs.c $(LDLIBS) \
-lsocket -lnsl
+=======
+>>>>>>> 35abe3277cc67d1a650f8fd7ce718b89fbece04d
diff --git a/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile
index 4e3dd8259a..4839757233 100644
--- a/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile
+++ b/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile
@@ -52,7 +52,7 @@ include ../../../Makefile.ctf
CPPFLAGS += -I. -I$(SRC)/common/net/dhcp \
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
LDLIBS += -ldhcputil -ldlpi -lsocket -lnsl -ltsol -luuid
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
CERRWARN += -_gcc=-Wno-switch
CERRWARN += -_gcc=-Wno-implicit-function-declaration
CERRWARN += $(CNOWARN_UNINIT)
@@ -81,6 +81,4 @@ install: all $(ROOTUSRSBINPROG)
clean:
$(RM) $(OBJS)
-lint: lint_SRCS
-
include ../../../Makefile.targ
diff --git a/usr/src/cmd/csh/i386/Makefile b/usr/src/cmd/csh/i386/Makefile
index 581e79cbf3..f28a908376 100644
--- a/usr/src/cmd/csh/i386/Makefile
+++ b/usr/src/cmd/csh/i386/Makefile
@@ -39,7 +39,7 @@ CERRWARN += -_gcc=-Wno-extra
SMATCH=off
MAPFILES = ../mapfile-intf $(MAPFILE.NGB)
-LDFLAGS += $(MAPFILES:%=-M%)
+LDFLAGS += $(MAPFILES:%=-Wl,-M%)
HDDEP = sh.o sh.dir.o sh.dol.o sh.err.o sh.exec.o sh.exp.o sh.file.o \
sh.func.o sh.glob.o sh.hist.o sh.init.o sh.lex.o sh.misc.o \
@@ -78,9 +78,6 @@ $(HDDEP): ../sh.tconst.h
install: all $(ROOTBINPROG) $(ROOTPROG)
-lint: ../sh.tconst.h
- $(LINT.c) $(COMMONSRCS) signal.c $(LDLIBS)
-
clean:
$(RM) $(LOCALOBJS) $(COMMONOBJS)
diff --git a/usr/src/cmd/csh/sparc/Makefile b/usr/src/cmd/csh/sparc/Makefile
index 7f1262b278..9b3c08b2e7 100644
--- a/usr/src/cmd/csh/sparc/Makefile
+++ b/usr/src/cmd/csh/sparc/Makefile
@@ -35,7 +35,7 @@ CERRWARN += -_gcc=-Wno-extra
LDLIBS += -lcurses
MAPFILES = ../mapfile-intf $(MAPFILE.NGB)
-LDFLAGS += $(MAPFILES:%=-M%)
+LDFLAGS += $(MAPFILES:%=-Wl,-M%)
PFOBJS = sh_policy.o
@@ -76,9 +76,6 @@ $(HDDEP): ../sh.tconst.h
install: all $(ROOTBINPROG) $(ROOTPROG)
-lint: ../sh.tconst.h
- $(LINT.c) $(COMMONSRCS) signal.c $(LDLIBS)
-
clean:
$(RM) $(LOCALOBJS) $(COMMONOBJS)
diff --git a/usr/src/cmd/dc/Makefile b/usr/src/cmd/dc/Makefile
index 27f3520005..deffa52b86 100644
--- a/usr/src/cmd/dc/Makefile
+++ b/usr/src/cmd/dc/Makefile
@@ -28,11 +28,11 @@ PROG= dc
XPG6PROG= dc
XD= exobjs.xpg6
EXOBJS= dc.o
-XPG6EXOBJS= exobjs.xpg6/dc.o
+XPG6EXOBJS= exobjs.xpg6/dc.o
include ../Makefile.cmd
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
CERRWARN += -_gcc=-Wno-implicit-function-declaration
CERRWARN += -_gcc=-Wno-unused-value
CERRWARN += -_gcc=-Wno-parentheses
@@ -60,8 +60,6 @@ install: all $(ROOTPROG) $(ROOTXPG6PROG)
clean:
-@rm -rf $(EXOBJS) $(XD) $(PROG) $(XPG6)
-lint: lint_PROG
-
$(XPG6EXOBJS): $(XD)
$(XD)/%.o: %.c
diff --git a/usr/src/cmd/ed/Makefile b/usr/src/cmd/ed/Makefile
index d4066cab10..9506f540ce 100644
--- a/usr/src/cmd/ed/Makefile
+++ b/usr/src/cmd/ed/Makefile
@@ -32,7 +32,7 @@ EDOBJ= ed.o compile.o
XPG4EDOBJ= edobjs.xpg4/ed.o edobjs.xpg4/compile.o values-xpg4.o
XPG6EDOBJ= edobjs.xpg6/ed.o edobjs.xpg6/compile.o values-xpg6.o
OBJS= $(EDOBJ) $(XPG4EDOBJ) $(XPG6EDOBJ)
-SRCS= ./ed.c ../expr/compile.c
+SRCS= ./ed.c ../expr/compile.c
POFILES= $(EDOBJ:%.o=%.po)
@@ -47,14 +47,13 @@ CERRWARN += $(CNOWARN_UNINIT)
# not linted
SMATCH=off
-$(XPG4) := CFLAGS += -DXPG4
-$(XPG6) := CFLAGS += -DXPG6 -I$(SRC)/lib/libc/inc
-lint := LDLIBS += -lgen -lcrypt
+$(XPG4) := CFLAGS += -DXPG4
+$(XPG6) := CFLAGS += -DXPG6 -I$(SRC)/lib/libc/inc
LDLIBS += -lmapmalloc -lgen -lcrypt_i
XGETFLAGS += -a -x ed.xcl
MAPFILE.INT = ../expr/mapfile-intf
-LDFLAGS += $(MAPFILE.INT:%=-M%)
+LDFLAGS += $(MAPFILE.INT:%=-Wl,-M%)
POFILE= ed_cmd.po
@@ -71,7 +70,7 @@ $(PROG): $(EDOBJ) $(MAPFILE.INT)
$(LINK.c) $(EDOBJ) -o $@ $(LDLIBS)
$(POST_PROCESS)
-$(XPG4): edobjs.xpg4 $(XPG4EDOBJ) $(MAPFILE.INT)
+$(XPG4): edobjs.xpg4 $(XPG4EDOBJ) $(MAPFILE.INT)
$(LINK.c) $(XPG4EDOBJ) -o $@ $(LDLIBS)
$(POST_PROCESS)
@@ -79,7 +78,7 @@ $(XPG6): edobjs.xpg6 $(XPG6EDOBJ) $(MAPFILE.INT)
$(LINK.c) $(XPG6EDOBJ) -o $@ $(LDLIBS)
$(POST_PROCESS)
-compile.o: ../expr/compile.c
+compile.o: ../expr/compile.c
$(COMPILE.c) -o $@ ../expr/compile.c
edobjs.xpg4/%.o: %.c
@@ -118,6 +117,4 @@ clean:
-@rm -rf $(OBJS) $(XPG4) $(XPG6) edobjs.xpg4 edobjs.xpg6 \
compile.c.i
-lint: lint_PROG
-
include ../Makefile.targ
diff --git a/usr/src/cmd/eqn/eqn.d/Makefile b/usr/src/cmd/eqn/eqn.d/Makefile
index 6c46021db2..0b7f715ad8 100644
--- a/usr/src/cmd/eqn/eqn.d/Makefile
+++ b/usr/src/cmd/eqn/eqn.d/Makefile
@@ -31,7 +31,7 @@ CLEANFILES = y.tab.c y.tab.h $(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def)
YFLAGS = -d
CPPFLAGS = -I. -I.. $(CPPFLAGS.master)
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
CERRWARN += -_gcc=-Wno-implicit-function-declaration
CERRWARN += -_gcc=-Wno-unused-label
@@ -42,7 +42,7 @@ SMATCH=off
.KEEP_STATE:
-all : $(PROG)
+all : $(PROG)
catalog: $(POFILE)
@@ -67,9 +67,4 @@ install : all $(ROOTPROG)
clean:
$(RM) $(OBJS) $(CLEANFILES)
-lint: lint_SRCS
-
-strip :
- $(STRIP) $(PROG)
-
include ../../Makefile.targ
diff --git a/usr/src/cmd/eqn/neqn.d/Makefile b/usr/src/cmd/eqn/neqn.d/Makefile
index d4993d648d..40283a1504 100644
--- a/usr/src/cmd/eqn/neqn.d/Makefile
+++ b/usr/src/cmd/eqn/neqn.d/Makefile
@@ -25,7 +25,7 @@ CLEANFILES = y.tab.c y.tab.h $(YACCSRC:%.y=%.c) $(YACCSRC:%.y=%.def)
YFLAGS = -d
CPPFLAGS = -DNEQN -I. -I.. $(CPPFLAGS.master)
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
CERRWARN += -_gcc=-Wno-implicit-function-declaration
CERRWARN += $(CNOWARN_UNINIT)
@@ -68,9 +68,4 @@ install : all $(ROOTPROG)
clean:
$(RM) $(OBJS) $(CLEANFILES)
-lint: lint_SRCS
-
-strip :
- $(STRIP) $(PROG)
-
include ../../Makefile.targ
diff --git a/usr/src/cmd/expr/Makefile b/usr/src/cmd/expr/Makefile
index fe0b846109..565c0e1d38 100644
--- a/usr/src/cmd/expr/Makefile
+++ b/usr/src/cmd/expr/Makefile
@@ -49,7 +49,7 @@ XGETFLAGS += -a -x expr.xcl
LDLIBS += -lgen
MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
-LDFLAGS += $(MAPFILES:%=-M%)
+LDFLAGS += $(MAPFILES:%=-Wl,-M%)
.KEEP_STATE:
@@ -90,6 +90,4 @@ exprobjs.xpg6:
clean:
$(RM) $(OBJS)
-lint: lint_PROG
-
include ../Makefile.targ
diff --git a/usr/src/cmd/fm/fmd/Makefile.fmd b/usr/src/cmd/fm/fmd/Makefile.fmd
index a95c802d0c..1961fee466 100644
--- a/usr/src/cmd/fm/fmd/Makefile.fmd
+++ b/usr/src/cmd/fm/fmd/Makefile.fmd
@@ -92,7 +92,6 @@ ROOTMANIFESTDIR = $(ROOTSVCSYSTEM)
ROOTMANIFEST = $(ROOTMANIFESTDIR)/$(PROG).xml
OBJS = $(SRCS:%.c=%.o)
-LINTFILES = $(SRCS:%.c=%.ln)
CLEANFILES += ../common/fmd_rpc_api.h ../common/fmd_rpc_adm.h
CLEANFILES += fmd_svc_adm.c fmd_svc_api.c fmd_xdr_adm.c fmd_xdr_api.c
@@ -102,7 +101,6 @@ DMOD = fmd.so
ROOTDMOD = $(ROOT)/usr/lib/mdb/proc/$(DMOD)
DMOD_SRCS = fmd_mdb.c
DMOD_OBJS = $(DMOD_SRCS:%.c=%.o)
-DMOD_LINT = $(DMOD_SRCS:%.c=%.ln)
HDRS = fmd_api.h fmd_fmri.h
ROOTCDIR = $(ROOT)/etc/fm/$(PROG)
@@ -117,7 +115,6 @@ $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
CPPFLAGS += -I. -I../common
CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST)
-LINTFLAGS += -mu
CERRWARN += -_gcc=-Wno-switch
CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += $(CNOWARN_UNINIT)
@@ -132,25 +129,18 @@ $(PROG) := LDFLAGS += -R/usr/lib/fm
$(PROG) := LDLIBS += -L$(ROOTLIB)/fm -ltopo -ldiagcode -lsysevent -lsmbios \
-luuid -lnvpair -lexacct -lnsl -lumem -ldevinfo -lfmd_msg
-$(DMOD) := CFLAGS += $(CC_PICFLAGS) -G $(XREGSFLAG)
-$(DMOD) := LDFLAGS += $(ZTEXT) $(ZDEFS) $(MAPFILE-DMOD:%=-M%)
+$(DMOD) := CFLAGS += $(CC_PICFLAGS) $(GSHARED) $(XREGSFLAG)
+$(DMOD) := LDFLAGS += $(ZTEXT) $(ZDEFS) $(MAPFILE-DMOD:%=-Wl,-M%)
#
# rpcgen(1) produces code that wants to be in the foreground if we're compiled
# DEBUG, which isn't appropriate for our daemon. Forcibly undefine this code.
-# It also produces various lint warnings; turn these off for these files only.
-# Unfortunately we also have to turn off IGNOR2 for pass2 lint as well.
#
fmd_svc_adm.o fmd_svc_api.o := CPPFLAGS += -UDEBUG -URPC_SVC_FG
fmd_xdr_adm.o fmd_xdr_api.o := CPPFLAGS += -UDEBUG -URPC_SVC_FG
-fmd_svc_adm.ln fmd_svc_api.ln fmd_xdr_adm.ln fmd_xdr_api.ln := LINTFLAGS += \
- -xerroff=E_FUNC_ARG_UNUSED -xerroff=E_FUNC_VAR_UNUSED -xerroff=E_STATIC_UNUSED
-
-lint_prog := LINTFLAGS += -xerroff=E_FUNC_RET_ALWAYS_IGNOR2
-
.NO_PARALLEL:
-.PARALLEL: $(OBJS) $(LINTFILES)
+.PARALLEL: $(OBJS)
all: $(PROG) $(DMOD) install_h
@@ -194,26 +184,12 @@ fmd_xdr_%.c: ../common/fmd_rpc_%.x
$(RPCGEN) -CMN -c -o $@ $<
clean:
- $(RM) $(OBJS) $(DMOD_OBJS) $(LINTFILES) $(DMOD_LINT)
+ $(RM) $(OBJS) $(DMOD_OBJS)
$(RM) $(CLEANFILES)
clobber: clean
$(RM) $(PROG) $(DMOD)
-%.ln: ../common/%.c
- $(LINT.c) -c $<
-
-%.ln: %.c
- $(LINT.c) -c $<
-
-lint_prog: $(LINTFILES)
- $(LINT) $(LINTFLAGS) $(LINTFILES) $(LDLIBS)
-
-lint_dmod: $(DMOD_LINT)
- $(LINT) $(LINTFLAGS) $(DMOD_LINT) $(LDLIBS)
-
-lint: lint_prog lint_dmod
-
$(ROOT)/etc/fm:
$(INS.dir)
diff --git a/usr/src/cmd/fm/modules/Makefile.plugin b/usr/src/cmd/fm/modules/Makefile.plugin
index c944c922b9..ab20347dc6 100644
--- a/usr/src/cmd/fm/modules/Makefile.plugin
+++ b/usr/src/cmd/fm/modules/Makefile.plugin
@@ -68,17 +68,11 @@ arch_ROOTCONF = $(ROOT)/usr/platform/$(ARCH)/lib/fm/fmd/plugins/$(CONF)
plat_ROOTCONF = $(PLATFORMS:%=$(ROOT)/usr/platform/%/lib/fm/fmd/plugins/$(CONF))
ROOTCONF = $($(CLASS)_ROOTCONF)
-LINTFLAGS += -mu
-LINTFILES = $(SRCS:%.c=%.ln)
-
-DMODLINTTGT = $(DMOD:%=lint_dmod)
-DMODLINTFILES = $(DMOD_SRCS:%.c=%.ln)
-
APIMAP = $(SRC)/cmd/fm/fmd/common/fmd_api.map
FMRIMAP = $(SRC)/cmd/fm/fmd/common/fmd_fmri.map
CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
-CFLAGS += -G $(XREGSFLAG)
+CFLAGS += $(GSHARED) $(XREGSFLAG)
CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
LDFLAGS += $(ZDEFS) $(ZTEXT) $(ZIGNORE)
@@ -86,13 +80,13 @@ LDFLAGS += $(ZDEFS) $(ZTEXT) $(ZIGNORE)
MAPFILE-DMOD = $(SRC)/cmd/mdb/common/modules/conf/mapfile-extern
-$(PROG) := LDFLAGS += -M$(APIMAP) -M$(FMRIMAP)
+$(PROG) := LDFLAGS += -Wl,-M$(APIMAP) -Wl,-M$(FMRIMAP)
$(PROG) := LDLIBS += -lnvpair -lc
all: $(PROG) $(DMODPROG)
.NO_PARALLEL:
-.PARALLEL: $(OBJS) $(LINTFILES) $(DMOD_OBJS) $(DMODLINTFILES)
+.PARALLEL: $(OBJS) $(DMOD_OBJS)
$(PROG): $(OBJS) $(APIMAP)
$(LINK.c) $(LINKOBJS) -o $@ $(LDLIBS)
@@ -101,7 +95,7 @@ $(PROG): $(OBJS) $(APIMAP)
$(DMODPROG): $(DMOD_OBJS) $(MAPFILE-DMOD)
-@mkdir -p $(@D)
- $(LINK.c) $(DMOD_OBJS) $(MAPFILE-DMOD:%=-M%) -o $@ $(LDLIBS) -lc
+ $(LINK.c) $(DMOD_OBJS) $(MAPFILE-DMOD:%=-Wl,-M%) -o $@ $(LDLIBS) -lc
$(POST_PROCESS)
%.o: %.c
@@ -109,23 +103,11 @@ $(DMODPROG): $(DMOD_OBJS) $(MAPFILE-DMOD)
$(CTFCONVERT) $(CTFCVTFLAGS) $(@F)
clean:
- $(RM) $(OBJS) $(DMOD_OBJS) $(LINTFILES) $(DMODLINTFILES) $(CLEANFILES) \
- $(LINKOBJS)
+ $(RM) $(OBJS) $(DMOD_OBJS) $(CLEANFILES) $(LINKOBJS)
clobber: clean
$(RM) $(PROG) $(DMODPROG)
-%.ln: %.c
- $(LINT.c) -dirout=$(@D) -c $<
-
-lint_prog: $(LINTFILES)
- $(LINT) $(LINTFLAGS) $(LINTFILES) $(LDLIBS)
-
-lint_dmod: $(DMODLINTFILES)
- $(LINT) $(LINTFLAGS) $(DMODLINTFILES) $(LDLIBS)
-
-lint: lint_prog $(DMODLINTTGT)
-
install_h:
$(ROOTPROG): $$(@D) $(PROG)
diff --git a/usr/src/cmd/fm/schemes/Makefile.com b/usr/src/cmd/fm/schemes/Makefile.com
index f2fac6b59e..83150b7ffb 100644
--- a/usr/src/cmd/fm/schemes/Makefile.com
+++ b/usr/src/cmd/fm/schemes/Makefile.com
@@ -23,8 +23,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
.KEEP_STATE:
.SUFFIXES:
@@ -45,14 +43,10 @@ ROOTPROG = $(ROOT)/usr/lib/fm/fmd/schemes/$(PROG)
ROOTPROG64 = $(ROOT)/usr/lib/fm/fmd/schemes/$(MACH64)/$(PROG)
MAPFILE = ../../../fmd/common/fmd_fmri.map
-LINTFLAGS += -u
-LINTFLAGS64 += -u
-LINTFILES = $(SRCS:%.c=%.ln)
-
CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
-CFLAGS += -G $(XREGSFLAG)
+CFLAGS += $(GSHARED) $(XREGSFLAG)
CFLAGS64 += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
-CFLAGS64 += -G $(XREGSFLAG)
+CFLAGS64 += $(GSHARED) $(XREGSFLAG)
CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D$(MACH) -I..
-LDFLAGS += $(ZTEXT) $(ZDEFS) $(ZIGNORE) -M$(MAPFILE)
+LDFLAGS += $(ZTEXT) $(ZDEFS) $(ZIGNORE) -Wl,-M$(MAPFILE)
LDLIBS += -lnvpair -lc
diff --git a/usr/src/cmd/fs.d/udfs/fsdb/Makefile b/usr/src/cmd/fs.d/udfs/fsdb/Makefile
index 36c430cf7e..44287a3cfa 100644
--- a/usr/src/cmd/fs.d/udfs/fsdb/Makefile
+++ b/usr/src/cmd/fs.d/udfs/fsdb/Makefile
@@ -34,7 +34,7 @@ include ../../Makefile.fstype
# still export a number of "yy*" (libl) interfaces. Reduce all other symbols
# to local scope.
MAPFILES += $(MAPFILE.INT) $(MAPFILE.LEX) $(MAPFILE.NGB)
-MAPOPTS = $(MAPFILES:%=-M%)
+MAPOPTS = $(MAPFILES:%=-Wl,-M%)
CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
CPPFLAGS += -I../fstyp
@@ -42,9 +42,6 @@ LDLIBS += -lmalloc -ll -ladm
LDFLAGS += $(MAPOPTS)
YFLAGS = "-d"
-LINTFLAGS += -erroff=E_STATIC_UNUSED
-LINTFLAGS64 += -erroff=E_STATIC_UNUSED
-
CERRWARN += -_gcc=-Wno-implicit-function-declaration
CERRWARN += -_gcc=-Wno-unused-label
CERRWARN += -_gcc=-Wno-unused-variable
@@ -105,12 +102,3 @@ $(POFILE): $(CATSRCS) ../fstyp/ud_lib.h
$(XGETTEXT) $(XGETFLAGS) $(POFILE).i
$(SED) "/^domain/d" messages.po > $@
$(RM) $(POFILE).i messages.po
-
-lint: y.tab.c lex.yy.c ud_lib.c ud_lib.h
- $(LINT.c) -mu $(SRCS)
-
-putback :
- -cstyle -p fsdb.c
- -keywords fsdb.c
- -keywords Makefile
-
diff --git a/usr/src/cmd/geniconvtbl/Makefile.com b/usr/src/cmd/geniconvtbl/Makefile.com
index ed65fa10e8..66878963a2 100644
--- a/usr/src/cmd/geniconvtbl/Makefile.com
+++ b/usr/src/cmd/geniconvtbl/Makefile.com
@@ -104,7 +104,7 @@ $(ITM) := sparcv9_CFLAGS += -xregs=no%appl
LDLIBS += -lgen
MY_NATIVE_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -I. -I..
-MY_NATIVE_LDFLAGS = $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(ZDIRECT) $(ZLAZYLOAD)
+MY_NATIVE_LDFLAGS = $(MAPFILE.NES:%=-Wl,-M%) $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%) $(ZDIRECT) $(ZLAZYLOAD)
MY_NATIVE_LDLIBS = -lgen
#
@@ -128,7 +128,7 @@ $(PROG): $(OBJS)
$(POST_PROCESS)
$(ITM): $(SRCI)
- $(CC) $(CFLAGS) $(CPPFLAGS) -M$(MAPFILE) -o $@ $(SRCI) $(LDLIBS)
+ $(CC) $(CFLAGS) $(CPPFLAGS) -Wl,-M$(MAPFILE) -o $@ $(SRCI) $(LDLIBS)
$(POST_PROCESS_SO)
$(YTABC) $(YTABH): $(SRCY)
diff --git a/usr/src/cmd/genmsg/Makefile b/usr/src/cmd/genmsg/Makefile
index 420bfd58d1..52c5072f39 100644
--- a/usr/src/cmd/genmsg/Makefile
+++ b/usr/src/cmd/genmsg/Makefile
@@ -42,19 +42,11 @@ LDLIBS += -ll
YFLAGS = -d
CPPFLAGS = -I../head $(CPPFLAGS.master)
-# lex and yacc generates lint-unclean C code.
-LINTSUPPRESS= \
- -erroff=E_FUNC_RET_MAYBE_IGNORED2 \
- -erroff=E_EQUALITY_NOT_ASSIGNMENT \
- -erroff=E_BLOCK_DECL_UNUSED
-
-LINTFLAGS += -um
-
# genmsg has a name clash with main() and libl.so.1. However, genmsg must
# still export a number of "yy*" (libl) interfaces. Reduce all other symbols
# to local scope.
MAPFILES += $(MAPFILE.LEX) $(MAPFILE.NGB)
-MAPOPTS = $(MAPFILES:%=-M%)
+MAPOPTS = $(MAPFILES:%=-Wl,-M%)
LDFLAGS += $(MAPOPTS)
@@ -90,10 +82,6 @@ $(POFILE): $(SRCS)
$(SED) "/^domain/d" messages.po > $@
$(RM) $(POFILE).i messages.po
-lint: $(LEXINTSRCS) $(PSRC_C)
- $(LINT.c) $(C_OBJS:%.o=%.c) $(LDLIBS)
- $(LINT.c) $(LEXINTSRCS) $(PSRC_C) $(LINTSUPPRESS) $(LDLIBS)
-
clean:
$(RM) $(OBJS) $(PSRC_C) $(LEXINTSRCS) y.tab.h *.po
diff --git a/usr/src/cmd/gss/gssd/Makefile b/usr/src/cmd/gss/gssd/Makefile
index 90ef85ab9e..3e64a0f6b4 100644
--- a/usr/src/cmd/gss/gssd/Makefile
+++ b/usr/src/cmd/gss/gssd/Makefile
@@ -42,14 +42,11 @@ G_OBJS = gssd_xdr.o
GSSDOBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(G_OBJS)
GSSCOBJS = $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
-GSSD_LINTS = $(GSSD_BASEOBJS:.o=.c)
-GSSC_LINTS = $(GSSC_BASEOBJS:.o=.c)
-
ROBJS = $(GD_OBJS) $(GC_OBJS) $(G_OBJS)
OBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
SRCS = $(OBJS:.o=.c)
RSRC = $(ROBJS:.o=.c)
-RSRC += gssd.h
+RSRC += gssd.h
CLOBBERFILES += $(TESTPROG)
@@ -82,9 +79,9 @@ SMATCH=off
LDLIBS += -lgss -lnsl
gssd := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
-gssd := LDFLAGS += $(MAPFILES:%=-M%)
+gssd := LDFLAGS += $(MAPFILES:%=-Wl,-M%)
-$(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50
+$(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50
.KEEP_STATE:
@@ -100,7 +97,7 @@ gssd: $(GSSDOBJS) $$(MAPFILES)
$(LINK.c) $(GSSDOBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
-gssdtest: $(GSSCOBJS)
+gssdtest: $(GSSCOBJS)
$(LINK.c) $(GSSCOBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
@@ -140,14 +137,6 @@ install_h:
clean:
$(RM) $(OBJS) $(RSRC) gssd.x
-lint_gssd:
- $(LINT.c) $(GSSD_LINTS)
-
-lint_gssc:
- $(LINT.c) $(GSSC_LINTS)
-
-lint: lint_gssd lint_gssc
-
check: $(CHKMANIFEST)
include ../../Makefile.targ
diff --git a/usr/src/cmd/idmap/idmapd/Makefile b/usr/src/cmd/idmap/idmapd/Makefile
index bcbd288752..8b3b893e57 100644
--- a/usr/src/cmd/idmap/idmapd/Makefile
+++ b/usr/src/cmd/idmap/idmapd/Makefile
@@ -48,7 +48,7 @@ GENOBJS = \
rpc_svc.o
SERVERSRCS = $(SERVEROBJS:%.o=%.c)
-GENSRCS = $(GENOBJS:%.o=%.c)
+GENSRCS = $(GENOBJS:%.o=%.c)
OBJS = $(SERVEROBJS) $(GENOBJS)
SRCS = $(SERVERSRCS)
POFILES = $(OBJS:%.o=%.po)
@@ -95,9 +95,6 @@ INCS += -I $(ROOT)/usr/include/kerberosv5
$(OBJS) := CPPFLAGS += $(INCS) -D_REENTRANT
$(POFILE) := CPPFLAGS += $(INCS)
-LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2
-LINTFLAGS += -xerroff=E_NAME_USED_NOT_DEF2
-
CFLAGS += $(CCVERBOSE)
LDLIBS += \
-lsqlite-sys \
@@ -120,14 +117,12 @@ LDLIBS += \
rpc_svc.o := CFLAGS += $(RPC_MSGOUT_OPT)
$(PROG) := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
-$(PROG) := LDFLAGS += $(MAPFILES:%=-M%) \
+$(PROG) := LDFLAGS += $(MAPFILES:%=-Wl,-M%) \
-R /usr/lib/smbsrv
DIRMODE = 0755
FILEMODE = 0555
-lint_SRCS := CPPFLAGS += $(INCS) -D_REENTRANT $(RPC_MSGOUT_OPT)
-
.KEEP_STATE:
.PARALLEL: $(OBJS)
@@ -149,15 +144,11 @@ check: $(CHKMANIFEST)
clean:
$(RM) $(OBJS) $(GENSRCS)
-lint: lint_SRCS
-
-lint_SRCS:
-
RPCGENFLAGS = -CMN
adspriv_srv.o : adspriv_srv.c
-adspriv_srv.c:
+adspriv_srv.c:
$(RPCGEN) $(RPCGENFLAGS) -m $(ADS_CMN)/ads_priv.x > $@
rpc_svc.o : rpc_svc.c
diff --git a/usr/src/cmd/infocmp/Makefile b/usr/src/cmd/infocmp/Makefile
index 4a7eef9cb0..a6a4dca824 100644
--- a/usr/src/cmd/infocmp/Makefile
+++ b/usr/src/cmd/infocmp/Makefile
@@ -22,8 +22,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
PROG= infocmp
@@ -36,7 +34,7 @@ XGETFLAGS += -a -x infocmp.xcl
LDLIBS += -lcurses
CPPFLAGS += -I../../lib/libcurses/screen
MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
-LDFLAGS += $(MAPFILES:%=-M%)
+LDFLAGS += $(MAPFILES:%=-Wl,-M%)
all: $(PROG) $(MAPFILES)
@@ -44,6 +42,4 @@ install: all $(ROOTPROG)
clean:
-lint: lint_PROG
-
include ../Makefile.targ
diff --git a/usr/src/cmd/ipf/tools/Makefile.tools b/usr/src/cmd/ipf/tools/Makefile.tools
index a89fc63f97..2bea0cd0b0 100644
--- a/usr/src/cmd/ipf/tools/Makefile.tools
+++ b/usr/src/cmd/ipf/tools/Makefile.tools
@@ -57,7 +57,7 @@ include ../../../Makefile.cmd
include ../../Makefile.ipf
LDLIBS += $(LIBBPF)
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
CPPFLAGS += -I. -DIPFILTER_LOOKUP -DIPFILTER_LOG
diff --git a/usr/src/cmd/krb5/kwarn/Makefile b/usr/src/cmd/krb5/kwarn/Makefile
index c4635bbe33..53fe236be7 100644
--- a/usr/src/cmd/krb5/kwarn/Makefile
+++ b/usr/src/cmd/krb5/kwarn/Makefile
@@ -25,7 +25,7 @@
#
# Copyright 2020 Joyent, Inc.
-TESTPROG = kwarndtest
+TESTPROG = kwarndtest
PROG= ktkt_warnd
MANIFEST= ktkt_warn.xml
@@ -33,7 +33,7 @@ MANIFEST= ktkt_warn.xml
KWARNDOBJS = kwarnd.o kwarnd_svc.o kwarnd_proc.o kwarnd_generic.o kwarnd_send.o
KWARNTOBJS = kwarndtest.o
-G_OBJS = kwarnd_xdr.o
+G_OBJS = kwarnd_xdr.o
OBJS = $(KWARNDOBJS) $(KWARNTOBJS) $(G_OBJS)
SRCS = $(OBJS:.o=.c)
@@ -49,7 +49,7 @@ ROOTMANIFESTDIR= $(ROOTSVCNETWORKSECURITY)
POFILE = $(PROG).po
POFILES = generic.po
-COPTFLAG += $(XESS) #-I$(KINCDIR)
+COPTFLAG += $(XESS) #-I$(KINCDIR)
CPPFLAGS += -D_REENTRANT
CERRWARN += -_gcc=-Wno-unused-variable
@@ -66,7 +66,7 @@ CPPFLAGS += -I../../lib/gss_mechs/mech_krb5/include \
-I$(SRC)/uts/common/gssapi/mechs/krb5/include
ktkt_warnd := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
-ktkt_warnd := LDFLAGS += $(KRUNPATH) $(MAPFILES:%=-M%)
+ktkt_warnd := LDFLAGS += $(KRUNPATH) $(MAPFILES:%=-Wl,-M%)
ktkt_warnd := LDLIBS += -lnsl
LDFLAGS += $(KRUNPATH)
@@ -111,8 +111,6 @@ check: $(CHKMANIFEST)
clean:
$(RM) $(OBJS) $(RSRC)
-lint: lint_SRCS
-
include ../../Makefile.targ
#additional dependencies
diff --git a/usr/src/cmd/listen/Makefile b/usr/src/cmd/listen/Makefile
index a35fb2b372..9e621e02d4 100644
--- a/usr/src/cmd/listen/Makefile
+++ b/usr/src/cmd/listen/Makefile
@@ -48,15 +48,14 @@ NETNLSD = $(NETD)/nls
# Don"t re-install /usr/lib/saf/ and /usr/net, Targetdirs installs them
#DIRS= $(LIBSAFD) $(NETD) $(NETNLSD)
DIRS= $(NETNLSD)
-ROOTSAFPROG= $(PROG:%=$(LIBSAFD)/%)
+ROOTSAFPROG= $(PROG:%=$(LIBSAFD)/%)
# If machine name and /etc/issue file need to be printed
# before the service prompt is printed, then: CPPFLAGS += -DSYS_NAME
# If debug is needed, then: CPPFLAGS += -DDEBUG
LDLIBS += -lnsl
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
-LINTFLAGS = -b -x
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
FILEMODE= 0755
CERRWARN += -_gcc=-Wno-implicit-function-declaration
@@ -95,8 +94,4 @@ $(DIRS):
clean:
$(RM) $(OBJS)
-lint:
- $(LINT.c) $(LSSRC)
- $(LINT.c) $(NLPSSRC)
-
include ../Makefile.targ
diff --git a/usr/src/cmd/lp/cmd/Makefile b/usr/src/cmd/lp/cmd/Makefile
index 54b6369a00..1d31e19262 100644
--- a/usr/src/cmd/lp/cmd/Makefile
+++ b/usr/src/cmd/lp/cmd/Makefile
@@ -24,7 +24,7 @@
# Use is subject to license terms.
#
-include ../Makefile.lp
+include ../Makefile.lp
SUBDIRS = lptest lpadmin lpsched scripts
@@ -34,7 +34,7 @@ SBINPROG = lpfilter lpforms lpusers
LIBLINKS = $(SBINPROG)
-PROG = $(LOCALPROG) $(SBINPROG)
+PROG = $(LOCALPROG) $(SBINPROG)
OBJS= $(SBINPROG:=.o)
@@ -49,7 +49,7 @@ ROOTSYMLINKS= $(LIBLINKS:%=$(ROOTLIB)/%)
CPPFLAGS = -I$(LPINC) $(CPPFLAGS.master)
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
# conditional assignments
#
@@ -65,7 +65,7 @@ lpusers:= LDLIBS += $(LIBMSG) $(LIBACC) $(LIBOAM) $(LIBUSR) $(LIBLP)
all: $(PROG) $(SUBDIRS)
install: $(PROG) $(ROOTLIBLPLOCLPROG) $(ROOTSBINPROG) \
- $(ROOTSYMLINKS) $(SUBDIRS)
+ $(ROOTSYMLINKS) $(SUBDIRS)
catalog: $(SUBDIRS) $(POFILE)
$(CP) $(POFILE) ..
@@ -78,12 +78,6 @@ clobber: $(SUBDIRS) local_clobber
local_clobber:
$(RM) $(OBJS) $(PROG) $(CLOBBERFILES)
-strip: $(SUBDIRS)
- $(STRIP) $(PROG)
-
-lint:
- $(LINT.c) $(SRCS) $(LDLIBS)
-
$(ROOTSYMLINKS):
$(RM) $@; $(SYMLINK) ../sbin/$(@F) $@
diff --git a/usr/src/cmd/lp/cmd/lpadmin/Makefile b/usr/src/cmd/lp/cmd/lpadmin/Makefile
index ace6fc7acf..4e2333ce29 100644
--- a/usr/src/cmd/lp/cmd/lpadmin/Makefile
+++ b/usr/src/cmd/lp/cmd/lpadmin/Makefile
@@ -24,10 +24,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# cmd/lp/cmd/lpadmin/Makefile
-#
include ../../Makefile.lp
@@ -67,7 +63,7 @@ LPLIBS= $(LIBACC) \
SYSLIBS= -lcurses
LDLIBS += -lsecdb $(LPLIBS) $(SYSLIBS) $(I18N)
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
PROG= lpadmin
@@ -95,10 +91,4 @@ clean:
clobber: clean
-$(RM) $(PROG) $(CLOBBERFILES)
-strip:
- $(STRIP) $(PROG)
-
-lint:
- $(LINT.c) $(SRCS) $(LDLIBS)
-
include ../Makefile.msg
diff --git a/usr/src/cmd/mail/Makefile b/usr/src/cmd/mail/Makefile
index 45487bfcee..16a1786608 100644
--- a/usr/src/cmd/mail/Makefile
+++ b/usr/src/cmd/mail/Makefile
@@ -27,7 +27,7 @@
BINPROG= mail
-PROG= $(BINPROG)
+PROG= $(BINPROG)
GREP= grep
@@ -36,14 +36,14 @@ include ../Makefile.cmd
CLOBBERFILES= $(PROG)
CLEANFILES= $(MAILOBJS)
-MAILOBJS= add_recip.o cat.o ckdlivopts.o \
+MAILOBJS= add_recip.o cat.o ckdlivopts.o \
cksaved.o clr_hinfo.o copyback.o copylet.o \
- copymt.o createmf.o del_recipl.o Dout.o delete.o \
+ copymt.o createmf.o del_recipl.o Dout.o delete.o \
done.o doopen.o dumpaff.o dumprcv.o \
errmsg.o gendeliv.o getarg.o getcomment.o \
gethead.o goback.o init.o \
isheader.o isit.o islocal.o istext.o legal.o \
- lock.o main.o mkdead.o mta_ercode.o \
+ lock.o main.o mkdead.o mta_ercode.o \
new_recipl.o parse.o pckaffspot.o pckrcvspot.o \
pickFrom.o pipletr.o poplist.o printhdr.o printmail.o \
pushlist.o savehdrs.o sel_disp.o sendlist.o \
@@ -53,7 +53,7 @@ MAILOBJS= add_recip.o cat.o ckdlivopts.o \
MAILSRC= $(MAILOBJS:%.o=%.c)
CPROG= mail
-CPROGSRC= $(CPROG:%=_%.c)
+CPROGSRC= $(CPROG:%=_%.c)
# ROOT directories
ROOTMAILD= $(ROOTLIB)/mail
@@ -83,7 +83,7 @@ SMATCH = off
LDLIBS += -lmail -lsocket
# mail defines its own delete() - reduce symbols to locals to remove name clash.
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
# conditional assignments
#
@@ -91,12 +91,9 @@ all:= TARGET= all
install:= TARGET= install
clean:= TARGET= clean
clobber:= TARGET= clobber
-lint:= TARGET= lint
# file modes, owners and groups for the install target
#
-
-
$(ROOTBIN)/mail := FILEMODE = 02511
@@ -110,7 +107,7 @@ $(ROOTINC)/% : %
all: $(PROG)
-mail: $(MAILOBJS)
+mail: $(MAILOBJS)
$(LINK.c) -o $@ $(MAILOBJS) $(LDLIBS)
$(POST_PROCESS)
@@ -121,9 +118,6 @@ install: all .WAIT $(ROOTBINPROG) $(ROOTSYMLINKS)
$(ROOTBIN)/rmail:
$(RM) $@; $(SYMLINK) mail $@
-lint:
- $(LINT.c) $(MAILSRC)
-
clean:
$(RM) $(OBJS) $(MAILOBJS)
diff --git a/usr/src/cmd/mailx/Makefile b/usr/src/cmd/mailx/Makefile
index 3b19ad4b4f..52720f9f59 100644
--- a/usr/src/cmd/mailx/Makefile
+++ b/usr/src/cmd/mailx/Makefile
@@ -72,9 +72,8 @@ CERRWARN += -_gcc=-Wno-clobbered
# not linted
SMATCH=off
-LINTFLAGS= -hb
LDLIBS += -lmail -lcustr
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
CLOBBERFILES += $(MAILXHELP)
@@ -112,8 +111,6 @@ $(POFILE): $(POFILES)
clean:
$(RM) $(OBJS)
-lint: lint_SRCS
-
include ../Makefile.targ
FRC:
diff --git a/usr/src/cmd/mdb/Makefile.kmdb.targ b/usr/src/cmd/mdb/Makefile.kmdb.targ
index 5605a6d9fd..358cb0954a 100644
--- a/usr/src/cmd/mdb/Makefile.kmdb.targ
+++ b/usr/src/cmd/mdb/Makefile.kmdb.targ
@@ -28,7 +28,7 @@
ROOTTERMINFO = $(ROOTSHLIB)/terminfo
$(PROG).core: $(OBJS) $(KMDBLIBS) $(MAPFILE)
- $(LD) -r $(BREDUCE) $(ZNOVERSION) $(ZDEFS) -M$(MAPFILE) -o $@ $(OBJS) \
+ $(LD) -r $(BREDUCE) $(ZNOVERSION) $(ZDEFS) -Wl,-M$(MAPFILE) -o $@ $(OBJS) \
$(KMDBLIBS)
$(PROG): $(PROG).core $(KCTLOBJS)
@@ -38,9 +38,6 @@ $(PROG): $(PROG).core $(KCTLOBJS)
$(POST_PROCESS)
$(SETDYNFLAG) -f DF_1_IGNMULDEF,DF_1_NOKSYMS $@
-clean.lint:
- $(RM) $(ALLLINTFILES)
-
clean:
$(RM) $(OBJS) $(KCTLOBJS) $(PROG).core $(MAPFILE)
$(RM) $(MAPFILE_INTERMEDIATE)
@@ -48,7 +45,7 @@ clean:
$(RM) kaif_off.h kmdb_context_off.h
$(RM) mdb_lex.c mdb_grammar.c mdb_grammar.h y.tab.h y.tab.c y.output
-clobber: clean clean.lint
+clobber: clean
$(RM) $(PROG)
dmods:
@@ -142,49 +139,3 @@ kmdb_modlinktest.c: $(MAPFILE_INTERMEDIATE)
%.o: $(SRC)/common/util/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
-
-#
-# Lint
-#
-
-%.ln: ../../../common/kmdb/%.c
- $(LINT.c) -c $<
-
-%.ln: ../../../common/kmdb/kctl/%.c
- $(LINT.c) -c $<
-
-%.ln: ../../../common/kmdb/kctl/%.s
- $(LINT.s) -c $<
-
-%.ln: ../../../common/mdb/%.c
- $(LINT.c) -c $<
-
-%.ln: ../../kmdb/%.c
- $(LINT.c) -c $<
-
-%.ln: ../../kmdb/%.s
- $(LINT.s) -c $<
-
-%.ln: ../../kmdb/kctl/%.c
- $(LINT.c) -c $<
-
-%.ln: ../../kmdb/kctl/%.s
- $(LINT.s) -c $<
-
-%.ln: ../../mdb/%.c
- $(LINT.c) -c $<
-
-%.ln: %.c
- $(LINT.c) -c $<
-
-%.ln: %.s
- $(LINT.s) -c $<
-
-%.ln: kctl/%.s
- $(LINT.s) -c $<
-
-%.ln: $(SRC)/common/net/util/%.c
- $(LINT.c) -c $<
-
-%.ln: $(SRC)/common/util/%.c
- $(LINT.c) -c $<
diff --git a/usr/src/cmd/mdb/Makefile.libstandctf b/usr/src/cmd/mdb/Makefile.libstandctf
index e24e39d777..11e77bafcc 100644
--- a/usr/src/cmd/mdb/Makefile.libstandctf
+++ b/usr/src/cmd/mdb/Makefile.libstandctf
@@ -54,13 +54,10 @@ C99LMODE = -Xc99=%all
# kmdb is a kernel module, so we'll use the kernel's build flags.
CFLAGS64 += $(STAND_FLAGS_64)
-LDFLAGS = $(ZNOVERSION) $(BREDUCE) -M $(MAPFILE) -dy -r
+LDFLAGS = $(ZNOVERSION) $(BREDUCE) -Wl,-M$(MAPFILE) -dy -r
LIB = libstandctf.so
OBJS = $(CTF_COMMON_SRCS:%.c=%.o) $(CTF_STUB_SRCS:%.c=%.o)
-LINTFILES = $(OBJS:%.o=%.ln)
-
-LINTFLAGS += -n -errtags=yes
CERRWARN += $(CNOWARN_UNINIT)
@@ -73,10 +70,7 @@ $(LIB): $(OBJS) $(MAPFILE)
$(LD) $(LDFLAGS) -o $@ $(OBJS)
clobber clean:
- $(RM) $(LIB) $(OBJS) $(LINTFILES)
-
-lint: $(LINTFILES)
- $(LINT) $(LINTFLAGS) $(LINTFILES)
+ $(RM) $(LIB) $(OBJS)
#
# Dynamic rules for object construction
@@ -89,13 +83,3 @@ lint: $(LINTFILES)
%.o: $(SRC)/common/ctf/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
-
-#
-# Lint
-#
-
-%.ln: ../../../common/libstandctf/%.c
- $(LINT.c) -c $<
-
-%.ln: $(SRC)/common/ctf/%.c
- $(LINT.c) -c $<
diff --git a/usr/src/cmd/mdb/Makefile.module b/usr/src/cmd/mdb/Makefile.module
index ee89bd5a18..a6305b8ddf 100644
--- a/usr/src/cmd/mdb/Makefile.module
+++ b/usr/src/cmd/mdb/Makefile.module
@@ -53,8 +53,8 @@ MODFILE = dmod/$(MODULE)
KMODFILE = kmod/$(KMODULE)
#
-# The mess below is designed to pick the right set of objects to build and/or
-# lint. We have three flavors:
+# The mess below is designed to pick the right set of objects to build .
+# We have three flavors:
#
# 1. proc and raw modules. Only $(MODOBJS) are built.
# 2. kvm modules for systems without kmdb. Only $(MODOBJS) are built.
@@ -91,18 +91,6 @@ ROOTTGTS_proc = $(ROOTMOD)/$(MODULE)
ROOTTGTS_raw = $(ROOTMOD)/$(MODULE)
ROOTTGTS = $(ROOTTGTS_$(MDBTGT))
-# What should we lint?
-KLINTOBJS = $(KMODOBJS:%.o=%.ln)
-LINTOBJS = $(MODOBJS:%.o=%.ln)
-
-LINTFILES_kvm_type = $(TARGETS_kvm_type)
-LINTFILES_kvm_both = $(KLINTOBJS) $(LINTOBJS)
-LINTFILES_kvm_mdb = $(LINTOBJS)
-LINTFILES_kvm = $(LINTFILES_kvm_$(LINTFILES_kvm_type))
-LINTFILES_proc = $(LINTOBJS)
-LINTFILES_raw = $(LINTOBJS)
-LINTFILES = $(LINTFILES_$(MDBTGT))
-
#
# Python specific flags. To try and make life easier for folks who are
# building with an LFS python, we attempt to use -isystem when it's
@@ -134,11 +122,11 @@ AS_CPPFLAGS += -D_ASM
SMOFF += all_func_returns,index_overflow
# Module type-specific compiler flags
-$(MODOBJS) := CFLAGS += $(C_BIGPICFLAGS) $(XREGSFLAG)
-$(MODOBJS) := CFLAGS64 += $(C_BIGPICFLAGS) $(XREGSFLAG)
-$(KMODOBJS) $(KLINTOBJS) := CPPFLAGS += -D_KMDB
-$(KMODOBJS) := V9CODESIZE = $(CCABS32)
-$(KMODOBJS) := DTS_ERRNO =
+$(MODOBJS) := CFLAGS += $(C_BIGPICFLAGS) $(XREGSFLAG)
+$(MODOBJS) := CFLAGS64 += $(C_BIGPICFLAGS) $(XREGSFLAG)
+$(KMODOBJS) := CPPFLAGS += -D_KMDB
+$(KMODOBJS) := V9CODESIZE = $(CCABS32)
+$(KMODOBJS) := DTS_ERRNO =
# Modules aren't allowed to export symbols
MAPFILE = $(SRC)/cmd/mdb/common/modules/conf/mapfile
@@ -162,23 +150,18 @@ install: all $$(ROOTTGTS)
dmods: install
-clean.lint:
- $(RM) $(LINTFILES) $(MODSRCS:.c=.ln)
-
clean:
$(RM) $(MODOBJS) $(KMODOBJS) $(CLEANFILES)
-clobber: clean clean.lint
+clobber: clean
$(RM) $(MODFILE) $(KMODFILE) $(CLOBBERFILES)
-lint: $$(LINTFILES)
-
.NO_PARALLEL:
.PARALLEL: $(MODOBJS) $(KMODOBJS) mdb_tgt kmdb_tgt dmod kmod \
- $(TARGETS) $(LINTFILES)
+ $(TARGETS)
$(MODFILE): dmod .WAIT $(MODOBJS) $$(MAPFILE-EXT)
- $(LINK.c) $(ZDEFS) $(ZIGNORE) $(MAPFILE-EXT:%=-M%) $(GSHARED) \
+ $(LINK.c) $(ZDEFS) $(ZIGNORE) $(MAPFILE-EXT:%=-Wl,-M%) $(GSHARED) \
$(MODOBJS) -o $@ $(LDLIBS) -lc -lproc
$(CTFMERGE) -L VERSION -o $@ $(MODOBJS)
$(POST_PROCESS_SO)
@@ -213,7 +196,7 @@ $(KMDB_LINKTEST_ENABLE)KMDB_LINKTEST_CMD = $(KMDB_LINKTEST)
KMDB_FPTEST_CMD = $(KMDB_FPTEST)
$(KMODFILE): kmod .WAIT $(KMODOBJS) $(MAPFILE)
- $(LD) -dy -r $(MAPFILE:%=-M%) -Nmisc/kmdbmod -o $@ $(KMODOBJS) \
+ $(LD) -dy -r $(MAPFILE:%=-Wl,-M%) -Nmisc/kmdbmod -o $@ $(KMODOBJS) \
$(STANDOBJS)
$(KMDB_LINKTEST_CMD)
$(KMDB_FPTEST_CMD)
@@ -263,33 +246,6 @@ dmod/%.o kmod%.o: $$(MODSRCS_DIR)/%.s
$(COMPILE.s) -o $@ $<
#
-# Lint
-#
-dmod/%.ln kmod/%.ln: %.c
- $(LINT.c) -dirout=$(@D) -c $<
-
-dmod/%.ln kmod/%.ln: %.s
- $(LINT.s) -dirout=$(@D) -c $<
-
-dmod/%.ln kmod/%.ln: ../%.c
- $(LINT.c) -dirout=$(@D) -c $<
-
-dmod/%.ln kmod/%.ln: ../%.s
- $(LINT.s) -dirout=$(@D) -c $<
-
-dmod/%.ln kmod/%.ln: ../../../common/modules/$(MODNAME)/%.c
- $(LINT.c) -dirout=$(@D) -c $<
-
-dmod/%.ln kmod/%.ln: ../../../common/modules/$(MODNAME)/%.s
- $(LINT.s) -dirout=$(@D) -c $<
-
-dmod/%.ln kmod/%.ln: $$(MODSRCS_DIR)/%.c
- $(LINT.c) -dirout=$(@D) -c $<
-
-dmod/%.ln kmod/%.ln: $$(MODSRCS_DIR)/%.s
- $(LINT.s) -dirout=$(@D) -c $<
-
-#
# Installation targets
#
diff --git a/usr/src/cmd/nl/Makefile b/usr/src/cmd/nl/Makefile
index 74877dc7d0..7e4c8beb00 100644
--- a/usr/src/cmd/nl/Makefile
+++ b/usr/src/cmd/nl/Makefile
@@ -49,7 +49,7 @@ SMATCH=off
$(XPG4):= CPPFLAGS += -DXPG4
MAPFILE.INT = ../expr/mapfile-intf
-LDFLAGS += $(MAPFILE.INT:%=-M%)
+LDFLAGS += $(MAPFILE.INT:%=-Wl,-M%)
.KEEP_STATE:
@@ -86,7 +86,5 @@ nlobjs.xpg4:
clean:
$(RM) $(OBJS)
-lint: lint_PROG
-
include ../Makefile.targ
diff --git a/usr/src/cmd/pools/poolcfg/Makefile b/usr/src/cmd/pools/poolcfg/Makefile
index 5b117fcf04..4b54a58800 100644
--- a/usr/src/cmd/pools/poolcfg/Makefile
+++ b/usr/src/cmd/pools/poolcfg/Makefile
@@ -27,7 +27,7 @@
PROG = poolcfg
OBJS = poolcfg_lex.o poolcfg_grammar.o
SRCS = $(OBJS:%.o=%.c) $(COMMON_SRCS)
-POFILES = $(OBJS:.o=.po)
+POFILES = $(OBJS:.o=.po)
POFILE = poolcfg.po
include ../../Makefile.cmd
@@ -37,7 +37,7 @@ include ../Makefile.pools
# still export a number of "yy*" (libl) interfaces. Reduce all other symbols
# to local scope.
MAPFILES += $(MAPFILE.LEX) $(MAPFILE.NGB)
-MAPOPTS = $(MAPFILES:%=-M%)
+MAPOPTS = $(MAPFILES:%=-Wl,-M%)
LFLAGS = -t
YFLAGS = -d
@@ -80,9 +80,4 @@ clean:
$(POFILE): $(POFILES)
$(RM) $@; cat $(POFILES) > $@
-#
-# We don't do lint of lex- and yacc- generated source files
-#
-lint:
-
include ../../Makefile.targ
diff --git a/usr/src/cmd/rcap/Makefile.com b/usr/src/cmd/rcap/Makefile.com
index babe6cdf81..2eb126c5c0 100644
--- a/usr/src/cmd/rcap/Makefile.com
+++ b/usr/src/cmd/rcap/Makefile.com
@@ -30,7 +30,7 @@
# COMMON_DIR.
#
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
CERRWARN += -_gcc=-Wno-unused-function
CERRWARN += $(CNOWARN_UNINIT)
diff --git a/usr/src/cmd/rcap/rcapstat/Makefile b/usr/src/cmd/rcap/rcapstat/Makefile
index a886b05782..ecbda402a7 100644
--- a/usr/src/cmd/rcap/rcapstat/Makefile
+++ b/usr/src/cmd/rcap/rcapstat/Makefile
@@ -34,10 +34,6 @@ COMMON_DIR= ../common # for Makefile.com
SRCS = rcapstat.c \
utils.c
-LINTSRCS = $(COMMON_DIR)/utils.c \
- rcapstat.c \
- $(STAT_COMMON_SRCS)
-
STATCOMMONDIR = $(SRC)/cmd/stat/common
STAT_COMMON_OBJS = timestamp.o
@@ -45,10 +41,8 @@ STAT_COMMON_SRCS = $(STAT_COMMON_OBJS:%.o=$(STATCOMMONDIR)/%.c)
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
CPPFLAGS += -I$(COMMON_DIR) -I$(STATCOMMONDIR)
-LDLIBS += -lumem -lscf
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
-
-LINTFLAGS += $(LDLIBS) -mnu
+LDLIBS += -lumem -lzonecfg -lscf
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
PROG = rcapstat
OBJS = $(SRCS:%.c=%.o) rcapd_conf.o
@@ -59,7 +53,7 @@ POFILE = p$(PROG).po
CLOBBERFILES += rcapd_conf.c $(POFILES) $(POFILE)
.NO_PARALLEL:
-.PARALLEL: $(OBJS) $(LINTFILES)
+.PARALLEL: $(OBJS)
all: $(PROG) $(MAPFILE.NGB)
@@ -80,9 +74,6 @@ $(POFILE): $(POFILES)
clean:
$(RM) $(OBJS) $(STAT_COMMON_OBJS)
-lint:
- $(LINT.c) $(LINTSRCS)
-
$(ROOTBIN):
$(MKDIR) -p $(ROOTBIN)
diff --git a/usr/src/cmd/rcm_daemon/Makefile.com b/usr/src/cmd/rcm_daemon/Makefile.com
index bec924922a..424f59bfb1 100644
--- a/usr/src/cmd/rcm_daemon/Makefile.com
+++ b/usr/src/cmd/rcm_daemon/Makefile.com
@@ -122,7 +122,7 @@ CERRWARN += -_gcc=-Wno-unused-function
SMATCH=off
MAPFILES = ../common/mapfile-intf $(MAPFILE.NGB)
-rcm_daemon := LDFLAGS += $(MAPFILES:%=-M%)
+rcm_daemon := LDFLAGS += $(MAPFILES:%=-Wl,-M%)
LDLIBS_MODULES =
SUNW_pool_rcm.so := LDLIBS_MODULES += -L$(ROOT)/usr/lib -lpool -lnvpair
diff --git a/usr/src/cmd/saf/Makefile b/usr/src/cmd/saf/Makefile
index d557d52c30..e611cbb278 100644
--- a/usr/src/cmd/saf/Makefile
+++ b/usr/src/cmd/saf/Makefile
@@ -54,8 +54,7 @@ ROOTSACF= $(SACF:%=$(LIBSAFD)/%)
ROOTADMF= $(ADMF:%=$(ROOTUSRSBIN)/%)
LDLIBS += -lnsl
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
-LINTFLAGS += -b -x
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
CERRWARN += -_gcc=-Wno-implicit-function-declaration
CERRWARN += -_gcc=-Wno-parentheses
@@ -79,7 +78,7 @@ $(LIBSAFD)/% : %
.PARALLEL: $(OBJS)
-all: $(PROG)
+all: $(PROG)
sac: $(SACOBJS) $(MAPFILE.NGB)
$(LINK.c) $(SACOBJS) -o $@ $(LDLIBS)
@@ -110,9 +109,4 @@ check: $(CHKMANIFEST)
clean:
$(RM) $(OBJS)
-lint:
- $(LINT.c) $(SACSRCS)
- $(LINT.c) $(SACADMSRCS)
- $(LINT.c) $(PMADMSRCS)
-
include ../Makefile.targ
diff --git a/usr/src/cmd/savecore/Makefile.com b/usr/src/cmd/savecore/Makefile.com
index c4ba4f89f0..0ee5137460 100644
--- a/usr/src/cmd/savecore/Makefile.com
+++ b/usr/src/cmd/savecore/Makefile.com
@@ -44,7 +44,7 @@ SMATCH=off
# savecore.c it will compile, but trying to call that function
# will jump to 0. So we use -ztext to avoid that.
#
-LDFLAGS += -ztext
+LDFLAGS += $(ZTEXT)
BZIP2OBJS = bz2blocksort.o \
bz2compress.o \
@@ -67,23 +67,6 @@ $(PROG): $(OBJS) $(BZIP2OBJS) $(CHACHAOBJ)
clean:
$(RM) $(OBJS) $(BZIP2OBJS)
-lint := CPPFLAGS += -I$(SRC)/common
-
-#
-# Linting the usr/src/common/bzip2 source produces reams of complaints.
-# So we only lint regular SRCS, but we need to excuse two complaints
-# related to bz_internal_error.
-#
-
-lint := BZ2LINTCOPOUTS = -erroff=E_NAME_USED_NOT_DEF2
-lint := BZ2LINTCOPOUTS += -erroff=E_NAME_DEF_NOT_USED2
-
-lint := LINTFLAGS += $(BZ2LINTCOPOUTS)
-lint := LINTFLAGS64 += $(BZ2LINTCOPOUTS)
-
-lint: $(LINTSRCS)
- $(LINT.c) $(SRCS) $(LDLIBS)
-
include ../../Makefile.targ
%.o: ../%.c
diff --git a/usr/src/cmd/sendmail/src/Makefile b/usr/src/cmd/sendmail/src/Makefile
index e488312e99..df7645e3d0 100644
--- a/usr/src/cmd/sendmail/src/Makefile
+++ b/usr/src/cmd/sendmail/src/Makefile
@@ -42,7 +42,7 @@ OBJS= alias.o arpadate.o bf.o collect.o conf.o control.o convtime.o daemon.o \
SRCS= $(OBJS:%.o=%.c)
MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
-LDFLAGS += $(MAPFILES:%=-M%)
+LDFLAGS += $(MAPFILES:%=-Wl,-M%)
LDLIBS += ../libsmutil/libsmutil.a ../libsm/libsm.a -lresolv -lsocket \
-lnsl ../db/libdb.a -lldap -lsldap -lwrap -lumem \
@@ -82,6 +82,4 @@ $(ROOTSYMLINKS):
clean:
$(RM) $(PROG) $(OBJS)
-lint: lint_SRCS
-
include ../../Makefile.targ
diff --git a/usr/src/cmd/sendmail/util/Makefile b/usr/src/cmd/sendmail/util/Makefile
index 455879af02..0e5e6ee8e3 100644
--- a/usr/src/cmd/sendmail/util/Makefile
+++ b/usr/src/cmd/sendmail/util/Makefile
@@ -27,7 +27,7 @@
include ../../Makefile.cmd
include ../Makefile.cmd
-PROG= mailstats mconnect vacation mailcompat praliases
+PROG= mailstats mconnect vacation mailcompat praliases
LIBPROG= mail.local smrsh
@@ -38,11 +38,11 @@ LIBSMTPSMPROG= mailq
# $(PROG) by default
CLOBBERFILES= $(LIBPROG) $(USRSBINPROG) $(LIBSMTPSMPROG)
-OBJS= $(PROG:%=%.o)
+OBJS= $(PROG:%=%.o)
.PARALLEL: $(OBJS) $(PROG) $(LIBPROG) $(USRSBINPROG)
-SRCS= $(PROG:%=%.c)
+SRCS= $(PROG:%=%.c)
editmap := LDLIBS += -lldap
mail.local := LDLIBS += -lsocket -lnsl -lmail -lldap
@@ -65,7 +65,7 @@ CPPFLAGS = $(INCPATH) $(ENVDEF) $(SUNENVDEF) $(DBMDEF) $(CPPFLAGS.sm)
# Nearly every support application provides sleep(). This isn't incompatible
# with libc, but can be confined to the applications themselves.
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
.KEEP_STATE:
@@ -119,7 +119,4 @@ install: all $(ROOTPROG) $(ROOTLIB)/mail.local $(ROOTLIB)/smrsh \
clean:
$(RM) $(OBJS) *.o
-lint: lint_PROG
-
-
include ../../Makefile.targ
diff --git a/usr/src/cmd/sgs/0@0/Makefile.com b/usr/src/cmd/sgs/0@0/Makefile.com
index 42da97d835..7fc36e1f90 100644
--- a/usr/src/cmd/sgs/0@0/Makefile.com
+++ b/usr/src/cmd/sgs/0@0/Makefile.com
@@ -31,15 +31,15 @@ VERS= .1
OBJECTS= 0@0.o
CRTI= pics/crti.o
CRTN= pics/crtn.o
-CRTS= $(CRTI) $(CRTN)
+CRTS= $(CRTI) $(CRTN)
include $(SRC)/lib/Makefile.lib
MAPFILES=
-ASFLAGS= -P -D_ASM $(CPPFLAGS)
+ASFLAGS= -P -D_ASM $(CPPFLAGS)
DYNFLAGS += $(BLOCAL) $(ZNOVERSION) $(ZINITFIRST)
LDLIBS += -lc
-BUILD.SO= $(LD) -o $@ -G $(DYNFLAGS) $(CRTI) $(PICS) $(LDLIBS) $(CRTN)
+BUILD.SO= $(LD) -o $@ $(GSHARED) $(DYNFLAGS) $(CRTI) $(PICS) $(LDLIBS) $(CRTN)
BUILD.s= $(AS) $(ASFLAGS) $< -o $@
SRCS= $(OBJECTS:%.o=../common/%.c)
diff --git a/usr/src/cmd/sgs/crle/Makefile.com b/usr/src/cmd/sgs/crle/Makefile.com
index 358f4def66..93c386d112 100644
--- a/usr/src/cmd/sgs/crle/Makefile.com
+++ b/usr/src/cmd/sgs/crle/Makefile.com
@@ -40,7 +40,7 @@ SGSCOMMONOBJ= alist.o
OBJS= $(BLTOBJ) $(COMOBJ) $(SGSCOMMONOBJ)
MAPFILE= $(MAPFILE.NGB)
-MAPOPT= $(MAPFILE:%=-M%)
+MAPOPT= $(MAPFILE:%=-Wl,-M%)
# not linted
SMATCH=off
diff --git a/usr/src/cmd/sgs/elfdump/Makefile.com b/usr/src/cmd/sgs/elfdump/Makefile.com
index 9452ddde81..59a1e75556 100644
--- a/usr/src/cmd/sgs/elfdump/Makefile.com
+++ b/usr/src/cmd/sgs/elfdump/Makefile.com
@@ -46,7 +46,7 @@ BLTOBJ = msg.o
OBJS= $(BLTOBJ) $(COMOBJ) $(COMOBJ32) $(COMOBJ64) $(SGSCOMMONOBJ)
MAPFILE= $(MAPFILE.NGB)
-MAPOPT= $(MAPFILE:%=-M%)
+MAPOPT= $(MAPFILE:%=-Wl,-M%)
CPPFLAGS= -I. -I../common -I../../include -I../../include/$(MACH) \
-I$(SRC)/lib/libc/inc -I$(SRC)/uts/$(ARCH)/sys \
diff --git a/usr/src/cmd/sgs/elfedit/Makefile.com b/usr/src/cmd/sgs/elfedit/Makefile.com
index 4f35ce2513..08d00eeaad 100644
--- a/usr/src/cmd/sgs/elfedit/Makefile.com
+++ b/usr/src/cmd/sgs/elfedit/Makefile.com
@@ -48,7 +48,7 @@ CPPFLAGS= -I. -I../common -I../../include -I../../include/$(MACH) \
$(CPPFLAGS.master) -I$(ELFCAP)
LLDFLAGS = $(VAR_ELFEDIT_LLDFLAGS)
LLDFLAGS64 = $(VAR_ELFEDIT_LLDFLAGS64)
-LDFLAGS += $(VERSREF) -M$(MAPFILE) $(LLDFLAGS)
+LDFLAGS += $(VERSREF) -Wl,-M$(MAPFILE) $(LLDFLAGS)
LDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) -llddbg \
$(CONVLIBDIR) -lconv -ltecla
NATIVE_LIBS += libtecla.so
diff --git a/usr/src/cmd/sgs/elfwrap/Makefile.com b/usr/src/cmd/sgs/elfwrap/Makefile.com
index de5a4e2892..066d5fbfd6 100644
--- a/usr/src/cmd/sgs/elfwrap/Makefile.com
+++ b/usr/src/cmd/sgs/elfwrap/Makefile.com
@@ -48,7 +48,7 @@ OBJS= $(BLTOBJ) $(COMOBJ) $(MACHOBJ) $(COMOBJ32) $(COMOBJ64) \
$(SGSCOMMONOBJ)
MAPFILES = $(MAPFILE.NGB)
-MAPOPTS = $(MAPFILES:%=-M%)
+MAPOPTS = $(MAPFILES:%=-Wl,-M%)
CPPFLAGS = -I. -I../common -I../../include $(CPPFLAGS.master) -I$(ELFCAP)
LLDFLAGS =
diff --git a/usr/src/cmd/sgs/ld/Makefile.com b/usr/src/cmd/sgs/ld/Makefile.com
index 81e507a969..5a8ec45336 100644
--- a/usr/src/cmd/sgs/ld/Makefile.com
+++ b/usr/src/cmd/sgs/ld/Makefile.com
@@ -39,7 +39,7 @@ OBJS = $(BLTOBJ) $(COMOBJS)
SRCDIR = $(SGSHOME)/ld
MAPFILES = $(SRCDIR)/common/mapfile-intf $(MAPFILE.NGB)
-MAPOPTS = $(MAPFILES:%=-M%)
+MAPOPTS = $(MAPFILES:%=-Wl,-M%)
LDFLAGS += $(VERSREF) $(MAPOPTS) $(VAR_LD_LLDFLAGS)
LDLIBS += $(LDLIBDIR) -lld $(ELFLIBDIR) -lelf \
diff --git a/usr/src/cmd/sgs/ldd/Makefile.com b/usr/src/cmd/sgs/ldd/Makefile.com
index 82621fe23e..ec6f5a04c7 100644
--- a/usr/src/cmd/sgs/ldd/Makefile.com
+++ b/usr/src/cmd/sgs/ldd/Makefile.com
@@ -39,7 +39,7 @@ SGSCOMMONOBJ= alist.o
OBJS= $(BLTOBJ) $(COMOBJ) $(SGSCOMMONOBJ)
MAPFILE= $(MAPFILE.NGB)
-MAPOPTS= $(MAPFILE:%=-M%)
+MAPOPTS= $(MAPFILE:%=-Wl,-M%)
CPPFLAGS += -I. -I../../include -I../../include/$(MACH) \
-I$(SRC)/uts/$(ARCH)/sys \
diff --git a/usr/src/cmd/sgs/ldprof/Makefile.com b/usr/src/cmd/sgs/ldprof/Makefile.com
index b12ae3a396..91cf400735 100644
--- a/usr/src/cmd/sgs/ldprof/Makefile.com
+++ b/usr/src/cmd/sgs/ldprof/Makefile.com
@@ -50,7 +50,7 @@ CFLAGS += $(C_PICFLAGS)
SMOFF += indenting
-ZGUIDANCE = -zguidance=nounused
+ZGUIDANCE = -Wl,-zguidance=nounused
LDLIBS += $(ZRECORD) -lmapmalloc -lc $(DLLIB)
diff --git a/usr/src/cmd/sgs/libcrle/Makefile.com b/usr/src/cmd/sgs/libcrle/Makefile.com
index e4c190f449..7c484b91eb 100644
--- a/usr/src/cmd/sgs/libcrle/Makefile.com
+++ b/usr/src/cmd/sgs/libcrle/Makefile.com
@@ -42,7 +42,7 @@ include $(SRC)/cmd/sgs/Makefile.com
SRCDIR = ../common
-ZGUIDANCE = -zguidance=nounused
+ZGUIDANCE = -Wl,-zguidance=nounused
LDLIBS += $(ZRECORD) -lmapmalloc $(DLLIB) -lc
diff --git a/usr/src/cmd/sgs/moe/Makefile.com b/usr/src/cmd/sgs/moe/Makefile.com
index 0f3ec8bdb4..54951fb525 100644
--- a/usr/src/cmd/sgs/moe/Makefile.com
+++ b/usr/src/cmd/sgs/moe/Makefile.com
@@ -37,7 +37,7 @@ BLTOBJ= msg.o
OBJS= $(BLTOBJ) $(COMOBJ)
MAPFILE= $(MAPFILE.NGB)
-MAPOPT= $(MAPFILE:%=-M%)
+MAPOPT= $(MAPFILE:%=-Wl,-M%)
LDFLAGS += -Wl,$(VERSREF) $(MAPOPT)
LDLIBS += $(CONVLIBDIR) -lconv
diff --git a/usr/src/cmd/sgs/pvs/Makefile.com b/usr/src/cmd/sgs/pvs/Makefile.com
index e34c937975..0e7cad8a62 100644
--- a/usr/src/cmd/sgs/pvs/Makefile.com
+++ b/usr/src/cmd/sgs/pvs/Makefile.com
@@ -40,7 +40,7 @@ SGSCOMMONOBJ = alist.o
OBJS= $(BLTOBJ) $(COMOBJ) $(SGSCOMMONOBJ)
MAPFILE= $(MAPFILE.NGB)
-MAPOPTS= $(MAPFILE:%=-M%)
+MAPOPTS= $(MAPFILE:%=-Wl,-M%)
CPPFLAGS += -I$(SRC)/lib/libc/inc
LLDFLAGS = '-R$$ORIGIN/../lib'
diff --git a/usr/src/cmd/sgs/rtld/Makefile.targ b/usr/src/cmd/sgs/rtld/Makefile.targ
index ff2ccf9864..3ceacd78a6 100644
--- a/usr/src/cmd/sgs/rtld/Makefile.targ
+++ b/usr/src/cmd/sgs/rtld/Makefile.targ
@@ -71,7 +71,7 @@ pics/elfcap.o: $(ELFCAP)/elfcap.c
$(POST_PROCESS_O)
$(RTLD): pics $(PICS) $(CRTS)
- $(LD) -o $@ -dy -G $(DYNFLAGS) $(CRTI) $(PICS) \
+ $(LD) -o $@ -dy $(GSHARED) $(DYNFLAGS) $(CRTI) $(PICS) \
$(LDLIBS) $(CRTN)
$(POST_PROCESS_SO)
diff --git a/usr/src/cmd/sh/Makefile b/usr/src/cmd/sh/Makefile
index bb8852b978..bbece1910b 100644
--- a/usr/src/cmd/sh/Makefile
+++ b/usr/src/cmd/sh/Makefile
@@ -51,7 +51,7 @@ CERRWARN += -_gcc=-Wno-unused-variable
SMATCH=off
MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
-LDFLAGS += $(MAPFILES:%=-M%)
+LDFLAGS += $(MAPFILES:%=-Wl,-M%)
LDLIBS += -lgen
.KEEP_STATE:
@@ -74,9 +74,7 @@ install: all $(ROOTHASBINPROG)
$(RM) $(ROOTHASLIB)/rsh
$(SYMLINK) ../bin/sh $(ROOTHASLIB)/rsh
-clean:
+clean:
$(RM) $(OBJS)
-lint: lint_SRCS
-
include ../Makefile.targ
diff --git a/usr/src/cmd/sqlite/Makefile b/usr/src/cmd/sqlite/Makefile
index 8e9e672965..48c756e61c 100644
--- a/usr/src/cmd/sqlite/Makefile
+++ b/usr/src/cmd/sqlite/Makefile
@@ -58,17 +58,15 @@ CPPFLAGS += -D_REENTRANT -DTHREADSAFE=1 -DHAVE_USLEEP=1 \
$(PROG): $(OBJS) $(SQLITEHDRDIR)/sqlite.h
$(LINK.c) -o $@ $(OBJS) \
- $(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) $(LDLIBS)
+ $(MAPFILE.NES:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%) $(LDLIBS)
$(CTFMERGE) -t -L VERSION -o $@ $(OBJS)
$(POST_PROCESS)
-all: $(PROG)
+all: $(PROG)
install: all $(ROOTSQLITE)
clean:
$(RM) $(OBJS)
-lint:
-
include ../Makefile.targ
diff --git a/usr/src/cmd/svc/svccfg/Makefile b/usr/src/cmd/svc/svccfg/Makefile
index ece4cb765e..39e03c9607 100644
--- a/usr/src/cmd/svc/svccfg/Makefile
+++ b/usr/src/cmd/svc/svccfg/Makefile
@@ -35,9 +35,6 @@ SRCS = svccfg_main.c \
svccfg_xml.c \
svccfg_help.c
-LNTS = $(SRCS:%.c=%.ln) \
- manifest_find.ln \
- manifest_hash.ln
MYOBJS = $(SRCS:%.c=%.o) \
svccfg_grammar.o \
@@ -68,7 +65,7 @@ $(NATIVE_BUILD)OBJS = $(MYOBJS:%.o=%-native.o)
# still export a number of "yy*" (libl) interfaces. Reduce all other symbols
# to local scope.
MAPFILES += $(MAPFILE.LEX) $(MAPFILE.NGB)
-MAPOPTS = $(MAPFILES:%=-M%)
+MAPOPTS = $(MAPFILES:%=-Wl,-M%)
MYCPPFLAGS = -I ../common -I$(ADJUNCT_PROTO)/usr/include/libxml2
CPPFLAGS += $(MYCPPFLAGS)
@@ -102,9 +99,6 @@ LIBSCF = $(SRC)/lib/libscf
LIBTECLA = $(SRC)/lib/libtecla # just for the header
LIBUUTIL = $(SRC)/lib/libuutil
-lint := LINTFLAGS = -mux
-lint := SVCCFG_EXTRA_LIBS = -lscf -ll -luutil -lumem -lmd5 -lnvpair
-
LDLIBS += $(SVCCFG_EXTRA_LIBS)
$(NATIVE_BUILD)NATIVE_LIBS += libl.so libumem.so libmd5.so libnvpair.so libc.so
@@ -129,7 +123,7 @@ svccfg_lex.o svccfg_grammar.o := CCVERBOSE =
svccfg_help.po := XGETFLAGS = -a
.KEEP_STATE:
-.PARALLEL: $(OBJS) $(LNTS)
+.PARALLEL: $(OBJS)
all debug: $(PROG)
@@ -161,10 +155,7 @@ svccfg_grammar.h svccfg_grammar.c: svccfg.y
@$(MV) y.tab.c svccfg_grammar.c
clean: FRC
- $(RM) $(MYOBJS) $(MYOBJS:%.o=%-native.o) $(LNTS)
-
-lint: $(LNTS)
- $(LINT.c) $(LINTFLAGS) $(LNTS) $(LDLIBS)
+ $(RM) $(MYOBJS) $(MYOBJS:%.o=%-native.o)
%-native.o: %.c
$(COMPILE.c) -o $@ $<
@@ -178,9 +169,6 @@ lint: $(LNTS)
$(COMPILE.c) $(OUTPUT_OPTION) $<
$(POST_PROCESS_O)
-%.ln: ../common/%.c
- $(LINT.c) $(OUTPUT_OPTION) -c $<
-
include ../../Makefile.targ
FRC:
diff --git a/usr/src/cmd/tcpd/Makefile b/usr/src/cmd/tcpd/Makefile
index 1ff5574989..75353e5bdd 100644
--- a/usr/src/cmd/tcpd/Makefile
+++ b/usr/src/cmd/tcpd/Makefile
@@ -39,9 +39,9 @@ MAPFILE.INT.D= $(MAPFILE.NGB) mapfile-intf-tcpdchk
MAPFILE.INT.M= $(MAPFILE.NGB) mapfile-intf-tcpdmatch
MAPFILE.INT.F= $(MAPFILE.NGB) mapfile-intf-tryfrom
-tcpdchk := LDFLAGS +=$(MAPFILE.INT.D:%=-M%)
-tcpdmatch := LDFLAGS +=$(MAPFILE.INT.M:%=-M%)
-try-from := LDFLAGS +=$(MAPFILE.INT.F:%=-M%)
+tcpdchk := LDFLAGS +=$(MAPFILE.INT.D:%=-Wl,-M%)
+tcpdmatch := LDFLAGS +=$(MAPFILE.INT.M:%=-Wl,-M%)
+try-from := LDFLAGS +=$(MAPFILE.INT.F:%=-Wl,-M%)
.KEEP_STATE:
@@ -52,8 +52,6 @@ install: all $(ROOTUSRSBINPROG)
clean:
$(RM) *.o
-lint: lint_PROG
-
TCPDMATCH_OBJ= tcpdmatch.o fakelog.o inetcf.o scaffold.o
tcpdmatch: $(TCPDMATCH_OBJ) $(LIB) $(MAPFILE.INTF.M)
@@ -95,7 +93,7 @@ NETGROUP = -DNETGROUP
# module, which also gives hints on how to add your own extensions.
# Uncomment the next definition to turn on the language extensions
# (examples: allow, deny, banners, twist and spawn).
-#
+#
STYLE = -DPROCESS_OPTIONS # Enable language extensions.
################################################################
@@ -105,11 +103,11 @@ STYLE = -DPROCESS_OPTIONS # Enable language extensions.
# sendmail transaction logs. See your /etc/syslog.conf file for actual
# path names of logfiles. The tutorial section in the README file
# gives a brief introduction to the syslog daemon.
-#
+#
# Change the FACILITY definition below if you disagree with the default
# disposition. Some syslog versions (including Ultrix 4.x) do not provide
# this flexibility.
-#
+#
# If nothing shows up on your system, it may be that the syslog records
# are sent to a dedicated loghost. It may also be that no syslog daemon
# is running at all. The README file gives pointers to surrogate syslog
@@ -133,7 +131,7 @@ SEVERITY= LOG_INFO # LOG_INFO is normally not logged to the console
# It is a good idea to edit your /etc/rc* files so that they begin with
# an explicit umask setting. On our site we use `umask 022' because it
# does not break anything yet gives adequate protection against tampering.
-#
+#
# The following macro specifies the default umask for processes run under
# control of the daemon wrappers. Comment it out only if you are certain
# that inetd and its children are started with a safe umask value.
@@ -191,7 +189,7 @@ TABLES = -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\"
# have someone elses host address. This is relevant for network services
# whose authentication depends on host names, such as rsh and rlogin,
# because the network address is used to look up the remote host name.
-#
+#
# The protection is to refuse TCP connections with IP source routing
# options.
#
diff --git a/usr/src/cmd/tic/Makefile.common b/usr/src/cmd/tic/Makefile.common
index 0303635751..00c0948db7 100644
--- a/usr/src/cmd/tic/Makefile.common
+++ b/usr/src/cmd/tic/Makefile.common
@@ -40,7 +40,7 @@ CPPFLAGS += -I$(SRC)/lib/libcurses/screen
LDLIBS += -lcurses
MAPFILES= $(MAPFILE.INT) $(MAPFILE.NGB)
-LDFLAGS += $(MAPFILES:%=-M%)
+LDFLAGS += $(MAPFILES:%=-Wl,-M%)
CERRWARN += -_gcc=-Wno-char-subscripts
CERRWARN += -_gcc=-Wno-implicit-function-declaration
diff --git a/usr/src/cmd/trapstat/capabilities/Makefile.com b/usr/src/cmd/trapstat/capabilities/Makefile.com
index ffc21851dd..4da59e852a 100644
--- a/usr/src/cmd/trapstat/capabilities/Makefile.com
+++ b/usr/src/cmd/trapstat/capabilities/Makefile.com
@@ -26,7 +26,7 @@
include $(SRC)/cmd/Makefile.cmd
MAPFILE-CAP = mapfile-cap
-MAPOPT-CAP = $(MAPFILE-CAP:%=-M%)
+MAPOPT-CAP = $(MAPFILE-CAP:%=-Wl,-M%)
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(SRC)/uts/sun4 -I../../sun4 -D$(PLATFORM)
diff --git a/usr/src/cmd/trapstat/capabilities/Makefile.targ b/usr/src/cmd/trapstat/capabilities/Makefile.targ
index f90d8d897a..2dca575d00 100644
--- a/usr/src/cmd/trapstat/capabilities/Makefile.targ
+++ b/usr/src/cmd/trapstat/capabilities/Makefile.targ
@@ -37,7 +37,7 @@
#
# These object capabilities relocatable objects are then translated into symbol
# capabilities relocatable objects, pics/symcap.o.
-#
+#
# The sun4u and sun4v families of symbol capabilities object are eventually
# included in the final build of trapstat.
@@ -48,7 +48,7 @@ $(OBJCAP): $(OBJECTS)
# to this object, and define the interface.
objcap.o: $(OBJECTS) $(MAPFILE-CAP)
- $(LD) -r -o $@ $(MAPOPT-CAP) -Breduce $(OBJECTS)
+ $(LD) -r -o $@ $(MAPOPT-CAP) $(BREDUCE) $(OBJECTS)
# Convert the combined object capabilities object into a symbol capabilities
# object.
@@ -65,6 +65,4 @@ symcap.o: $(OBJCAP)
clean:
$(RM) $(OBJECTS)
-lint:
-
include $(SRC)/cmd/Makefile.targ
diff --git a/usr/src/cmd/ttymon/Makefile b/usr/src/cmd/ttymon/Makefile
index ae70a2619c..3d28b74ce4 100644
--- a/usr/src/cmd/ttymon/Makefile
+++ b/usr/src/cmd/ttymon/Makefile
@@ -40,10 +40,10 @@ TTYMONOBJ= ttymon.o tmglobal.o tmhandler.o tmpmtab.o tmttydefs.o \
tmutmp.o tmpeek.o tmlog.o tmlock.o tmutil.o tmexpress.o \
sttytable.o sttyparse.o ulockf.o
-TTYADMOBJ= ttyadm.o tmutil.o admutil.o
+TTYADMOBJ= ttyadm.o tmutil.o admutil.o
STTYDEFSOBJ= sttydefs.o admutil.o tmttydefs.o tmparse.o sttytable.o \
- sttyparse.o
+ sttyparse.o
OBJS= $(STTYOBJ) $(XPG4STTYOBJ) $(TTYMONOBJ) $(TTYADMOBJ) $(STTYDEFSOBJ)
STTYSRC= stty.c sttytable.c sttyparse.c
@@ -56,7 +56,7 @@ SRCS= $(STTYSRC) $(TTYMONSRC) $(TTYADMSRC) $(STTYDEFSSRC)
include ../Makefile.cmd
-# If machine name and /etc/issue file need to be printed
+# If machine name and /etc/issue file need to be printed
# before the service prompt is printed, then: CPPFLAGS += -DSYS_NAME
# If debug is needed, then: CPPFLAGS += -DDEBUG
# fix for 1111333 - turn on SYS_NAME so /etc/issue will be read if it exists
@@ -70,9 +70,8 @@ ttymon := LDLIBS += -lnsl -lsec -ldevinfo
$(STTYOBJ) := CPPFLAGS += -DEUC
$(XPG4STTYOBJ) := CPPFLAGS += -DEUC
-LINTFLAGS = -b -x
CFLAGS += $(CCVERBOSE)
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
CERRWARN += -_gcc=-Wno-parentheses
CERRWARN += -_gcc=-Wno-unused-variable
@@ -162,10 +161,4 @@ $(DIRS):
clean:
$(RM) $(OBJS)
-lint:
- $(LINT.c) $(STTYSRC)
- $(LINT.c) $(TTYMONSRC)
- $(LINT.c) $(TTYADMSRC)
- $(LINT.c) $(STTYDEFSSRC)
-
include ../Makefile.targ
diff --git a/usr/src/cmd/vi/port/Makefile b/usr/src/cmd/vi/port/Makefile
index bd35a08e69..a94b94bbc8 100644
--- a/usr/src/cmd/vi/port/Makefile
+++ b/usr/src/cmd/vi/port/Makefile
@@ -84,14 +84,13 @@ $(__GNUC4)CERRWARN += -_gcc=-Wno-array-bounds
# vi maintains its own versions of various routines from libc and libcurses,
# so localize all symbols to avoid name space collisions.
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
CLOBBERFILES += $(LIBPROGS)
ex := LDLIBS += -lmapmalloc -lcurses -lgen -lcrypt_i
$(XPG4) := LDLIBS += -lmapmalloc -lcurses -lgen -lcrypt_i
$(XPG6) := LDLIBS += -lmapmalloc -lcurses -lgen -lcrypt_i
exrecover := LDLIBS += -lmapmalloc -lcrypt_i
-lint := LDLIBS += -lmapmalloc -lcurses -lgen -lcrypt
ROOTLIBPROGS= $(LIBPROGS:%=$(ROOTLIB)/%)
@@ -175,6 +174,4 @@ $(ROOTXPG6LINKS): $(ROOTXPG6PROG)
clean:
$(RM) $(OBJS)
-lint: lint_SRCS
-
include ../../Makefile.targ
diff --git a/usr/src/cmd/ypcmd/Makefile b/usr/src/cmd/ypcmd/Makefile
index c94e593bd7..ffcdc1b6c5 100644
--- a/usr/src/cmd/ypcmd/Makefile
+++ b/usr/src/cmd/ypcmd/Makefile
@@ -59,7 +59,7 @@ $(LNSLPROG) := LDLIBS += -lnsl
$(NIS2LDAPPROG) := LDLIBS += -lc -lnsl -lnisdb
stdethers := LDLIBS += -lsocket
makedbm := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
-makedbm := LDFLAGS += $(MAPFILES:%=-M%)
+makedbm := LDFLAGS += $(MAPFILES:%=-Wl,-M%)
$(ROOTVAR_YP)/aliases := FILEMODE=555
@@ -73,10 +73,10 @@ SUBDIRS = yppasswd mknetid revnetgroup ypupdated yp2lscripts
YPBINDOBJ= yp_b_svc.o yp_b_subr.o rpc_bootstrap.o getlist.o
#
-# Some sort of obsolete idea of common files which are only now used by a
+# Some sort of obsolete idea of common files which are only now used by a
# few minor utilities
#
-COMMONOBJ= getlist.o yp_getalias.o
+COMMONOBJ= getlist.o yp_getalias.o
#
# Objects shared between all the major components
@@ -128,19 +128,19 @@ YPMASTERSRC = $(YPMASTEROBJ:.o=.c)
YPALLSRC = $(YPALLOBJ:.o=.c)
-COMMONSRC = $(COMMONOBJ:.o=.c)
+COMMONSRC = $(COMMONOBJ:.o=.c)
#COMMONCLNTSRC = $(COMMONCLNTOBJ:.o=.c)
SRCS = $(BINSRC) $(SBINSRC) $(NETYPSRC) \
$(COMMONSRC) $(SHAREDSRC)
-CLEANFILES = ypxfrd.h ypxfrd_xdr.c
+CLEANFILES = ypxfrd.h ypxfrd_xdr.c
IBINPROG= $(BINPROG:%=$(ROOTBIN)/%)
ISBINPROG= $(SBINPROG:%=$(ROOTUSRSBIN)/%)
INETYPPROG= $(NETYPPROG:%=$(NETYP)/%)
-INIS2LDAPPROG = $(NIS2LDAPPROG:%=$(NETYP)/%)
+INIS2LDAPPROG = $(NIS2LDAPPROG:%=$(NETYP)/%)
NIS2LDAPINC = -I$(SRC)/lib/libnisdb/yptol
@@ -157,7 +157,7 @@ CERRWARN += -_gcc=-Wno-unused-function
# too many unknown types
SMATCH = off
-ZGUIDANCE = -zguidance=nounused
+ZGUIDANCE = -Wl,-zguidance=nounused
#conditional assignments
ypalias.o := CPPFLAGS= -DMAIN $(CPPFLAGS.master)
@@ -182,7 +182,7 @@ clean:= TARGET= clean
clobber:= TARGET= clobber
cstyle := TARGET= cstyle
-all: $(SHAREDOBJ) $(SUBDIRS) $(PROG) $(TXTS)
+all: $(SHAREDOBJ) $(SUBDIRS) $(PROG) $(TXTS)
# install rules
$(ROOTVAR_YP)/% \
diff --git a/usr/src/cmd/ypcmd/yppasswd/Makefile b/usr/src/cmd/ypcmd/yppasswd/Makefile
index 62cacdc3d1..f028b1262c 100644
--- a/usr/src/cmd/ypcmd/yppasswd/Makefile
+++ b/usr/src/cmd/ypcmd/yppasswd/Makefile
@@ -43,9 +43,9 @@ ROOTDIRS = $(NETSVC) $(NETYP)
#LDLIBS += -lrpcsvc -lnsl -lcrypt -lintl -lgen
LDLIBS += -lnsl -lnisdb -lc
MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
-LDFLAGS += $(MAPFILES:%=-M%)
+LDFLAGS += $(MAPFILES:%=-Wl,-M%)
-ZGUIDANCE = -zguidance=nounused
+ZGUIDANCE = -Wl,-zguidance=nounused
# Pick up includes from library
CPPFLAGS += -I$(SRC)/lib/libnisdb/yptol
@@ -71,7 +71,7 @@ SMATCH=off
#
SHAREDOBJ= ../shared/utils.o ../shared/lockmap.o ../shared/ancil.o
-OBJS = $(RPCYPPASSWDDOBJ) \
+OBJS = $(RPCYPPASSWDDOBJ) \
$(COMMONOBJ)
# $(YPPWCONVOBJ) $(YPPASSMGMTOBJ)
diff --git a/usr/src/cmd/zonecfg/Makefile b/usr/src/cmd/zonecfg/Makefile
index c551d7073a..b4e3d585eb 100644
--- a/usr/src/cmd/zonecfg/Makefile
+++ b/usr/src/cmd/zonecfg/Makefile
@@ -35,7 +35,7 @@ include ../Makefile.ctf
# still export a number of "yy*" (libl) interfaces. Reduce all other symbols
# to local scope.
MAPFILES += $(MAPFILE.LEX) $(MAPFILE.NGB)
-MAPOPTS = $(MAPFILES:%=-M%)
+MAPOPTS = $(MAPFILES:%=-Wl,-M%)
LFLAGS = -t
YFLAGS = -d -b zonecfg_grammar
@@ -82,10 +82,4 @@ check: $(PROG).c $(PROG).h
clean:
$(RM) $(OBJS) $(CLEANFILES)
-#
-# We don't do lint of lex- and yacc- generated source files
-#
-lint:
- $(LINT.c) -c $(PROG).c $(LDLIBS)
-
include ../Makefile.targ
diff --git a/usr/src/common/mapfiles/gen/Makefile b/usr/src/common/mapfiles/gen/Makefile
index f49787d1fa..300683f981 100644
--- a/usr/src/common/mapfiles/gen/Makefile
+++ b/usr/src/common/mapfiles/gen/Makefile
@@ -92,10 +92,10 @@ $(MACH64)_gcc_map.noexeglobs := LINK = $(LINK64.c)
# global.
%map.noexeglobs:main.c $(TEMPLATE1) $(TEMPLATE2)
- $(LINK) -o $(MAIN1) -M$(TEMPLATE1) main.c
+ $(LINK) -o $(MAIN1) -Wl,-M$(TEMPLATE1) main.c
$(ELFDUMP) -s -N.dynsym $(MAIN1) | $(EGREP) "WEAK|GLOB" | \
$(GREP) -v UNDEF | $(AWK) '{print $$9 }' | $(SORT) > $(SYMS1)
- $(LINK) -o $(MAIN2) -M$(TEMPLATE2) main.c
+ $(LINK) -o $(MAIN2) -Wl,-M$(TEMPLATE2) main.c
$(ELFDUMP) -s -N.dynsym $(MAIN2) | $(EGREP) "WEAK|GLOB" | \
$(GREP) -v UNDEF | $(AWK) '{print $$9 }' | $(SORT) > $(SYMS2)
$(ECHO) "# GENERATED FILE - DO NOT EDIT" > $@
diff --git a/usr/src/lib/Makefile.filter.targ b/usr/src/lib/Makefile.filter.targ
index 76e23fcb62..a9fe870a76 100644
--- a/usr/src/lib/Makefile.filter.targ
+++ b/usr/src/lib/Makefile.filter.targ
@@ -28,7 +28,7 @@
# Override shared object build rule from Makefile.lib. This rule uses $(LD)
# directly to avoid .init and .fini sections being added.
-BUILD.SO = $(LD) $(MAPFILECLASS) -o $@ -G $(DYNFLAGS)
+BUILD.SO = $(LD) $(MAPFILECLASS) -o $@ $(GSHARED) $(DYNFLAGS)
# Since no OBJECTS are used in this build, turn off CTF.
diff --git a/usr/src/lib/Makefile.lib b/usr/src/lib/Makefile.lib
index 83df083ce3..7eee86c18e 100644
--- a/usr/src/lib/Makefile.lib
+++ b/usr/src/lib/Makefile.lib
@@ -145,7 +145,7 @@ USDT_G_PICS= $(PICS)
HSONAME= -h$(SONAME)
DYNFLAGS= $(HSONAME) $(ZTEXT) $(ZDEFS) $(BDIRECT) \
- $(MAPFILES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) \
+ $(MAPFILES:%=-Wl,-M%) $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%) \
$(LDCHECKS)
LDLIBS= $(LDLIBS.lib)
@@ -225,7 +225,7 @@ HSONAMECCC= -h $(SONAMECCC)
# Keep in sync with the standard DYNFLAGS
#
$(DYNLIBCCC):= DYNFLAGS = $(HSONAMECCC) $(ZTEXT) $(ZDEFS) \
- $(MAPFILES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) \
+ $(MAPFILES:%=-Wl,-M%) $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%) \
$(BDIRECT) $(NORUNPATH)
diff --git a/usr/src/lib/abi/apptrace/Makefile.com b/usr/src/lib/abi/apptrace/Makefile.com
index 8fe6427f34..e209d9a730 100644
--- a/usr/src/lib/abi/apptrace/Makefile.com
+++ b/usr/src/lib/abi/apptrace/Makefile.com
@@ -42,7 +42,7 @@ MAPFILES =
# to run amd64 64-bit executables:
ZDEFS =
$(SUPPRESS_LIBS)LDLIBS += -lmapmalloc -lproc -lctf -lc
-$(SUPPRESS_LIBS)ZDEFS = -zdefs
+$(SUPPRESS_LIBS)ZDEFS = -Wl,-zdefs
all: $(LIBS)
diff --git a/usr/src/lib/brand/shared/librtld_db/Makefile.com b/usr/src/lib/brand/shared/librtld_db/Makefile.com
index ec5d706d43..1a1e65f392 100644
--- a/usr/src/lib/brand/shared/librtld_db/Makefile.com
+++ b/usr/src/lib/brand/shared/librtld_db/Makefile.com
@@ -44,7 +44,7 @@ UTSBASE = $(SRC)/uts
# brand plugin library can use to access a target process are the
# proc_service(3PROC) apis.
#
-DYNFLAGS += $(VERSREF) -M$(BRAND_SHARED)/librtld_db/common/mapfile-vers
+DYNFLAGS += $(VERSREF) -Wl,-M$(BRAND_SHARED)/librtld_db/common/mapfile-vers
LIBS = $(DYNLIB)
LDLIBS += -lc -lrtld_db
CFLAGS += $(CCVERBOSE)
diff --git a/usr/src/lib/brand/sn1/sn1_brand/Makefile.com b/usr/src/lib/brand/sn1/sn1_brand/Makefile.com
index 38435fc044..83c501ca3d 100644
--- a/usr/src/lib/brand/sn1/sn1_brand/Makefile.com
+++ b/usr/src/lib/brand/sn1/sn1_brand/Makefile.com
@@ -70,7 +70,7 @@ DYNFLAGS += $(BLOCAL) $(ZNOVERSION) -Wl,-e_start
#DYNFLAGS += -R$(NATIVE_DIR)/lib -R$(NATIVE_DIR)/usr/lib
LDLIBS += -lmapmalloc -lc
-ZGUIDANCE = -zguidance=nounused
+ZGUIDANCE = -Wl,-zguidance=nounused
$(LIBS):= PICS += $(SHAREDOBJS)
.KEEP_STATE:
diff --git a/usr/src/lib/c_synonyms/Makefile.com b/usr/src/lib/c_synonyms/Makefile.com
index ece376e15d..bf6d25c14d 100644
--- a/usr/src/lib/c_synonyms/Makefile.com
+++ b/usr/src/lib/c_synonyms/Makefile.com
@@ -30,10 +30,10 @@ OBJECTS = synonyms.o
include ../../Makefile.lib
include ../../Makefile.rootfs
-LIBS = $(DYNLIB)
-LDLIBS += -lc
+LIBS = $(DYNLIB)
+LDLIBS += -lc
-BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(LDLIBS)
+BUILD.SO = $(LD) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(LDLIBS)
CLEANFILES += synonym_list mapfile-vers
diff --git a/usr/src/lib/c_synonyms/amd64/Makefile b/usr/src/lib/c_synonyms/amd64/Makefile
index f7402f33aa..751a5fab30 100644
--- a/usr/src/lib/c_synonyms/amd64/Makefile
+++ b/usr/src/lib/c_synonyms/amd64/Makefile
@@ -28,6 +28,6 @@ ASFLAGS= $(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(amd64_AS_XARCH)
include ../Makefile.com
include ../../Makefile.lib.64
-BUILD.SO= $(LD) -o $@ -G -64 $(DYNFLAGS) $(PICS) $(LDLIBS)
+BUILD.SO= $(LD) -o $@ $(GSHARED) -64 $(DYNFLAGS) $(PICS) $(LDLIBS)
install: all $(ROOTLIBS64)
diff --git a/usr/src/lib/c_synonyms/sparcv9/Makefile b/usr/src/lib/c_synonyms/sparcv9/Makefile
index 0f5cceeeb9..8ce15fe649 100644
--- a/usr/src/lib/c_synonyms/sparcv9/Makefile
+++ b/usr/src/lib/c_synonyms/sparcv9/Makefile
@@ -28,6 +28,6 @@ ASFLAGS= $(AS_PICFLAGS) -P -D__STDC__ -D_ASM $(sparcv9_AS_XARCH)
include ../Makefile.com
include ../../Makefile.lib.64
-BUILD.SO= $(LD) -o $@ -G -64 $(DYNFLAGS) $(PICS) $(LDLIBS)
+BUILD.SO= $(LD) -o $@ $(GSHARED) -64 $(DYNFLAGS) $(PICS) $(LDLIBS)
install: all $(ROOTLIBS64)
diff --git a/usr/src/lib/efcode/extend/sparcv9/Makefile b/usr/src/lib/efcode/extend/sparcv9/Makefile
index 4c18f69631..aac5b13724 100644
--- a/usr/src/lib/efcode/extend/sparcv9/Makefile
+++ b/usr/src/lib/efcode/extend/sparcv9/Makefile
@@ -22,12 +22,10 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
include ../Makefile.com
include $(SRC)/lib/Makefile.lib.64
-DYNFLAGS += $(FCODE64) -Mmapfile-extern
+DYNFLAGS += $(FCODE64) -Wl,-Mmapfile-extern
install: all $(ROOTLIBS64)
diff --git a/usr/src/lib/efcode/interpreter/Makefile b/usr/src/lib/efcode/interpreter/Makefile
index b8ee762d46..d0099ae275 100644
--- a/usr/src/lib/efcode/interpreter/Makefile
+++ b/usr/src/lib/efcode/interpreter/Makefile
@@ -36,7 +36,7 @@ CPPFLAGS += -DDEBUG -DFCODE_INTERNAL
CPPFLAGS += -I ../include -I $(ROOT)/usr/platform/sun4u/include
CERRWARN += -_gcc=-Wno-unused-variable
CERRWARN += $(CNOWARN_UNINIT)
-LDFLAGS += -R/usr/lib/efcode/$(MACH64) -M mapfile64
+LDFLAGS += -R/usr/lib/efcode/$(MACH64) -Wl,-Mmapfile64
LIBS = fcode.so fcdriver.so
$(PROG) := LDLIBS += -L$(ADJUNCT_PROTO)/usr/lib/efcode/$(MACH64) \
diff --git a/usr/src/lib/efcode/packages/sparcv9/Makefile b/usr/src/lib/efcode/packages/sparcv9/Makefile
index 9147403a9e..f0c459a15b 100644
--- a/usr/src/lib/efcode/packages/sparcv9/Makefile
+++ b/usr/src/lib/efcode/packages/sparcv9/Makefile
@@ -22,12 +22,10 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
include ../Makefile.com
include $(SRC)/lib/Makefile.lib.64
-DYNFLAGS += $(FCODE64) -M$(MAPFILE-EXT)
+DYNFLAGS += $(FCODE64) -Wl,-M$(MAPFILE-EXT)
install: all $(ROOTLIBS64)
diff --git a/usr/src/lib/fm/topo/modules/Makefile.plugin b/usr/src/lib/fm/topo/modules/Makefile.plugin
index a1827911a5..c42c02da80 100644
--- a/usr/src/lib/fm/topo/modules/Makefile.plugin
+++ b/usr/src/lib/fm/topo/modules/Makefile.plugin
@@ -63,11 +63,11 @@ MAPFILES = # use APIMAP instead
CSTD = $(CSTD_GNU99)
CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
-CFLAGS += -G $(XREGSFLAG)
+CFLAGS += $(GSHARED) $(XREGSFLAG)
CPPFLAGS += -I.
CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
-LDFLAGS += $(ZIGNORE) -M$(APIMAP)
+LDFLAGS += $(ZIGNORE) -Wl,-M$(APIMAP)
LDLIBS += -L$(ROOTLIBDIR)/fm -ltopo -lnvpair -lc
DYNFLAGS += -R/usr/lib/fm
diff --git a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com
index 5c09e472fc..8664e5a0df 100644
--- a/usr/src/lib/gss_mechs/mech_krb5/Makefile.com
+++ b/usr/src/lib/gss_mechs/mech_krb5/Makefile.com
@@ -316,7 +316,7 @@ LDLIBS += -lgss -lsocket -lresolv -lc -lpkcs11 -lnsl -lkstat
DYNFLAGS += $(ZIGNORE)
# mech lib needs special initialization at load time
-DYNFLAGS += -zinitarray=krb5_ld_init
+DYNFLAGS += -Wl,-zinitarray=krb5_ld_init
objs/%.o pics/%.o: $(SRC)/uts/common/gssapi/%.c
$(COMPILE.c) -o $@ $<
diff --git a/usr/src/lib/iconv_modules/Makefile.iconv b/usr/src/lib/iconv_modules/Makefile.iconv
index 3b48123f64..b9efb3ea15 100644
--- a/usr/src/lib/iconv_modules/Makefile.iconv
+++ b/usr/src/lib/iconv_modules/Makefile.iconv
@@ -47,7 +47,7 @@ CPPFLAGS += -I../../inc -I. -I../../common
CFLAGS += $(C_PICFLAGS) $(GSHARED)
DYNFLAGS= $(GSHARED) $(ZTEXT) $(ZDEFS) $(BDIRECT) \
- $(MAPFILES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
+ $(MAPFILES:%=-Wl,-M%) $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%)
LDLIBS= -lc
diff --git a/usr/src/lib/iconv_modules/euro/utils/Makefile.com b/usr/src/lib/iconv_modules/euro/utils/Makefile.com
index 3e403492f3..be4327787d 100644
--- a/usr/src/lib/iconv_modules/euro/utils/Makefile.com
+++ b/usr/src/lib/iconv_modules/euro/utils/Makefile.com
@@ -26,7 +26,7 @@
include $(SRC)/Makefile.master
include $(SRC)/lib/iconv_modules/Makefile.iconv
-CFLAGS = -Xa -fPIC -G -xO3 -I. $(XREGSFLAG) -D_REENTRANT
+CFLAGS = $(CCMODE) $(C_BIGPICFLAGS) $(GSHARED) $(COPTFLAG) -I. $(XREGSFLAG) -D_REENTRANT
SRCS = 646%8859.c 646da%8859.c 646de%8859.c 646en%8859.c 646es%8859.c 646fr%8859.c 646it%8859.c 646sv%8859.c \
8859%646.c 8859%646da.c 8859%646de.c 8859%646en.c 8859%646es.c 8859%646fr.c 8859%646it.c 8859%646sv.c 8859-1%IBM-037.c \
diff --git a/usr/src/lib/krb5/plugins/preauth/pkinit/Makefile.com b/usr/src/lib/krb5/plugins/preauth/pkinit/Makefile.com
index f8ad41f345..c1d227142f 100644
--- a/usr/src/lib/krb5/plugins/preauth/pkinit/Makefile.com
+++ b/usr/src/lib/krb5/plugins/preauth/pkinit/Makefile.com
@@ -72,8 +72,9 @@ CERRWARN += -_gcc=-Wno-unused-function
SMATCH=off
CFLAGS += $(CCVERBOSE) -I..
-DYNFLAGS += $(KRUNPATH) $(KMECHLIB) -znodelete
+DYNFLAGS += $(KRUNPATH) $(KMECHLIB) $(ZNODELETE)
LDLIBS += -L $(ROOTLIBDIR) -lsunw_crypto -lc
+NATIVE_LIBS += libcrypto.so
ROOTLIBDIR= $(ROOT)/usr/lib/krb5/plugins/preauth
diff --git a/usr/src/lib/libc/amd64/Makefile b/usr/src/lib/libc/amd64/Makefile
index c1cfec6f49..b2aa4f3a58 100644
--- a/usr/src/lib/libc/amd64/Makefile
+++ b/usr/src/lib/libc/amd64/Makefile
@@ -1062,7 +1062,7 @@ CFLAGS64 += $(XSTRCONST)
ALTPICS= $(TRACEOBJS:%=pics/%)
-$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS)
+$(DYNLIB) := BUILD.SO = $(LD) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS)
MAPFILES = $(LIBCDIR)/port/mapfile-vers
diff --git a/usr/src/lib/libc/capabilities/Makefile.com b/usr/src/lib/libc/capabilities/Makefile.com
index f8e9e46331..34f57102b6 100644
--- a/usr/src/lib/libc/capabilities/Makefile.com
+++ b/usr/src/lib/libc/capabilities/Makefile.com
@@ -26,7 +26,7 @@
include $(SRC)/lib/Makefile.lib
MAPFILE-CAP = ../common/mapfile-cap
-MAPOPT-CAP = $(MAPFILE-CAP:%=-M%)
+MAPOPT-CAP = $(MAPFILE-CAP:%=-Wl,-M%)
OBJCAP = pics/objcap.o
SYMCAP = pics/symcap.o
diff --git a/usr/src/lib/libc/capabilities/Makefile.targ b/usr/src/lib/libc/capabilities/Makefile.targ
index d9f7891f22..1691d37898 100644
--- a/usr/src/lib/libc/capabilities/Makefile.targ
+++ b/usr/src/lib/libc/capabilities/Makefile.targ
@@ -43,7 +43,7 @@ pics/%.o: ../../$(ALT_PLATFORM)/common/%.s
# to this object, and define the interface.
pics/objcap.o: $(PICS) $(MAPFILE-CAP)
- $(LD) -r -o $@ $(MAPOPT-CAP) -Breduce $(PICS)
+ $(LD) -r -o $@ $(MAPOPT-CAP) $(BREDUCE) $(PICS)
$(POST_PROCESS_OBJCAP_O)
# Convert the combined object capabilities object into a symbol capabilities
diff --git a/usr/src/lib/libc/i386/Makefile.com b/usr/src/lib/libc/i386/Makefile.com
index 0b26928f41..293014892a 100644
--- a/usr/src/lib/libc/i386/Makefile.com
+++ b/usr/src/lib/libc/i386/Makefile.com
@@ -1111,7 +1111,7 @@ CFLAGS += $(XSTRCONST)
ALTPICS= $(TRACEOBJS:%=pics/%)
-$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) \
+$(DYNLIB) := BUILD.SO = $(LD) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(ALTPICS) \
$(EXTPICS) $(LDLIBS)
MAPFILES = $(LIBCDIR)/port/mapfile-vers
diff --git a/usr/src/lib/libc/i386_hwcap1/Makefile b/usr/src/lib/libc/i386_hwcap1/Makefile
index 42fa4d5cae..a9ce500424 100644
--- a/usr/src/lib/libc/i386_hwcap1/Makefile
+++ b/usr/src/lib/libc/i386_hwcap1/Makefile
@@ -23,10 +23,6 @@
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# lib/libc/i386_hwcap1/Makefile
-#
LIBCBASE= ../i386
@@ -34,7 +30,7 @@ LIBRARY= libc_hwcap1.a
EXTN_CPPFLAGS= -D_CMOV_INSN -D_SSE_INSN -D_MMX_INSN -D_SEP_INSN
EXTN_CFLAGS= -xtarget=pentium_pro
-EXTN_DYNFLAGS= -M mapfile
+EXTN_DYNFLAGS= -Wl,-Mmapfile
# Defining this means build targets will first try to use source from this
# directory before falling back to unoptimized i386 source.
diff --git a/usr/src/lib/libc/i386_hwcap3/Makefile b/usr/src/lib/libc/i386_hwcap3/Makefile
index 39725b9b5b..a3d925770c 100644
--- a/usr/src/lib/libc/i386_hwcap3/Makefile
+++ b/usr/src/lib/libc/i386_hwcap3/Makefile
@@ -22,10 +22,6 @@
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
-# lib/libc/i386_hwcap3/Makefile
-#
LIBCBASE= ../i386
@@ -33,7 +29,7 @@ LIBRARY= libc_hwcap3.a
EXTN_CPPFLAGS= -D_CMOV_INSN -D_SSE_INSN -D_MMX_INSN
EXTN_CFLAGS= -xtarget=pentium_pro
-EXTN_DYNFLAGS= -M mapfile
+EXTN_DYNFLAGS= -Wl,-Mmapfile
# Defining this means build targets will first try to use source from this
# directory before falling back to unoptimized i386 source.
diff --git a/usr/src/lib/libc/sparc/Makefile.com b/usr/src/lib/libc/sparc/Makefile.com
index 8d30949022..da5a4b541a 100644
--- a/usr/src/lib/libc/sparc/Makefile.com
+++ b/usr/src/lib/libc/sparc/Makefile.com
@@ -1135,7 +1135,7 @@ CFLAGS += $(XSTRCONST)
ALTPICS= $(TRACEOBJS:%=pics/%)
-$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS)
+$(DYNLIB) := BUILD.SO = $(LD) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS)
MAPFILES = $(LIBCDIR)/port/mapfile-vers
diff --git a/usr/src/lib/libc/sparcv9/Makefile.com b/usr/src/lib/libc/sparcv9/Makefile.com
index a0494d3cb5..7f659225d0 100644
--- a/usr/src/lib/libc/sparcv9/Makefile.com
+++ b/usr/src/lib/libc/sparcv9/Makefile.com
@@ -1076,7 +1076,7 @@ CFLAGS64 += $(XSTRCONST)
ALTPICS= $(TRACEOBJS:%=pics/%)
-$(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS)
+$(DYNLIB) := BUILD.SO = $(LD) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS)
MAPFILES = $(LIBCDIR)/port/mapfile-vers
diff --git a/usr/src/lib/libc_db/amd64/Makefile b/usr/src/lib/libc_db/amd64/Makefile
index 99231f7c40..ed93694a91 100644
--- a/usr/src/lib/libc_db/amd64/Makefile
+++ b/usr/src/lib/libc_db/amd64/Makefile
@@ -31,7 +31,7 @@ include ../../Makefile.lib.64
CPPFLAGS += -D_SYSCALL32
-BUILD.SO= $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(LDLIBS)
+BUILD.SO= $(LD) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(LDLIBS)
install: all $(ROOTLIBDIR64) .WAIT $(ROOTLIBS64) $(ROOTLINKS64) \
$(ROOTCOMPATLINKS64)
diff --git a/usr/src/lib/libc_db/i386/Makefile b/usr/src/lib/libc_db/i386/Makefile
index 5e1faf8ef7..d84f565225 100644
--- a/usr/src/lib/libc_db/i386/Makefile
+++ b/usr/src/lib/libc_db/i386/Makefile
@@ -28,7 +28,7 @@ CRTSRCS= ../../crt/i386
include ../Makefile.com
-BUILD.SO= $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(LDLIBS)
+BUILD.SO= $(LD) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(LDLIBS)
install: all $(ROOTLIBDIR) .WAIT $(ROOTLIBS) $(ROOTLINKS) \
$(ROOTCOMPATLINKS)
diff --git a/usr/src/lib/libc_db/sparc/Makefile b/usr/src/lib/libc_db/sparc/Makefile
index 64b7326c93..269ca8c56e 100644
--- a/usr/src/lib/libc_db/sparc/Makefile
+++ b/usr/src/lib/libc_db/sparc/Makefile
@@ -28,7 +28,7 @@ CRTSRCS= ../../crt/sparc
include ../Makefile.com
-BUILD.SO= $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(LDLIBS)
+BUILD.SO= $(LD) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(LDLIBS)
install: all $(ROOTLIBDIR) .WAIT $(ROOTLIBS) $(ROOTLINKS) \
$(ROOTCOMPATLINKS)
diff --git a/usr/src/lib/libc_db/sparcv9/Makefile b/usr/src/lib/libc_db/sparcv9/Makefile
index 6e0e5d6357..f98dd8443f 100644
--- a/usr/src/lib/libc_db/sparcv9/Makefile
+++ b/usr/src/lib/libc_db/sparcv9/Makefile
@@ -31,7 +31,7 @@ include ../../Makefile.lib.64
CPPFLAGS += -D_SYSCALL32
-BUILD.SO= $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(LDLIBS)
+BUILD.SO= $(LD) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) $(LDLIBS)
install: all $(ROOTLIBDIR64) .WAIT $(ROOTLIBS64) $(ROOTLINKS64) \
$(ROOTCOMPATLINKS64)
diff --git a/usr/src/lib/libdtrace/Makefile.com b/usr/src/lib/libdtrace/Makefile.com
index 217c66ae77..e2296ca468 100644
--- a/usr/src/lib/libdtrace/Makefile.com
+++ b/usr/src/lib/libdtrace/Makefile.com
@@ -231,12 +231,12 @@ pics/%.o: ../$(MACH)/%.s
$(POST_PROCESS_O)
$(DRTIOBJ): $(DRTIOBJS)
- $(LD) -o $@ -r -Blocal -Breduce $(DRTIOBJS)
+ $(LD) -o $@ -r $(BLOCAL) $(BREDUCE) $(DRTIOBJS)
$(POST_PROCESS_O)
$(LIBDAUDIT): $(LIBDAUDITOBJS)
$(LINK.c) -o $@ $(GSHARED) -h$(LIBDAUDIT) $(ZTEXT) $(ZDEFS) $(BDIRECT) \
- $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) $(LIBDAUDITOBJS) \
+ $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%) $(LIBDAUDITOBJS) \
$(LIBDAUDITLIBS)
$(POST_PROCESS_SO)
diff --git a/usr/src/lib/libfru/i386/Makefile b/usr/src/lib/libfru/i386/Makefile
index e04d11b309..1c56c402d9 100644
--- a/usr/src/lib/libfru/i386/Makefile
+++ b/usr/src/lib/libfru/i386/Makefile
@@ -30,7 +30,7 @@ LDLIBS += -L$(SRC)/lib/libfruutils/$(MACH) -lfruutils
LDLIBS += -L$(SRC)/lib/libfru/libfrureg/$(MACH) -lfrureg
# Redefine this such that libC is found.
-BUILDCCC.SO= $(LINK.cc) $(DYNFLAGS) -o $@ -G $(PICS) $(LDLIBS)
+BUILDCCC.SO= $(LINK.cc) $(DYNFLAGS) -o $@ $(GSHARED) $(PICS) $(LDLIBS)
install: all $(ROOTLIBDIR) $(ROOTLINKSCCC)
diff --git a/usr/src/lib/libfru/sparc/Makefile b/usr/src/lib/libfru/sparc/Makefile
index 72c01007d7..de9c2c42cf 100644
--- a/usr/src/lib/libfru/sparc/Makefile
+++ b/usr/src/lib/libfru/sparc/Makefile
@@ -23,10 +23,6 @@
# Copyright (c) 2000-2001 by Sun Microsystems, Inc.
# All rights reserved.
#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# lib/libfru/sparc/Makefile
-#
include ../Makefile.obj
include ../Makefile.flag
@@ -34,7 +30,7 @@ LDLIBS += -L$(SRC)/lib/libfruutils/$(MACH) -lfruutils
LDLIBS += -L$(SRC)/lib/libfru/libfrureg/$(MACH) -lfrureg
# Redefine this such that libC is found.
-BUILDCCC.SO= $(LINK.cc) $(DYNFLAGS) -o $@ -G $(PICS) $(LDLIBS)
+BUILDCCC.SO= $(LINK.cc) $(DYNFLAGS) -o $@ $(GSHARED) $(PICS) $(LDLIBS)
install: all $(ROOTLIBDIR) $(ROOTLINKSCCC)
diff --git a/usr/src/lib/libm1/Makefile.com b/usr/src/lib/libm1/Makefile.com
index 5672bea95b..6ba8e1d6c5 100644
--- a/usr/src/lib/libm1/Makefile.com
+++ b/usr/src/lib/libm1/Makefile.com
@@ -31,7 +31,7 @@ SRCDIR = ../common/
CPPFLAGS += -DLIBM_BUILD
MAPFILEDIR = ../common/
-DYNFLAGS += -zignore -Wl,-F'libm.so.2'
+DYNFLAGS += $(ZIGNORE) -Wl,-F'libm.so.2'
COMPATLINKS = usr/lib/$(DYNLIB)
COMPATLINKS64 = usr/lib/$(MACH64)/$(DYNLIB)
diff --git a/usr/src/lib/libmd/amd64/Makefile b/usr/src/lib/libmd/amd64/Makefile
index aab8d061a9..853ec22b8a 100644
--- a/usr/src/lib/libmd/amd64/Makefile
+++ b/usr/src/lib/libmd/amd64/Makefile
@@ -74,7 +74,7 @@ pics/%.o: $(SRC)/common/crypto/sha2/amd64/%.s
$(POST_PROCESS_O)
pics/%.o.objcap: pics/%.o
- $(LD) -r -o $@ -M$(CAPFILE) -Breduce $<
+ $(LD) -r -o $@ -Wl,-M$(CAPFILE) $(BREDUCE) $<
$(POST_PROCESS_O)
pics/%.o.symcap: pics/%.o.objcap
diff --git a/usr/src/lib/libmd/capabilities/Makefile.com b/usr/src/lib/libmd/capabilities/Makefile.com
index 7c550fb533..6b3973b9ba 100644
--- a/usr/src/lib/libmd/capabilities/Makefile.com
+++ b/usr/src/lib/libmd/capabilities/Makefile.com
@@ -26,7 +26,7 @@
#include ../../../Makefile.com
MAPFILE-CAP = ../common/mapfile-cap
-MAPOPT-CAP = $(MAPFILE-CAP:%=-M%)
+MAPOPT-CAP = $(MAPFILE-CAP:%=-Wl,-M%)
OBJCAP = pics/objcap.o
SYMCAP = pics/symcap.o
diff --git a/usr/src/lib/libmd/capabilities/Makefile.targ b/usr/src/lib/libmd/capabilities/Makefile.targ
index 86815a1987..8af0f75328 100644
--- a/usr/src/lib/libmd/capabilities/Makefile.targ
+++ b/usr/src/lib/libmd/capabilities/Makefile.targ
@@ -60,7 +60,7 @@ $(PICS): pics
# to this object, and define the interface.
pics/objcap.o: $(PICS) $(MAPFILE-CAP)
- $(LD) -r -o $@ $(MAPOPT-CAP) -Breduce $(PICS)
+ $(LD) -r -o $@ $(MAPOPT-CAP) $(BREDUCE) $(PICS)
# Convert the combined object capabilities object into a symbol capabilities
# object.
diff --git a/usr/src/lib/libmp/i386/Makefile b/usr/src/lib/libmp/i386/Makefile
index c51c018c88..172ce9cf3a 100644
--- a/usr/src/lib/libmp/i386/Makefile
+++ b/usr/src/lib/libmp/i386/Makefile
@@ -41,8 +41,8 @@ $(ROOTLIBDIR)/$(OLIBRARY) := FILEMODE= 755
$(OLIBRARY): pics/pics_mp.o libmp.so.2 $(OMAPFILE)
$(CC) $(CFLAGS) -o $@ $(GSHARED) -h $(OLIBRARY) $(ZTEXT) $(ZDEFS) \
- $(BDIRECT) pics/pics_mp.o libmp.so.2 -M$(OMAPFILE) \
- $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
+ $(BDIRECT) pics/pics_mp.o libmp.so.2 -Wl,-M$(OMAPFILE) \
+ $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%)
$(POST_PROCESS_SO)
pics/pics_mp.o:
diff --git a/usr/src/lib/libmp/sparc/Makefile b/usr/src/lib/libmp/sparc/Makefile
index 8bb9a77528..7f903f338d 100644
--- a/usr/src/lib/libmp/sparc/Makefile
+++ b/usr/src/lib/libmp/sparc/Makefile
@@ -41,8 +41,8 @@ $(ROOTLIBDIR)/$(OLIBRARY) := FILEMODE= 755
$(OLIBRARY): pics/pics_mp.o libmp.so.2 $(OMAPFILE)
$(CC) $(CFLAGS) -o $@ $(GSHARED) -h $(OLIBRARY) $(ZTEXT) $(ZDEFS) \
- $(BDIRECT) $(ZCOMBRELOC) pics/pics_mp.o libmp.so.2 -M$(OMAPFILE) \
- $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
+ $(BDIRECT) $(ZCOMBRELOC) pics/pics_mp.o libmp.so.2 -Wl,-M$(OMAPFILE) \
+ $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%)
$(POST_PROCESS_SO)
pics/pics_mp.o:
diff --git a/usr/src/lib/libumem/Makefile.com b/usr/src/lib/libumem/Makefile.com
index 21ddb07c76..876940f995 100644
--- a/usr/src/lib/libumem/Makefile.com
+++ b/usr/src/lib/libumem/Makefile.com
@@ -120,8 +120,8 @@ MAPFILE_SUPPLEMENTAL = $(MAPFILE_SUPPLEMENTAL_$(CURTYPE))
LDLIBS += -lc
-LDFLAGS_standalone = $(ZNOVERSION) $(BREDUCE) -M../common/mapfile-vers \
- -M$(MAPFILE_SUPPLEMENTAL) -dy -r
+LDFLAGS_standalone = $(ZNOVERSION) $(BREDUCE) -Wl,-M../common/mapfile-vers \
+ -Wl,-M$(MAPFILE_SUPPLEMENTAL) -dy -r
LDFLAGS = $(LDFLAGS_$(CURTYPE))
ASFLAGS_standalone = -DUMEM_STANDALONE
diff --git a/usr/src/lib/mpapi/libmpapi/Makefile.com b/usr/src/lib/mpapi/libmpapi/Makefile.com
index eefe784d72..f45bf28652 100644
--- a/usr/src/lib/mpapi/libmpapi/Makefile.com
+++ b/usr/src/lib/mpapi/libmpapi/Makefile.com
@@ -40,8 +40,8 @@ LDLIBS += -lc
CFLAGS += $(CCVERBOSE)
CPPFLAGS += -I$(SRCDIR) -mt $(CCVERBOSE) -D_POSIX_PTHREAD_SEMANTICS
CPPFLAGS += -DBUILD_TIME='"Wed Sep 24 12:00:00 2008"'
-DYNFLAGS += -z finiarray=ExitLibrary
-DYNFLAGS += -z initarray=InitLibrary
+DYNFLAGS += -Wl,-zfiniarray=ExitLibrary
+DYNFLAGS += -Wl,-zinitarray=InitLibrary
CERRWARN += -_gcc=-Wno-type-limits
CERRWARN += -_gcc=-Wno-unused-variable
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/capabilities/Makefile.com b/usr/src/lib/pkcs11/libsoftcrypto/capabilities/Makefile.com
index 7548b023c3..595ffe2148 100644
--- a/usr/src/lib/pkcs11/libsoftcrypto/capabilities/Makefile.com
+++ b/usr/src/lib/pkcs11/libsoftcrypto/capabilities/Makefile.com
@@ -26,7 +26,7 @@
include ../../../Makefile.com
MAPFILE-CAP = ../common/mapfile-cap
-MAPOPT-CAP = $(MAPFILE-CAP:%=-M%)
+MAPOPT-CAP = $(MAPFILE-CAP:%=-Wl,-M%)
OBJCAP = pics/objcap.o
SYMCAP = pics/symcap.o
diff --git a/usr/src/lib/pkcs11/libsoftcrypto/capabilities/Makefile.targ b/usr/src/lib/pkcs11/libsoftcrypto/capabilities/Makefile.targ
index dfd9b10aea..c6f94118c3 100644
--- a/usr/src/lib/pkcs11/libsoftcrypto/capabilities/Makefile.targ
+++ b/usr/src/lib/pkcs11/libsoftcrypto/capabilities/Makefile.targ
@@ -60,7 +60,7 @@ $(PICS): pics
# to this object, and define the interface.
pics/objcap.o: $(PICS) $(MAPFILE-CAP)
- $(LD) -r -o $@ $(MAPOPT-CAP) -Breduce $(PICS)
+ $(LD) -r -o $@ $(MAPOPT-CAP) $(BREDUCE) $(PICS)
# Convert the combined object capabilities object into a symbol capabilities
# object.
diff --git a/usr/src/lib/print/libpapi-lpd/Makefile.com b/usr/src/lib/print/libpapi-lpd/Makefile.com
index 3de91a340b..dfb4c926ce 100644
--- a/usr/src/lib/print/libpapi-lpd/Makefile.com
+++ b/usr/src/lib/print/libpapi-lpd/Makefile.com
@@ -79,7 +79,7 @@ OBJS += $(PROG_OBJS)
LDFLAGS.cmd = \
$(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) $(BDIRECT) \
- $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%)
+ $(MAPFILE.NES:%=-Wl,-M%) $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%)
$(PROG): $(PROG_OBJS)
$(LINK.c) -o $@ $(PROG_OBJS) $(LDFLAGS.cmd) $(LDLIBS)
diff --git a/usr/src/lib/scsi/plugins/scsi/engines/Makefile.engine b/usr/src/lib/scsi/plugins/scsi/engines/Makefile.engine
index 0bad757481..6467bcdbe9 100644
--- a/usr/src/lib/scsi/plugins/scsi/engines/Makefile.engine
+++ b/usr/src/lib/scsi/plugins/scsi/engines/Makefile.engine
@@ -55,15 +55,15 @@ APIMAP = ../../../../../libscsi/libscsi_api.map
CSTD = $(CSTD_GNU99)
CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
-CFLAGS += -G $(XREGSFLAG)
+CFLAGS += $(GSHARED) $(XREGSFLAG)
CFLAGS64 += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
-CFLAGS64 += -G $(XREGSFLAG)
+CFLAGS64 += $(GSHARED) $(XREGSFLAG)
CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
CPPFLAGS += -I../../../../../libscsi/common
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
LDFLAGS += $(ZTEXT) $(ZIGNORE)
-$(PROG) := LDFLAGS += $(ZDEFS) -M$(APIMAP)
+$(PROG) := LDFLAGS += $(ZDEFS) -Wl,-M$(APIMAP)
$(PROG) := LDLIBS += -lc
$(DMODPROG) := LDFLAGS += $(ZNODEFS)
diff --git a/usr/src/lib/scsi/plugins/ses/Makefile.lib b/usr/src/lib/scsi/plugins/ses/Makefile.lib
index 4d9d106f2e..ec23911852 100644
--- a/usr/src/lib/scsi/plugins/ses/Makefile.lib
+++ b/usr/src/lib/scsi/plugins/ses/Makefile.lib
@@ -65,14 +65,14 @@ APIMAP = ../../../../libses/libses_api.map
CSTD = $(CSTD_GNU99)
CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
-CFLAGS += -G $(XREGSFLAG)
+CFLAGS += $(GSHARED) $(XREGSFLAG)
CFLAGS64 += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
-CFLAGS64 += -G $(XREGSFLAG)
+CFLAGS64 += $(GSHARED) $(XREGSFLAG)
CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
LDFLAGS += $(ZTEXT) $(ZIGNORE)
-$(PROG) := LDFLAGS += $(ZDEFS) -M$(APIMAP)
+$(PROG) := LDFLAGS += $(ZDEFS) -Wl,-M$(APIMAP)
$(PROG) := LDLIBS += -lc -lnvpair
$(DMODPROG) := LDFLAGS += $(ZNODEFS)
diff --git a/usr/src/lib/scsi/plugins/smp/Makefile.lib b/usr/src/lib/scsi/plugins/smp/Makefile.lib
index 0474284472..ba955f7b10 100644
--- a/usr/src/lib/scsi/plugins/smp/Makefile.lib
+++ b/usr/src/lib/scsi/plugins/smp/Makefile.lib
@@ -64,14 +64,14 @@ APIMAP = ../../../../libsmp/libsmp_api.map
CSTD = $(CSTD_GNU99)
CFLAGS += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
-CFLAGS += -G $(XREGSFLAG)
+CFLAGS += $(GSHARED) $(XREGSFLAG)
CFLAGS64 += $(CTF_FLAGS) $(CCVERBOSE) $(XSTRCONST) $(CC_PICFLAGS)
-CFLAGS64 += -G $(XREGSFLAG)
+CFLAGS64 += $(GSHARED) $(XREGSFLAG)
CPPFLAGS += -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT
$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
LDFLAGS += $(ZTEXT) $(ZCOMBRELOC) $(ZIGNORE)
-$(PROG) := LDFLAGS += $(ZDEFS) -M$(APIMAP)
+$(PROG) := LDFLAGS += $(ZDEFS) -Wl,-M$(APIMAP)
$(PROG) := LDLIBS += -lc
$(DMODPROG) := LDFLAGS += $(ZNODEFS)
diff --git a/usr/src/man/man3c/qsort.3c b/usr/src/man/man3c/qsort.3c
index 7bfaf50a5d..d596283a81 100644
--- a/usr/src/man/man3c/qsort.3c
+++ b/usr/src/man/man3c/qsort.3c
@@ -19,7 +19,7 @@
.\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
.\" Copyright 2020 Oxide Computer Company
.\"
-.Dd September 11, 2020
+.Dd October 11, 2020
.Dt QSORT 3C
.Os
.Sh NAME
@@ -35,7 +35,8 @@
.Fa "size_t width"
.Fa "int (*compar)(const void *, const void *)"
.Fc
-.Fo qsort
+.Ft void
+.Fo qsort_r
.Fa "void *base"
.Fa "size_t nel"
.Fa "size_t width"
diff --git a/usr/src/psm/stand/boot/sparcv9/sun4/Makefile b/usr/src/psm/stand/boot/sparcv9/sun4/Makefile
index 281d73380c..c4547a7d7d 100644
--- a/usr/src/psm/stand/boot/sparcv9/sun4/Makefile
+++ b/usr/src/psm/stand/boot/sparcv9/sun4/Makefile
@@ -53,7 +53,7 @@ LDFLAGS += -L$(TOPDIR)/psm/stand/lib/promif/$(TARG_MACH)/$(PROMVERS)/common
LIBPLAT_DIR = $(TOPDIR)/psm/stand/lib/promif/$(TARG_MACH)/$(PROMVERS)/$(PLATFORM)
LIBPLAT_LIBS = libplat.a
LIBPLAT_L_LIBS= $(LIBPLAT_LIBS:lib%.a=llib-l%.ln)
-LIBPLAT_DEP = $(LIBPLAT_DIR)/$(LIBPLAT_LIBS)
+LIBPLAT_DEP = $(LIBPLAT_DIR)/$(LIBPLAT_LIBS)
LIBPLAT_DEP_L = $(LIBPLAT_DIR)/$(LIBPLAT_L_LIBS)
#
@@ -66,20 +66,11 @@ include ../Makefile.com
CPPINCS += -I$(TOPDIR)/psm/stand/boot/sparc/sun4
-#
-# Set the choice of compiler.
-
include $(TOPDIR)/psm/Makefile.psm.64
CFLAGS64 += -xchip=ultra $(CCABS32)
#
-# XXX this totally sucks since it effectively turns off -errchk=longptr64,
-# which we really should be using.
-#
-LINTFLAGS64 = $(LINTFLAGS) -m64
-
-#
# Cross-reference customization: include all boot-related source files.
#
STANDLIBDIR= ../../../../../stand/lib
@@ -108,7 +99,7 @@ NFS_DIRS += $(LIBPLAT_DIR:%=-L%) $(LIBPROM_DIR:%=-L%)
# Loader flags used to build inetboot
#
NFS_MAPFILE = $(MACH_DIR)/mapfile
-NFS_LDFLAGS = -dn -M $(NFS_MAPFILE) -e _start $(NFS_DIRS)
+NFS_LDFLAGS = -Wl,-dn -Wl,-M$(NFS_MAPFILE) -e _start $(NFS_DIRS)
NFS_L_LDFLAGS = $(NFS_DIRS)
#
@@ -138,11 +129,6 @@ $(NFSBOOT): $(NFS_MAPFILE) $(NFS_SRT0) $(NFS_OBJS) $(LIBDEPS)
$(MCS) -c $@
$(STRIP) $@
-$(NFSBOOT)_lint: $(NFS_L_OBJS) $(L_LIBDEPS)
- @echo ""
- @echo inetboot lint: global crosschecks:
- $(LINT.c) $(NFS_L_LDFLAGS) $(NFS_L_OBJS) $(NFS_LIBS)
-
$(USR_PLAT_SUN4U_LIB_FS_NFS):
$(INS.dir)
@@ -159,7 +145,7 @@ $(STRIPALIGN): $(CMN_DIR)/$$(@).c
$(NATIVECC) -o $@ $(CMN_DIR)/$@.c
clean:
- $(RM) make.out lint.out
+ $(RM) make.out
$(RM) $(OBJS) $(CONF_OBJS) $(MISC_OBJS) $(SRT0_OBJ)
$(RM) $(NFSBOOT_OBJS)
$(RM) $(L_OBJS) $(CONF_L_OBJS) $(MISC_L_OBJS) $(SRT0_L_OBJ)
@@ -167,5 +153,3 @@ clean:
clobber: clean
$(RM) $(NFSBOOT) $(STRIPALIGN)
-
-lint: $(NFSBOOT)_lint
diff --git a/usr/src/psm/stand/bootlst/common/Makefile.com b/usr/src/psm/stand/bootlst/common/Makefile.com
index 87eea5acd7..5c34d3fd52 100644
--- a/usr/src/psm/stand/bootlst/common/Makefile.com
+++ b/usr/src/psm/stand/bootlst/common/Makefile.com
@@ -30,9 +30,9 @@ include $(TOPDIR)/Makefile.master
include $(TOPDIR)/Makefile.psm
include $(TOPDIR)/psm/stand/lib/Makefile.lib
-SYSDIR = $(TOPDIR)/uts
-COMDIR = ../../common
-STANDDIR = $(TOPDIR)/stand
+SYSDIR = $(TOPDIR)/uts
+COMDIR = ../../common
+STANDDIR = $(TOPDIR)/stand
SALIBDIR = $(STANDDIR)/lib/sa
SALIB = $(SALIBDIR)/libsa.a
@@ -41,13 +41,9 @@ PROMLIB = $(PROMLIBDIR)/libprom.a
SALIBS += $(SALIB) $(PROMLIB)
LDLIBS = -L$(SALIBDIR) -lsa -L$(PROMLIBDIR) -lprom $(LDPLATLIBS)
-LDFLAGS = -dn -M $(MAPFILE) $(MAP_FLAG)
-
-LINTLIBS = $(SALIBDIR)/llib-lsa.ln $(PROMLIBDIR)/llib-lprom.ln $(LINTPLATLIBS)
-LINTFLAGS.lib = -ysxmun
+LDFLAGS = -Wl,-dn -Wl,-M$(MAPFILE) $(MAP_FLAG)
BOOTLSTOBJ += bootlst.o sasubr.o
-BOOTLSTLINTS = $(BOOTLSTOBJ:%.o=%.ln)
CPPDEFS = -D$(ARCH) -D__$(ARCH) -D$(TARG_MACH) -D__$(TARG_MACH)
CPPDEFS += -D_KERNEL -D_MACHDEP -D__ELF
@@ -62,17 +58,13 @@ CPPFLAGS += $(CCYFLAG)$(STANDDIR)
CSTD = $(CSTD_GNU99)
CFLAGS = $(CCVERBOSE) -O $(CSTD)
-ASFLAGS = -P -D_ASM $(CPPDEFS) -DLOCORE -D_LOCORE -D__STDC__
+ASFLAGS = -P -D_ASM $(CPPDEFS) -DLOCORE -D_LOCORE -D__STDC__
AS_CPPFLAGS = $(CPPINCS) $(CPPFLAGS.master)
# install values
LSTFILES= $(ALL:%=$(ROOT_PSM_DIR)/$(ARCH)/%)
FILEMODE= 644
-# lint stuff
-LINTFLAGS += -Dlint
-LOPTS = -hbxn
-
# install rule
$(ROOT_PSM_DIR)/$(ARCH)/%: %
$(INS.file)
@@ -82,22 +74,14 @@ all: $(ALL)
install: all $(LSTFILES)
-
-LINT.c= $(LINT) $(LINTFLAGS.c) $(LINT_DEFS) $(CPPFLAGS) -c
-LINT.s= $(LINT) $(LINTFLAGS.s) $(LINT_DEFS) $(CPPFLAGS) -c
-LINT.2= $(LINT) $(LINTFLAGS.c) $(LINT_DEFS) $(CPPFLAGS)
-
# build rules
%.o: $(COMDIR)/%.c
$(COMPILE.c) -o $@ $<
-%.ln: $(COMDIR)/%.c
- @$(LHEAD) $(LINT.c) $< $(LTAIL)
-
.KEEP_STATE:
-.PARALLEL: $(BOOTLSTOBJ) $(BOOTLSTLINTS)
+.PARALLEL: $(BOOTLSTOBJ)
bootlst: $(MAPFILE) $(BOOTLSTOBJ) $(SALIBS)
$(LD) $(LDFLAGS) -o $@ $(BOOTLSTOBJ) $(LDLIBS)
@@ -106,19 +90,9 @@ bootlst: $(MAPFILE) $(BOOTLSTOBJ) $(SALIBS)
$(SALIBS): FRC
@cd $(@D); $(MAKE) $(MFLAGS)
-$(LINTLIBS): FRC
- @cd $(@D); $(MAKE) $(MFLAGS) $(@F)
-
$(ROOTDIR):
$(INS.dir)
-lint: $(BOOTLSTLINTS) $(LINTLIBS)
- @$(ECHO) "\n$@: global crosschecks:"
- $(LINT.2) $(BOOTLSTLINTS) $(LINTLIBS)
-
-clean.lint:
- $(RM) *.ln
-
clean:
$(RM) *.o *.ln
diff --git a/usr/src/psm/stand/cpr/common/Makefile.com b/usr/src/psm/stand/cpr/common/Makefile.com
index ff5a9504af..e129ebafec 100644
--- a/usr/src/psm/stand/cpr/common/Makefile.com
+++ b/usr/src/psm/stand/cpr/common/Makefile.com
@@ -32,21 +32,18 @@ include $(TOPDIR)/Makefile.master
include $(TOPDIR)/Makefile.psm
include $(TOPDIR)/psm/stand/lib/Makefile.lib
-SYSDIR = $(TOPDIR)/uts
-COMDIR = ../../common
+SYSDIR = $(TOPDIR)/uts
+COMDIR = ../../common
OSDIR = $(SYSDIR)/common/os
-ARCHDIR = $(SYSDIR)/$(ARCH)
-MACHDIR = $(SYSDIR)/$(MACH)
+ARCHDIR = $(SYSDIR)/$(ARCH)
+MACHDIR = $(SYSDIR)/$(MACH)
MMUDIR = $(SYSDIR)/$(MMU)
PROMLIBDIR= $(TOPDIR)/psm/stand/lib/promif/$(ARCH_PROMDIR)
PROMLIB = $(PROMLIBDIR)/libprom.a
SALIBS += $(PROMLIB)
LDLIBS += -L$(PROMLIBDIR) -lprom
-LDFLAGS = -dn -M mapfile $(MAP_FLAG)
-
-LINTLIBS += $(PROMLIBDIR)/llib-lprom.ln
-LINTFLAGS.lib = -ysxmun
+LDFLAGS = -Wl,-dn -Wl,-Mmapfile $(MAP_FLAG)
CPRBOOTOBJ += support.o compress.o
@@ -66,17 +63,13 @@ CPPFLAGS += $(CCYFLAG)$(SYSDIR)/common
CSTD = $(CSTD_GNU99)
CFLAGS = $(CCVERBOSE) -O $(CSTD)
-ASFLAGS = -P -D_ASM $(CPPDEFS) -DLOCORE -D_LOCORE -D__STDC__
+ASFLAGS = -P -D_ASM $(CPPDEFS) -DLOCORE -D_LOCORE -D__STDC__
AS_CPPFLAGS = $(CPPINCS) $(CPPFLAGS.master)
# install values
CPRFILES= $(ALL:%=$(ROOT_PSM_DIR)/$(ARCH)/%)
FILEMODE= 644
-# lint stuff
-LINTFLAGS += -Dlint
-LOPTS = -hbxn
-
# install rule
$(ROOT_PSM_DIR)/$(ARCH)/%: %
$(INS.file)
@@ -86,10 +79,6 @@ all: $(ALL)
install: all $(CPRFILES)
-
-LINT.c= $(LINT) $(LINTFLAGS.c) $(LINT_DEFS) $(CPPFLAGS) -c
-LINT.s= $(LINT) $(LINTFLAGS.s) $(LINT_DEFS) $(CPPFLAGS) -c
-
# build rule
compress.o: $(OSDIR)/compress.c
@@ -98,18 +87,6 @@ compress.o: $(OSDIR)/compress.c
support.o: $(COMDIR)/support.c
$(COMPILE.c) $(COMDIR)/support.c
-compress.ln: $(OSDIR)/compress.c
- @$(LHEAD) $(LINT.c) $(OSDIR)/compress.c $(LTAIL)
-
-support.ln: $(COMDIR)/support.c
- @$(LHEAD) $(LINT.c) $(COMDIR)/support.c $(LTAIL)
-
-%.ln: %.c
- @$(LHEAD) $(LINT.c) $< $(LTAIL)
-
-%.ln: %.s
- @$(LHEAD) $(LINT.s) $< $(LTAIL)
-
.KEEP_STATE:
.PARALLEL: $(CPRBOOTOBJ) $(L_COBJ)
@@ -122,19 +99,9 @@ cprboot: $(CPRBOOT_MAPFILE) $(CPRBOOTOBJ) $(SALIBS)
$(SALIBS): FRC
@cd $(@D); $(MAKE) $(MFLAGS)
-$(LINTLIBS): FRC
- @cd $(@D); $(MAKE) $(MFLAGS) $(@F)
-
$(ROOTDIR):
$(INS.dir)
-lint: $(L_COBJ) $(LINTLIBS)
- @$(ECHO) "\n$@: global crosschecks:"
- @$(LINT.2) $(L_COBJ) $(LDLIBS)
-
-clean.lint:
- $(RM) *.ln
-
clean:
$(RM) *.o *.ln
diff --git a/usr/src/tools/Makefile.tools b/usr/src/tools/Makefile.tools
index 6e51622e65..aeb9449af3 100644
--- a/usr/src/tools/Makefile.tools
+++ b/usr/src/tools/Makefile.tools
@@ -53,11 +53,16 @@ CFLAGS = $(NATIVE_CFLAGS)
CPPFLAGS= -D_TS_ERRNO
ELFSIGN_O= $(TRUE)
LDLIBS=
-LDFLAGS= $(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) \
- $(MAPFILE.PGA:%=-M%) \
+LDFLAGS= $(MAPFILE.NES:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%) \
+ $(MAPFILE.PGA:%=-Wl,-M%) \
$(ZASSERTDEFLIB)=libc.so \
$(BDIRECT)
+# To work around a bootstrapping problem, we can't rely on cw(1) knowing how
+# to translate -shared as we may be using an older one to build the current
+# tools.
+GSHARED = -_cc=-G -_gcc=-shared
+
# Unset CW_LINKER so we run the default. We don't set LD here to avoid taking
# the journey through LD_ALTEXEC unnecessarily.
CW_LINKER=
diff --git a/usr/src/tools/cw/cw.c b/usr/src/tools/cw/cw.c
index 31ba40cb85..594da6fc70 100644
--- a/usr/src/tools/cw/cw.c
+++ b/usr/src/tools/cw/cw.c
@@ -45,7 +45,6 @@
* -# Verbose mode
* -### Show compiler commands built by driver, no compilation
* -A<name[(tokens)]> Preprocessor predicate assertion
- * -B<[static|dynamic]> Specify dynamic or static binding
* -C Prevent preprocessor from removing comments
* -c Compile only - produce .o files, suppress linking
* -cg92 Alias for -xtarget=ss1000
@@ -66,7 +65,6 @@
* -fsingle Use single-precision arithmetic (-Xt and -Xs modes only)
* -ftrap=<t> Select floating-point trapping mode in effect at startup
* -fstore force floating pt. values to target precision on assignment
- * -G Build a dynamic shared library
* -g Compile for debugging
* -H Print path name of each file included during compilation
* -h <name> Assign <name> to generated dynamic shared library
@@ -158,7 +156,6 @@
* -c pass-thru
* -cg92 -m32 -mcpu=v8 -mtune=supersparc (SPARC only)
* -D<name[=token]> pass-thru
- * -dy or -dn -Wl,-dy or -Wl,-dn
* -E pass-thru
* -erroff=E_EMPTY_TRANSLATION_UNIT ignore
* -errtags=%all -Wall
@@ -173,7 +170,6 @@
* -fsingle[=<n>] error
* -ftrap=<t> error
* -fstore error
- * -G pass-thru
* -g pass-thru
* -H pass-thru
* -h <name> pass-thru
@@ -197,8 +193,6 @@
* -Q[y|n] error
* -R<dir[:dir]> pass-thru
* -S pass-thru
- * -s -Wl,-s
- * -t -Wl,-t
* -U<name> pass-thru
* -V --version
* -v -Wall
@@ -823,16 +817,6 @@ do_gcc(cw_ictx_t *ctx)
newae(ctx->i_ae, "-ffreestanding");
break;
case 'd':
- if (arglen == 2) {
- if (strcmp(arg, "-dy") == 0) {
- newae(ctx->i_ae, "-Wl,-dy");
- break;
- }
- if (strcmp(arg, "-dn") == 0) {
- newae(ctx->i_ae, "-Wl,-dn");
- break;
- }
- }
if (strcmp(arg, "-dalign") == 0) {
/*
* -dalign forces alignment in some cases;
@@ -865,10 +849,6 @@ do_gcc(cw_ictx_t *ctx)
}
error(arg);
break;
- case 'G':
- newae(ctx->i_ae, "-shared");
- nolibc = 1;
- break;
case 'k':
if (strcmp(arg, "-keeptmp") == 0) {
newae(ctx->i_ae, "-save-temps");
@@ -896,30 +876,6 @@ do_gcc(cw_ictx_t *ctx)
}
error(arg);
break;
- case 'B': /* linker options */
- case 'M':
- case 'z':
- {
- char *opt;
- size_t len;
- char *s;
-
- if (arglen == 1) {
- opt = *++ctx->i_oldargv;
- if (opt == NULL || *opt == '\0')
- error(arg);
- ctx->i_oldargc--;
- } else {
- opt = arg + 2;
- }
- len = strlen(opt) + 7;
- if ((s = malloc(len)) == NULL)
- nomem();
- (void) snprintf(s, len, "-Wl,-%c%s", c, opt);
- newae(ctx->i_ae, s);
- free(s);
- }
- break;
case 'O':
if (arglen == 1) {
newae(ctx->i_ae, "-O");
@@ -940,19 +896,14 @@ do_gcc(cw_ictx_t *ctx)
nolibc = 1;
break;
case 's':
- if (arglen == 1) {
- newae(ctx->i_ae, "-Wl,-s");
- break;
- }
- error(arg);
- break;
- case 't':
- if (arglen == 1) {
- newae(ctx->i_ae, "-Wl,-t");
+ if (strcmp(arg, "-shared") == 0) {
+ newae(ctx->i_ae, "-shared");
+ nolibc = 1;
break;
}
error(arg);
break;
+
case 'V':
if (arglen == 1) {
ctx->i_flags &= ~CW_F_ECHO;
diff --git a/usr/src/ucbcmd/Makefile.ucbcmd b/usr/src/ucbcmd/Makefile.ucbcmd
index 47cf585440..cca40dffeb 100644
--- a/usr/src/ucbcmd/Makefile.ucbcmd
+++ b/usr/src/ucbcmd/Makefile.ucbcmd
@@ -66,7 +66,7 @@ LDLIBS = $(LDLIBS.cmd)
LDFLAGS.cmd = \
$(ENVLDFLAGS1) $(ENVLDFLAGS2) $(ENVLDFLAGS3) \
- $(MAPFILE.NES:%=-M%) $(MAPFILE.PGA:%=-M%) $(MAPFILE.NED:%=-M%) \
+ $(MAPFILE.NES:%=-Wl,-M%) $(MAPFILE.PGA:%=-Wl,-M%) $(MAPFILE.NED:%=-Wl,-M%) \
$(BDIRECT)
LDFLAGS = $(LDFLAGS.cmd)
diff --git a/usr/src/ucbcmd/chown/Makefile b/usr/src/ucbcmd/chown/Makefile
index a27c3e0259..22557fbc57 100644
--- a/usr/src/ucbcmd/chown/Makefile
+++ b/usr/src/ucbcmd/chown/Makefile
@@ -33,7 +33,7 @@ FILEMODE= 755
CPPFLAGS += -D_FILE_OFFSET_BITS=64
CERRWARN += -_gcc=-Wno-implicit-function-declaration
CERRWARN += -_gcc=-Wno-parentheses
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
.KEEP_STATE:
diff --git a/usr/src/ucbcmd/expr/Makefile b/usr/src/ucbcmd/expr/Makefile
index cf2cc48442..79d1795c9c 100644
--- a/usr/src/ucbcmd/expr/Makefile
+++ b/usr/src/ucbcmd/expr/Makefile
@@ -32,7 +32,7 @@ CERRWARN += -_gcc=-Wno-unused-label
CERRWARN += -_gcc=-Wno-extra
CERRWARN += -_gcc=-Wno-char-subscripts
-LDFLAGS += $(MAPFILE.NGB:%=-M%)
+LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%)
.KEEP_STATE:
diff --git a/usr/src/ucblib/libcurses/amd64/Makefile b/usr/src/ucblib/libcurses/amd64/Makefile
index e538678e29..d8db69d15c 100644
--- a/usr/src/ucblib/libcurses/amd64/Makefile
+++ b/usr/src/ucblib/libcurses/amd64/Makefile
@@ -27,7 +27,7 @@ include ../Makefile.com
include ../../../lib/Makefile.lib.64
DYNFLAGS += $(DYNFLAGS64)
-BUILD.SO= $(CC) $(CFLAGS) -o $@ -G $(DYNFLAGS) $(PICS) \
+BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) \
-L $(ROOT)/usr/ucblib/$(MACH64) -L $(ROOT)/usr/lib/$(MACH64) $(LDLIBS)
.KEEP_STATE:
diff --git a/usr/src/ucblib/libcurses/sparc/Makefile b/usr/src/ucblib/libcurses/sparc/Makefile
index 79054c8e18..75f501557f 100644
--- a/usr/src/ucblib/libcurses/sparc/Makefile
+++ b/usr/src/ucblib/libcurses/sparc/Makefile
@@ -26,7 +26,7 @@
include ../Makefile.com
DYNFLAGS += $(DYNFLAGS32)
-BUILD.SO= $(CC) -o $@ -G $(DYNFLAGS) $(PICS) -L $(ROOT)/usr/ucblib $(LDLIBS)
+BUILD.SO= $(CC) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) -L $(ROOT)/usr/ucblib $(LDLIBS)
.KEEP_STATE:
diff --git a/usr/src/ucblib/libcurses/sparcv9/Makefile b/usr/src/ucblib/libcurses/sparcv9/Makefile
index e538678e29..d8db69d15c 100644
--- a/usr/src/ucblib/libcurses/sparcv9/Makefile
+++ b/usr/src/ucblib/libcurses/sparcv9/Makefile
@@ -27,7 +27,7 @@ include ../Makefile.com
include ../../../lib/Makefile.lib.64
DYNFLAGS += $(DYNFLAGS64)
-BUILD.SO= $(CC) $(CFLAGS) -o $@ -G $(DYNFLAGS) $(PICS) \
+BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) \
-L $(ROOT)/usr/ucblib/$(MACH64) -L $(ROOT)/usr/lib/$(MACH64) $(LDLIBS)
.KEEP_STATE:
diff --git a/usr/src/ucblib/libdbm/amd64/Makefile b/usr/src/ucblib/libdbm/amd64/Makefile
index 20434991fd..5880da6858 100644
--- a/usr/src/ucblib/libdbm/amd64/Makefile
+++ b/usr/src/ucblib/libdbm/amd64/Makefile
@@ -26,7 +26,7 @@
include ../Makefile.com
include ../../../lib/Makefile.lib.64
-BUILD.SO= $(CC) $(CFLAGS) -o $@ -G $(DYNFLAGS) $(PICS) \
+BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) \
-L $(ROOT)/usr/ucblib/$(MACH64) -L $(ROOT)/usr/lib/$(MACH64) $(LDLIBS)
.KEEP_STATE:
diff --git a/usr/src/ucblib/libdbm/sparc/Makefile b/usr/src/ucblib/libdbm/sparc/Makefile
index c9b8beb496..85705049e2 100644
--- a/usr/src/ucblib/libdbm/sparc/Makefile
+++ b/usr/src/ucblib/libdbm/sparc/Makefile
@@ -25,7 +25,7 @@
include ../Makefile.com
-BUILD.SO= $(CC) -o $@ -G $(DYNFLAGS) $(PICS) -L $(ROOT)/usr/ucblib $(LDLIBS)
+BUILD.SO= $(CC) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) -L $(ROOT)/usr/ucblib $(LDLIBS)
.KEEP_STATE:
diff --git a/usr/src/ucblib/libdbm/sparcv9/Makefile b/usr/src/ucblib/libdbm/sparcv9/Makefile
index 20434991fd..5880da6858 100644
--- a/usr/src/ucblib/libdbm/sparcv9/Makefile
+++ b/usr/src/ucblib/libdbm/sparcv9/Makefile
@@ -26,7 +26,7 @@
include ../Makefile.com
include ../../../lib/Makefile.lib.64
-BUILD.SO= $(CC) $(CFLAGS) -o $@ -G $(DYNFLAGS) $(PICS) \
+BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) \
-L $(ROOT)/usr/ucblib/$(MACH64) -L $(ROOT)/usr/lib/$(MACH64) $(LDLIBS)
.KEEP_STATE:
diff --git a/usr/src/ucblib/librpcsoc/amd64/Makefile b/usr/src/ucblib/librpcsoc/amd64/Makefile
index 49026576ef..562dcca232 100644
--- a/usr/src/ucblib/librpcsoc/amd64/Makefile
+++ b/usr/src/ucblib/librpcsoc/amd64/Makefile
@@ -27,7 +27,7 @@ include ../Makefile.com
include $(SRC)/lib/Makefile.lib.64
DYNFLAGS += $(DYNFLAGS64)
-BUILD.SO= $(CC) $(CFLAGS) -o $@ -G $(DYNFLAGS) $(PICS) \
+BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) \
-L $(ROOT)/usr/ucblib/$(MACH64) -L $(ROOT)/usr/lib/$(MACH64) $(LDLIBS)
LIBS= $(DYNLIB)
diff --git a/usr/src/ucblib/librpcsoc/sparc/Makefile b/usr/src/ucblib/librpcsoc/sparc/Makefile
index ebb1fecfe8..8c2e44b15a 100644
--- a/usr/src/ucblib/librpcsoc/sparc/Makefile
+++ b/usr/src/ucblib/librpcsoc/sparc/Makefile
@@ -26,7 +26,7 @@
include ../Makefile.com
DYNFLAGS += $(DYNFLAGS32)
-BUILD.SO= $(CC) -o $@ -G $(DYNFLAGS) $(PICS) -L $(ROOT)/usr/ucblib $(LDLIBS)
+BUILD.SO= $(CC) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) -L $(ROOT)/usr/ucblib $(LDLIBS)
LIBS = $(DYNLIB)
diff --git a/usr/src/ucblib/librpcsoc/sparcv9/Makefile b/usr/src/ucblib/librpcsoc/sparcv9/Makefile
index 49026576ef..562dcca232 100644
--- a/usr/src/ucblib/librpcsoc/sparcv9/Makefile
+++ b/usr/src/ucblib/librpcsoc/sparcv9/Makefile
@@ -27,7 +27,7 @@ include ../Makefile.com
include $(SRC)/lib/Makefile.lib.64
DYNFLAGS += $(DYNFLAGS64)
-BUILD.SO= $(CC) $(CFLAGS) -o $@ -G $(DYNFLAGS) $(PICS) \
+BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) \
-L $(ROOT)/usr/ucblib/$(MACH64) -L $(ROOT)/usr/lib/$(MACH64) $(LDLIBS)
LIBS= $(DYNLIB)
diff --git a/usr/src/ucblib/libtermcap/amd64/Makefile b/usr/src/ucblib/libtermcap/amd64/Makefile
index 4faa7cf698..437abcff88 100644
--- a/usr/src/ucblib/libtermcap/amd64/Makefile
+++ b/usr/src/ucblib/libtermcap/amd64/Makefile
@@ -27,7 +27,7 @@ include ../Makefile.com
include $(SRC)/lib/Makefile.lib.64
DYNFLAGS += $(DYNFLAGS64)
-BUILD.SO= $(CC) $(CFLAGS) -o $@ -G $(DYNFLAGS) $(PICS) \
+BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) \
-L $(ROOT)/usr/ucblib/$(MACH64) -L $(ROOT)/usr/lib/$(MACH64) $(LDLIBS)
.KEEP_STATE:
diff --git a/usr/src/ucblib/libtermcap/sparc/Makefile b/usr/src/ucblib/libtermcap/sparc/Makefile
index c9b8beb496..85705049e2 100644
--- a/usr/src/ucblib/libtermcap/sparc/Makefile
+++ b/usr/src/ucblib/libtermcap/sparc/Makefile
@@ -25,7 +25,7 @@
include ../Makefile.com
-BUILD.SO= $(CC) -o $@ -G $(DYNFLAGS) $(PICS) -L $(ROOT)/usr/ucblib $(LDLIBS)
+BUILD.SO= $(CC) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) -L $(ROOT)/usr/ucblib $(LDLIBS)
.KEEP_STATE:
diff --git a/usr/src/ucblib/libtermcap/sparcv9/Makefile b/usr/src/ucblib/libtermcap/sparcv9/Makefile
index 4faa7cf698..437abcff88 100644
--- a/usr/src/ucblib/libtermcap/sparcv9/Makefile
+++ b/usr/src/ucblib/libtermcap/sparcv9/Makefile
@@ -27,7 +27,7 @@ include ../Makefile.com
include $(SRC)/lib/Makefile.lib.64
DYNFLAGS += $(DYNFLAGS64)
-BUILD.SO= $(CC) $(CFLAGS) -o $@ -G $(DYNFLAGS) $(PICS) \
+BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) \
-L $(ROOT)/usr/ucblib/$(MACH64) -L $(ROOT)/usr/lib/$(MACH64) $(LDLIBS)
.KEEP_STATE:
diff --git a/usr/src/ucblib/libucb/amd64/Makefile b/usr/src/ucblib/libucb/amd64/Makefile
index 564565f610..5e1a2ba04a 100644
--- a/usr/src/ucblib/libucb/amd64/Makefile
+++ b/usr/src/ucblib/libucb/amd64/Makefile
@@ -29,7 +29,7 @@ include ../Makefile.com
include $(SRC)/lib/Makefile.lib.64
DYNFLAGS += $(DYNFLAGS64)
-BUILD.SO= $(CC) $(CFLAGS) -o $@ -G $(DYNFLAGS) $(PICS) -L $(ROOT)/usr/lib/$(MACH64) $(LDLIBS)
+BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) -L $(ROOT)/usr/lib/$(MACH64) $(LDLIBS)
# amd64-specific rule
pics/%.o: ../$(MACH)/sys/%.c
diff --git a/usr/src/ucblib/libucb/sparcv9/Makefile b/usr/src/ucblib/libucb/sparcv9/Makefile
index 97883b2a05..5ff8fa00b1 100644
--- a/usr/src/ucblib/libucb/sparcv9/Makefile
+++ b/usr/src/ucblib/libucb/sparcv9/Makefile
@@ -33,7 +33,7 @@ include ../Makefile.com
include $(SRC)/lib/Makefile.lib.64
DYNFLAGS += $(DYNFLAGS64)
-BUILD.SO= $(CC) $(CFLAGS) -o $@ -G $(DYNFLAGS) $(PICS) -L $(ROOT)/usr/lib/$(MACH64) $(LDLIBS)
+BUILD.SO= $(CC) $(CFLAGS) -o $@ $(GSHARED) $(DYNFLAGS) $(PICS) -L $(ROOT)/usr/lib/$(MACH64) $(LDLIBS)
BUILD.s= $(AS) $(ASFLAGS) -xarch=v9 -D__sparcv9 $< -o $@
# sparcv9-specific rule
diff --git a/usr/src/uts/common/Makefile.rules b/usr/src/uts/common/Makefile.rules
index a32c094f3b..f038a4d91a 100644
--- a/usr/src/uts/common/Makefile.rules
+++ b/usr/src/uts/common/Makefile.rules
@@ -1692,7 +1692,7 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/common/zmod/%.c
$(CTFCONVERT_O)
$(OBJS_DIR)/zlib_obj.o: $(ZLIB_OBJS:%=$(OBJS_DIR)/%)
- $(LD) -r -Breduce -M$(UTSBASE)/common/zmod/mapfile -o $@ \
+ $(LD) -r $(BREDUCE) -M$(UTSBASE)/common/zmod/mapfile -o $@ \
$(ZLIB_OBJS:%=$(OBJS_DIR)/%)
$(CTFMERGE) $(CTFMRGFLAGS) -o $@ $(ZLIB_OBJS:%=$(OBJS_DIR)/%)
diff --git a/usr/src/uts/common/io/aggr/aggr_grp.c b/usr/src/uts/common/io/aggr/aggr_grp.c
index dc6f03b247..199625c377 100644
--- a/usr/src/uts/common/io/aggr/aggr_grp.c
+++ b/usr/src/uts/common/io/aggr/aggr_grp.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2020 Joyent, Inc.
+ * Copyright 2020 RackTop Systems, Inc.
*/
/*
@@ -1749,7 +1750,8 @@ done:
int
aggr_grp_rem_ports(datalink_id_t linkid, uint_t nports, laioc_port_t *ports)
{
- int rc = 0, i;
+ int rc = 0;
+ uint_t i;
aggr_grp_t *grp = NULL;
aggr_port_t *port;
boolean_t mac_addr_update = B_FALSE, mac_addr_changed;
@@ -1842,8 +1844,8 @@ aggr_grp_rem_ports(datalink_id_t linkid, uint_t nports, laioc_port_t *ports)
* aggr_find_tx_ring() will not return any rings
* belonging to it.
*/
- for (i = 0; i < grp->lg_rx_group_count; i++)
- aggr_rem_pseudo_rx_group(port, &grp->lg_rx_groups[i]);
+ for (uint_t j = 0; j < grp->lg_rx_group_count; j++)
+ aggr_rem_pseudo_rx_group(port, &grp->lg_rx_groups[j]);
/* remove port from group */
rc = aggr_grp_rem_port(grp, port, &mac_addr_changed,
diff --git a/usr/src/uts/intel/llc1/Makefile b/usr/src/uts/intel/llc1/Makefile
index ca5af56e24..35eca687d9 100644
--- a/usr/src/uts/intel/llc1/Makefile
+++ b/usr/src/uts/intel/llc1/Makefile
@@ -27,8 +27,8 @@
# Copyright (c) 2018, Joyent, Inc.
#
-# This makefile drives the production of the Sound-Blaster driver
-# kernel module.
+# This makefile drives the production of the
+# Logical Link Control Class 1 driver kernel module.
#
# intel architecture dependent
#
diff --git a/usr/src/uts/intel/sda/Makefile b/usr/src/uts/intel/sda/Makefile
index 3aa5279c60..608d55936b 100644
--- a/usr/src/uts/intel/sda/Makefile
+++ b/usr/src/uts/intel/sda/Makefile
@@ -74,7 +74,7 @@ CFLAGS += $(CCVERBOSE)
# dependency on blkdev module, scope limiting mapfile
#
MAPFILE = $(UTSBASE)/common/io/sdcard/impl/mapfile
-LDFLAGS += -dy -Ndrv/blkdev -B reduce -M $(MAPFILE)
+LDFLAGS += -dy -Ndrv/blkdev $(BREDUCE) -M $(MAPFILE)
# needs work
SMOFF += all_func_returns
diff --git a/usr/src/uts/sun4u/opl/platmod/Makefile b/usr/src/uts/sun4u/opl/platmod/Makefile
index 92016eac00..38a2ab03bf 100644
--- a/usr/src/uts/sun4u/opl/platmod/Makefile
+++ b/usr/src/uts/sun4u/opl/platmod/Makefile
@@ -22,15 +22,12 @@
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
#
# This makefile drives the production of the sun4u opl platform
# module.
#
# sun4u opl implementation architecture dependent
#
-# uts/sun4u/opl/platmod/Makefile
-#
#
# Path to the base of the uts directory tree (usually /usr/src/uts).
@@ -89,7 +86,7 @@ clean.lint: $(CLEAN_LINT_DEPS)
install: $(INSTALL_DEPS)
$(PLATLIB): $(BINARY)
- $(LD) -o $(PLATLIB) -G $(BINARY) -h misc/platmod
+ $(LD) -o $(PLATLIB) $(GSHARED) $(BINARY) -h misc/platmod
#
# Include common targets.
diff --git a/usr/src/uts/sun4u/opl/unix/Makefile b/usr/src/uts/sun4u/opl/unix/Makefile
index e1540448c5..298d5580f1 100644
--- a/usr/src/uts/sun4u/opl/unix/Makefile
+++ b/usr/src/uts/sun4u/opl/unix/Makefile
@@ -148,15 +148,15 @@ install: $(INSTALL_DEPS)
symcheck: $(SYM_DEPS)
-$(UNIX_BIN): $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(UNIX_MAPFILE) $(LIBS) \
+$(UNIX_BIN): $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(MAPFILE) $(LIBS) \
$(DTRACESTUBS)
- $(LD) -dy -b -o $@ -e _start -M $(UNIX_MAPFILE) \
+ $(LD) -dy -b -o $@ -e _start -M $(MAPFILE) \
$(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
$(CTFMERGE_UNIQUIFY_AGAINST_GENUNIX)
$(POST_PROCESS)
symcheck.targ: $(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(LIBS) $(DTRACESTUBS)
- $(LD) -dy -b -o $(SYM_MOD) -M $(UNIX_MAPFILE) \
+ $(LD) -dy -b -o $(SYM_MOD) -M $(MAPFILE) \
$(UNIX_O) $(KRTLD_O) $(MODSTUBS_O) $(LIBOPTS) $(DTRACESTUBS)
$(UNIX_O): $(OBJECTS) $(OBJS_DIR)/vers.o
@@ -171,7 +171,7 @@ $(KRTLD_O): $(KRTLD_OBJECTS)
# CPU_OBJ is defined to allow for building multiple CPU_OBJ's
#
$(CPULIB): $(CPU_OBJ)
- $(LD) -o $@ -G -h 'cpu/$$CPU' $(CPU_OBJ)
+ $(LD) -o $@ $(GSHARED) -h 'cpu/$$CPU' $(CPU_OBJ)
#
# The global lint target builds the kernel lint library (llib-lunix.ln)
diff --git a/usr/src/uts/sun4u/schumacher/platmod/Makefile b/usr/src/uts/sun4u/schumacher/platmod/Makefile
index f658659bf3..11d8bf9192 100644
--- a/usr/src/uts/sun4u/schumacher/platmod/Makefile
+++ b/usr/src/uts/sun4u/schumacher/platmod/Makefile
@@ -22,9 +22,7 @@
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#pragma ident "%Z%%M% %I% %E% SMI"
-#
-# uts/sun4u/schumacher/platmod/Makefile
+
#
# This makefile drives the production of the sun4u schumacher platform module.
#
@@ -95,7 +93,7 @@ check:
LINT_LIB_DIR = $(SCHUMACHER_LINT_LIB_DIR)
$(PLATLIB): $(BINARY)
- ${LD} -o $(PLATLIB) -G $(BINARY)
+ $(LD) -o $(PLATLIB) $(GSHARED) $(BINARY)
$(SYM_MOD): $(UNIX_O) $(PLATLIB)
@echo "resolving symbols against unix.o"