diff options
author | Richard Lowe <richlowe@richlowe.net> | 2018-02-11 18:58:28 +0000 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2020-10-13 13:51:13 -0400 |
commit | 85f4cb87104c72587029a6e0f1663332c85ba118 (patch) | |
tree | 5ebef4ca549bc6422ac6b0627c440e7a7fbab167 /usr/src/cmd | |
parent | 0a36db39c3cd88f4799ecd9db875f43d834d0a81 (diff) | |
download | illumos-joyent-85f4cb87104c72587029a6e0f1663332c85ba118.tar.gz |
13184 Stop translating ld(1) options through cw(1)
Reviewed by: Jason King <jason.brian.king+illumos@gmail.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Robert Mustacchi <rm@fingolfin.org>
Diffstat (limited to 'usr/src/cmd')
66 files changed, 158 insertions, 563 deletions
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 97476c95d9..c27b139a5e 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%) .KEEP_STATE: @@ -242,39 +233,3 @@ clean_local: clobber: $(SUBDIRS) clobber_local clobber_local: clean_local $(RM) $(CLOBBERFILES) - -lint: $(LINTSUBDIRS) - $(LINT.c) 6to4relay.c $(LDLIBS) -lsocket -ldladm - $(LINT.c) arp.c $(LDLIBS) -lsocket -lnsl - @# $(LINT.c) in.rexecd.c $(LDLIBS) -lbsm -lpam - $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_NAME_DEF_NOT_USED2 \ - -I$(SRC)/head -I$(SRC)/uts/common/ \ - -I$(SRC)/uts/common/gssapi/mechs/krb5/include \ - -I$(SRC)/lib/gss_mechs/mech_krb5/include \ - -I$(SRC)/lib/pam_modules/krb5 \ - in.rlogind.c $(COMMONSRCS) $(LDLIBS) -lbsm -lpam -lsocket -lnsl - $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_NAME_DEF_NOT_USED2 \ - -I$(SRC)/head -I$(SRC)/uts/common/ \ - -I$(SRC)/uts/common/gssapi/mechs/krb5/include \ - -I$(SRC)/lib/gss_mechs/mech_krb5/include \ - -I$(SRC)/lib/pam_modules/krb5 \ - in.rshd.c $(COMMONSRCS) $(LDLIBS) -lbsm -lpam -lsocket -lnsl - $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 \ - -erroff=E_GLOBAL_COULD_BE_STATIC2 \ - -I$(SRC)/head -I$(SRC)/uts/common/ \ - -I$(SRC)/uts/common/gssapi/mechs/krb5/include \ - -I$(SRC)/lib/gss_mechs/mech_krb5/include \ - -I$(SRC)/lib/pam_modules/krb5 \ - in.telnetd.c $(LDLIBS) -lbsm -lpam -lsocket -lnsl - $(LINT.c) if_mpadm.c $(LDLIBS) -lsocket -lnsl -lipmp -linetutil - $(LINT.c) ipaddrsel.c $(LDLIBS) -lsocket -lnsl - $(LINT.c) route.c $(LDLIBS) -lsocket -lnsl -ltsnet - $(LINT.c) syncinit.c $(LDLIBS) -ldlpi - $(LINT.c) syncloop.c $(LDLIBS) -ldlpi - $(LINT.c) syncstat.c $(LDLIBS) -ldlpi - $(LINT.c) -erroff=E_NAME_USED_NOT_DEF2 in.rarpd.c $(LDLIBS) \ - -lsocket -lnsl - $(LINT.c) ndp.c $(LDLIBS) \ - -lsocket -lnsl - $(LINT.c) in.tftpd.c ../usr.bin/tftp/tftpsubs.c $(LDLIBS) \ - -lsocket -lnsl diff --git a/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile b/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile index 4709cfe59e..b8066dc850 100644 --- a/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile +++ b/usr/src/cmd/cmd-inet/usr.sbin/snoop/Makefile @@ -50,7 +50,7 @@ include ../../../Makefile.cmd CPPFLAGS += -I. -I$(SRC)/common/net/dhcp \ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 LDLIBS += -ldhcputil -ldlpi -lsocket -lnsl -ltsol -LDFLAGS += $(MAPFILE.NGB:%=-M%) +LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%) CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-implicit-function-declaration CERRWARN += $(CNOWARN_UNINIT) @@ -79,6 +79,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 7c1e151762..15b1634758 100644 --- a/usr/src/cmd/ipf/tools/Makefile.tools +++ b/usr/src/cmd/ipf/tools/Makefile.tools @@ -58,7 +58,7 @@ include ../../../Makefile.cmd include ../../Makefile.ipf LDLIBS += $(LIBBPF) -LDFLAGS += $(MAPFILE.NGB:%=-M%) +LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%) CPPFLAGS += -I. -DIPFILTER_LOOKUP -DIPFILTER_LOG @@ -244,17 +244,15 @@ ippool_l.o: ../ippool_l.c $(COMMONIPF)/netinet/ip_pool.h ../ippool_l.h CLEANFILES += ../ippool_l.c ../ippool_l.h ipftest: $(IPFTEST_OBJS) $(LIBIPF) $(MAPFILE.NGB) - $(LINK.c) $(ZIGNORE) -o ipftest $(IPFTEST_OBJS) $(LDLIBS) + $(LINK.c) $(ZIGNORE) -o ipftest $(IPFTEST_OBJS) $(LDLIBS) $(POST_PROCESS) clean: -$(RM) $(CLEANFILES) -lint: lint_SRCS - # # NOTE: all rules must use relative paths otherwise absolute paths will be -# embedded into the binaries making them false positives and +# embedded into the binaries making them false positives and # reported by wsdiff # diff --git a/usr/src/cmd/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 b61ed79ad4..e14e8f42a6 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 how are # building with an LFS python, we attempt to use -isystem when it's @@ -128,11 +116,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 @@ -156,23 +144,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) @@ -207,7 +190,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) @@ -257,33 +240,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 1b4e0e6180..45c4debcdc 100644 --- a/usr/src/cmd/rcap/rcapstat/Makefile +++ b/usr/src/cmd/rcap/rcapstat/Makefile @@ -29,24 +29,18 @@ include ../../Makefile.cmd COMMON_DIR= ../common # for Makefile.com -SRCS = rcapstat.c \ +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 STAT_COMMON_SRCS = $(STAT_COMMON_OBJS:%.o=$(STATCOMMONDIR)/%.c) -$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG -CPPFLAGS += -I$(COMMON_DIR) -I$(STATCOMMONDIR) -LDLIBS += -lumem -lzonecfg -lscf -LDFLAGS += $(MAPFILE.NGB:%=-M%) - -LINTFLAGS += $(LDLIBS) -mnu +$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG +CPPFLAGS += -I$(COMMON_DIR) -I$(STATCOMMONDIR) +LDLIBS += -lumem -lzonecfg -lscf +LDFLAGS += $(MAPFILE.NGB:%=-Wl,-M%) PROG = rcapstat OBJS = $(SRCS:%.c=%.o) rcapd_conf.o @@ -54,10 +48,10 @@ OBJS = $(SRCS:%.c=%.o) rcapd_conf.o POFILES = $(OBJS:%.o=%.po) POFILE = p$(PROG).po -CLOBBERFILES += rcapd_conf.c $(POFILES) $(POFILE) +CLOBBERFILES += rcapd_conf.c $(POFILES) $(POFILE) .NO_PARALLEL: -.PARALLEL: $(OBJS) $(LINTFILES) +.PARALLEL: $(OBJS) all: $(PROG) $(MAPFILE.NGB) @@ -78,9 +72,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 1f6e09b231..f0c3b42b9b 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 \ @@ -65,23 +65,6 @@ $(PROG): $(OBJS) $(BZIP2OBJS) 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 8791902399..19698de5ad 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 \ @@ -83,6 +83,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 16312b56f7..e32c70e8ac 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)CC = $(NATIVECC) @@ -128,7 +122,7 @@ svccfg_lex.o svccfg_grammar.o := CCVERBOSE = svccfg_help.po := XGETFLAGS = -a .KEEP_STATE: -.PARALLEL: $(OBJS) $(LNTS) +.PARALLEL: $(OBJS) all debug: $(PROG) @@ -160,10 +154,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 $@ $< @@ -177,9 +168,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 f85351d89a..a1a426e0d2 100644 --- a/usr/src/cmd/vi/port/Makefile +++ b/usr/src/cmd/vi/port/Makefile @@ -81,14 +81,13 @@ CPPFLAGS += -DUSG -DSTDIO -DVMUNIX -DTABS=8 -DSINGLE -DTAG_STACK # 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)/%) @@ -172,6 +171,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 c5d042f48f..5cab6b079f 100644 --- a/usr/src/cmd/zonecfg/Makefile +++ b/usr/src/cmd/zonecfg/Makefile @@ -34,7 +34,7 @@ include ../Makefile.cmd # 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 @@ -80,10 +80,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 |