diff options
Diffstat (limited to 'usr/src')
275 files changed, 1431 insertions, 4403 deletions
diff --git a/usr/src/Makefile.lint b/usr/src/Makefile.lint index 626c51d406..3bfb3bcc37 100644 --- a/usr/src/Makefile.lint +++ b/usr/src/Makefile.lint @@ -25,6 +25,7 @@ # Copyright 2015 Garrett D'Amore <garrett@damore.org> # Copyright 2018 Nexenta Systems, Inc. # Copyright 2018 Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # # include global definitions @@ -273,7 +274,6 @@ COMMON_SUBDIRS = \ cmd/sed \ cmd/setpgrp \ cmd/smbios \ - cmd/sgs \ cmd/smbsrv \ cmd/smserverd \ cmd/sort \ diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master index 28e98c5991..1b3fcfd7bf 100644 --- a/usr/src/Makefile.master +++ b/usr/src/Makefile.master @@ -519,17 +519,22 @@ CGLOBALSTATIC= -W0,-xglobalstatic CALLSYMS= -W0,-xdbggen=no%usedonly # -# Default debug format for Sun Studio 11 is dwarf, so force it to -# generate stabs. +# We force the compilers to generate the debugging information best understood +# by the CTF tools. With Sun Studio this is stabs due to bugs in the Studio +# compilers. With GCC this is DWARF v2. # -DEBUGFORMAT= -xdebugformat=stabs +DEBUGFORMAT= -_cc=-xdebugformat=stabs -_gcc=-gdwarf-2 # -# Flags used to build in debug mode for ctf generation. Bugs in the Devpro -# compilers currently prevent us from building with cc-emitted DWARF. +# Ask the compiler to include debugging information # -CTF_FLAGS_sparc = -g -Wc,-Qiselect-T1 $(CSTD) $(CNOGLOBAL) $(CDWARFSTR) -CTF_FLAGS_i386 = -g $(CSTD) $(CNOGLOBAL) $(CDWARFSTR) +CCGDEBUG= -g $(DEBUGFORMAT) + +# +# Flags used to build in debug mode for ctf generation. +# +CTF_FLAGS_sparc = $(CCGDEBUG) -Wc,-Qiselect-T1 $(CSTD) $(CNOGLOBAL) +CTF_FLAGS_i386 = $(CCGDEBUG) $(CSTD) $(CNOGLOBAL) CTF_FLAGS_sparcv9 = $(CTF_FLAGS_sparc) CTF_FLAGS_amd64 = $(CTF_FLAGS_i386) @@ -537,20 +542,22 @@ CTF_FLAGS_amd64 = $(CTF_FLAGS_i386) # Sun Studio produces broken userland code when saving arguments. $(__GNUC)CTF_FLAGS_amd64 += $(SAVEARGS) -CTF_FLAGS_32 = $(CTF_FLAGS_$(MACH)) $(DEBUGFORMAT) -CTF_FLAGS_64 = $(CTF_FLAGS_$(MACH64)) $(DEBUGFORMAT) +CTF_FLAGS_32 = $(CTF_FLAGS_$(MACH)) +CTF_FLAGS_64 = $(CTF_FLAGS_$(MACH64)) CTF_FLAGS = $(CTF_FLAGS_32) # # Flags used with genoffsets # -GOFLAGS = $(CALLSYMS) $(CDWARFSTR) +GENOFFSETS_FLAGS = $(CALLSYMS) OFFSETS_CREATE = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \ - $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS) $(CPPFLAGS) + $(CW) --noecho $(CW_CC_COMPILERS) -- $(GENOFFSETS_FLAGS) \ + $(CFLAGS) $(CPPFLAGS) OFFSETS_CREATE64 = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \ - $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS) + $(CW) --noecho $(CW_CC_COMPILERS) -- $(GENOFFSETS_FLAGS) \ + $(CFLAGS64) $(CPPFLAGS) # # tradeoff time for space (smaller is better) @@ -605,8 +612,8 @@ CCUSERFLAGS64 = $(CCUSERFLAGS) CSOURCEDEBUGFLAGS = CCSOURCEDEBUGFLAGS = -$(SRCDBGBLD)CSOURCEDEBUGFLAGS = -g -xs -$(SRCDBGBLD)CCSOURCEDEBUGFLAGS = -g -xs +$(SRCDBGBLD)CSOURCEDEBUGFLAGS = $(CCGDEBUG) -xs +$(SRCDBGBLD)CCSOURCEDEBUGFLAGS = $(CCGDEBUG) -xs CFLAGS= $(COPTFLAG) $($(MACH)_CFLAGS) $(SPACEFLAG) $(CCMODE) \ $(ILDOFF) $(CERRWARN) $(CSTD) $(CCUNBOUND) $(IROPTFLAG) \ diff --git a/usr/src/Targetdirs b/usr/src/Targetdirs index 3398e81a6e..aeefe0a570 100644 --- a/usr/src/Targetdirs +++ b/usr/src/Targetdirs @@ -29,7 +29,7 @@ # Copyright 2016 Nexenta Systems, Inc. # Copyright 2017 RackTop Systems. # Copyright (c) 2018, Joyent, Inc. -# Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # # @@ -704,9 +704,7 @@ $(ROOT)/usr/ccs/lib/values-Xt.o:= REALPATH=../../lib/values-Xt.o $(ROOT)/usr/ccs/lib/values-xpg4.o:= REALPATH=../../lib/values-xpg4.o $(ROOT)/usr/ccs/lib/values-xpg6.o:= REALPATH=../../lib/values-xpg6.o $(ROOT)/usr/ccs/lib/libl.so:= REALPATH=../../lib/libl.so.1 -$(ROOT)/usr/ccs/lib/llib-ll.ln:= REALPATH=../../lib/llib-ll.ln $(ROOT)/usr/ccs/lib/liby.so:= REALPATH=../../lib/liby.so.1 -$(ROOT)/usr/ccs/lib/llib-ly.ln:= REALPATH=../../lib/llib-ly.ln $(ROOT)/usr/lib/lwp/libthread.so.1:= REALPATH=../libthread.so.1 $(ROOT)/usr/lib/lwp/libthread_db.so.1:= REALPATH=../libthread_db.so.1 @@ -755,12 +753,8 @@ $(ROOT)/usr/ccs/lib/$(MACH64)/values-xpg6.o:= \ REALPATH=../../../lib/$(MACH64)/values-xpg6.o $(ROOT)/usr/ccs/lib/$(MACH64)/libl.so:= \ REALPATH=../../../lib/$(MACH64)/libl.so.1 -$(ROOT)/usr/ccs/lib/$(MACH64)/llib-ll.ln:= \ - REALPATH=../../../lib/$(MACH64)/llib-ll.ln $(ROOT)/usr/ccs/lib/$(MACH64)/liby.so:= \ REALPATH=../../../lib/$(MACH64)/liby.so.1 -$(ROOT)/usr/ccs/lib/$(MACH64)/llib-ly.ln:= \ - REALPATH=../../../lib/$(MACH64)/llib-ly.ln $(ROOT)/usr/lib/lwp/$(MACH64)/libthread.so.1:= \ REALPATH=../../$(MACH64)/libthread.so.1 $(ROOT)/usr/lib/lwp/$(MACH64)/libthread_db.so.1:= \ @@ -796,9 +790,7 @@ SYM.USRCCSLIB= \ /usr/ccs/lib/values-xpg4.o \ /usr/ccs/lib/values-xpg6.o \ /usr/ccs/lib/libl.so \ - /usr/ccs/lib/llib-ll.ln \ /usr/ccs/lib/liby.so \ - /usr/ccs/lib/llib-ly.ln \ /usr/lib/lwp/libthread.so.1 \ /usr/lib/lwp/libthread_db.so.1 @@ -825,9 +817,7 @@ SYM.USRCCSLIB64= \ /usr/ccs/lib/$(MACH64)/values-xpg4.o \ /usr/ccs/lib/$(MACH64)/values-xpg6.o \ /usr/ccs/lib/$(MACH64)/libl.so \ - /usr/ccs/lib/$(MACH64)/llib-ll.ln \ /usr/ccs/lib/$(MACH64)/liby.so \ - /usr/ccs/lib/$(MACH64)/llib-ly.ln \ /usr/lib/lwp/$(MACH64)/libthread.so.1 \ /usr/lib/lwp/$(MACH64)/libthread_db.so.1 @@ -1003,14 +993,10 @@ $(ROOT)/usr/lib/llib-ldhcpagent.ln:= REALPATH=../../lib/llib-ldhcpagent.ln $(ROOT)/usr/lib/llib-ldhcpagent:= REALPATH=../../lib/llib-ldhcpagent $(ROOT)/usr/lib/llib-ldhcputil.ln:= REALPATH=../../lib/llib-ldhcputil.ln $(ROOT)/usr/lib/llib-ldhcputil:= REALPATH=../../lib/llib-ldhcputil -$(ROOT)/usr/lib/llib-ldl.ln:= REALPATH=../../lib/llib-ldl.ln -$(ROOT)/usr/lib/llib-ldl:= REALPATH=../../lib/llib-ldl $(ROOT)/usr/lib/llib-ldoor.ln:= REALPATH=../../lib/llib-ldoor.ln $(ROOT)/usr/lib/llib-ldoor:= REALPATH=../../lib/llib-ldoor $(ROOT)/usr/lib/llib-lefi.ln:= REALPATH=../../lib/llib-lefi.ln $(ROOT)/usr/lib/llib-lefi:= REALPATH=../../lib/llib-lefi -$(ROOT)/usr/lib/llib-lelf.ln:= REALPATH=../../lib/llib-lelf.ln -$(ROOT)/usr/lib/llib-lelf:= REALPATH=../../lib/llib-lelf $(ROOT)/usr/lib/llib-lfdisk.ln:= REALPATH=../../lib/llib-lfdisk.ln $(ROOT)/usr/lib/llib-lfdisk:= REALPATH=../../lib/llib-lfdisk $(ROOT)/usr/lib/llib-lgen.ln:= REALPATH=../../lib/llib-lgen.ln @@ -1041,8 +1027,6 @@ $(ROOT)/usr/lib/llib-lrpcsvc.ln:= REALPATH=../../lib/llib-lrpcsvc.ln $(ROOT)/usr/lib/llib-lrpcsvc:= REALPATH=../../lib/llib-lrpcsvc $(ROOT)/usr/lib/llib-lrt.ln:= REALPATH=../../lib/llib-lrt.ln $(ROOT)/usr/lib/llib-lrt:= REALPATH=../../lib/llib-lrt -$(ROOT)/usr/lib/llib-lrtld_db.ln:= REALPATH=../../lib/llib-lrtld_db.ln -$(ROOT)/usr/lib/llib-lrtld_db:= REALPATH=../../lib/llib-lrtld_db $(ROOT)/usr/lib/llib-lscf.ln:= REALPATH=../../lib/llib-lscf.ln $(ROOT)/usr/lib/llib-lscf:= REALPATH=../../lib/llib-lscf $(ROOT)/usr/lib/llib-lsec.ln:= REALPATH=../../lib/llib-lsec.ln @@ -1375,14 +1359,10 @@ $(ROOT)/usr/lib/$(MACH64)/llib-ldevinfo.ln:= \ REALPATH=../../../lib/$(MACH64)/llib-ldevinfo.ln $(ROOT)/usr/lib/$(MACH64)/llib-ldhcputil.ln:= \ REALPATH=../../../lib/$(MACH64)/llib-ldhcputil.ln -$(ROOT)/usr/lib/$(MACH64)/llib-ldl.ln:= \ - REALPATH=../../../lib/$(MACH64)/llib-ldl.ln $(ROOT)/usr/lib/$(MACH64)/llib-ldoor.ln:= \ REALPATH=../../../lib/$(MACH64)/llib-ldoor.ln $(ROOT)/usr/lib/$(MACH64)/llib-lefi.ln:= \ REALPATH=../../../lib/$(MACH64)/llib-lefi.ln -$(ROOT)/usr/lib/$(MACH64)/llib-lelf.ln:= \ - REALPATH=../../../lib/$(MACH64)/llib-lelf.ln $(ROOT)/usr/lib/$(MACH64)/llib-lgen.ln:= \ REALPATH=../../../lib/$(MACH64)/llib-lgen.ln $(ROOT)/usr/lib/$(MACH64)/llib-linetutil.ln:= \ @@ -1411,8 +1391,6 @@ $(ROOT)/usr/lib/$(MACH64)/llib-lrpcsvc.ln:= \ REALPATH=../../../lib/$(MACH64)/llib-lrpcsvc.ln $(ROOT)/usr/lib/$(MACH64)/llib-lrt.ln:= \ REALPATH=../../../lib/$(MACH64)/llib-lrt.ln -$(ROOT)/usr/lib/$(MACH64)/llib-lrtld_db.ln:= \ - REALPATH=../../../lib/$(MACH64)/llib-lrtld_db.ln $(ROOT)/usr/lib/$(MACH64)/llib-lscf.ln:= \ REALPATH=../../../lib/$(MACH64)/llib-lscf.ln $(ROOT)/usr/lib/$(MACH64)/llib-lsec.ln:= \ @@ -1636,14 +1614,10 @@ SYM.USRLIB= \ /usr/lib/llib-ldhcpagent.ln \ /usr/lib/llib-ldhcputil \ /usr/lib/llib-ldhcputil.ln \ - /usr/lib/llib-ldl \ - /usr/lib/llib-ldl.ln \ /usr/lib/llib-ldoor \ /usr/lib/llib-ldoor.ln \ /usr/lib/llib-lefi \ /usr/lib/llib-lefi.ln \ - /usr/lib/llib-lelf \ - /usr/lib/llib-lelf.ln \ /usr/lib/llib-lgen \ /usr/lib/llib-lgen.ln \ /usr/lib/llib-linetutil \ @@ -1672,8 +1646,6 @@ SYM.USRLIB= \ /usr/lib/llib-lrpcsvc.ln \ /usr/lib/llib-lrt \ /usr/lib/llib-lrt.ln \ - /usr/lib/llib-lrtld_db \ - /usr/lib/llib-lrtld_db.ln \ /usr/lib/llib-lscf \ /usr/lib/llib-lscf.ln \ /usr/lib/llib-lsec \ @@ -1870,10 +1842,8 @@ SYM.USRLIB64= \ /usr/lib/$(MACH64)/llib-ldevid.ln \ /usr/lib/$(MACH64)/llib-ldevinfo.ln \ /usr/lib/$(MACH64)/llib-ldhcputil.ln \ - /usr/lib/$(MACH64)/llib-ldl.ln \ /usr/lib/$(MACH64)/llib-ldoor.ln \ /usr/lib/$(MACH64)/llib-lefi.ln \ - /usr/lib/$(MACH64)/llib-lelf.ln \ /usr/lib/$(MACH64)/llib-lgen.ln \ /usr/lib/$(MACH64)/llib-linetutil.ln \ /usr/lib/$(MACH64)/llib-lintl.ln \ @@ -1888,7 +1858,6 @@ SYM.USRLIB64= \ /usr/lib/$(MACH64)/llib-lresolv.ln \ /usr/lib/$(MACH64)/llib-lrpcsvc.ln \ /usr/lib/$(MACH64)/llib-lrt.ln \ - /usr/lib/$(MACH64)/llib-lrtld_db.ln \ /usr/lib/$(MACH64)/llib-lscf.ln \ /usr/lib/$(MACH64)/llib-lsec.ln \ /usr/lib/$(MACH64)/llib-lsecdb.ln \ diff --git a/usr/src/cmd/backup/Makefile.targ b/usr/src/cmd/backup/Makefile.targ index 900b0d4b66..2d6e21f5e7 100644 --- a/usr/src/cmd/backup/Makefile.targ +++ b/usr/src/cmd/backup/Makefile.targ @@ -19,18 +19,15 @@ # # CDDL HEADER END # -# -# ident "%Z%%M% %I% %E% SMI" + # # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/backup/Makefile.targ -# # support for debugging debug:= DUMPLIB= libdump_g.a -debug:= CFLAGS= -g $(XESS) -DDEBUG -DFDEBUG -DTDEBUG ${SBFLAGS} +debug:= CFLAGS= $(CCGDEBUG) $(XESS) -DDEBUG -DFDEBUG -DTDEBUG ${SBFLAGS} CFLAGS += $(XSTRCONST) DEBUGDIR= .debug DEBUGOBJS= $(OBJECTS:%=$(DEBUGDIR)/%) diff --git a/usr/src/cmd/backup/dump/Makefile b/usr/src/cmd/backup/dump/Makefile index 997ffeaa64..965fcf8eae 100644 --- a/usr/src/cmd/backup/dump/Makefile +++ b/usr/src/cmd/backup/dump/Makefile @@ -88,7 +88,7 @@ FILEMODE= 04555 .KEEP_STATE: -all: $(PRODUCT) +all: $(PRODUCT) $(PROG): $(OBJECTS) $$(LIBDUMP) $(LINK.c) -o $@ $(OBJECTS) $(LDLIBS) @@ -139,11 +139,6 @@ roll_log.o: cp $(ROLLOBJS) . pwd -.debug/roll_log.o: - cd $(ROLLDIR) ; pwd ; $(MAKE) CFLAGS=-g - cp $(ROLLOBJS) .debug - pwd - $(ROLLPOFILES): $(ROLLSRCS) cd $(ROLLDIR) ; pwd ; $(MAKE) `echo $(ROLLPOFILES) | sed -e 's@$(ROLLDIR)/@@g'` cp $(ROLLDIR)/*.po . diff --git a/usr/src/cmd/backup/lib/Makefile b/usr/src/cmd/backup/lib/Makefile index 42c882a999..0cccf936d7 100644 --- a/usr/src/cmd/backup/lib/Makefile +++ b/usr/src/cmd/backup/lib/Makefile @@ -77,7 +77,7 @@ GLIB= libdump_g.a DEBUGS= $(OBJECTS:%=.debug/%) $(GLIB):= AROBJS = $(DEBUGS) $(GLIB):= DIR = .debug -$(GLIB):= CFLAGS= -g $(XESS) -DDEBUG -DYYDEBUG ${SBFLAGS} +$(GLIB):= CFLAGS= $(CCGDEBUG) $(XESS) -DDEBUG -DYYDEBUG ${SBFLAGS} .KEEP_STATE: @@ -120,4 +120,4 @@ check: $(HDRS) # include library targets include ../../../lib/Makefile.targ -_msg: $(POFILE) +_msg: $(POFILE) diff --git a/usr/src/cmd/cmd-inet/sbin/dhcpagent/Makefile b/usr/src/cmd/cmd-inet/sbin/dhcpagent/Makefile index 7c552b830f..5f677b7e7c 100644 --- a/usr/src/cmd/cmd-inet/sbin/dhcpagent/Makefile +++ b/usr/src/cmd/cmd-inet/sbin/dhcpagent/Makefile @@ -44,11 +44,6 @@ CERRWARN += -_gcc=-Wno-parentheses # not linted SMATCH=off - -# -# to compile a debug version, do a `make COPTFLAG="-g -XO0"' -# - CPPFLAGS += -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ LDLIBS += -lxnet -lnvpair -ldhcpagent -ldhcputil -linetutil -ldevinfo \ -ldlpi -lresolv -lsocket -lipadm diff --git a/usr/src/cmd/file/Makefile b/usr/src/cmd/file/Makefile index 7f7da7c2d0..1446290a05 100644 --- a/usr/src/cmd/file/Makefile +++ b/usr/src/cmd/file/Makefile @@ -50,8 +50,8 @@ SMATCH=off POFILE= file_all.po POFILES= $(SRCS:%.c=%.po) -# The debug binary can be built using the flag -# -D COPTFLAG=-g CGLOBALSTATIC= +# The debug binary can be built using the flags +# SOURCEDEBUG=yes CGLOBALSTATIC= # This will avoid the multiple symbols definition error # for static global variables in elf_read32.o and elf_read64.o diff --git a/usr/src/cmd/fs.d/pcfs/fsck/Makefile b/usr/src/cmd/fs.d/pcfs/fsck/Makefile index dbe2df4a98..4be0621768 100644 --- a/usr/src/cmd/fs.d/pcfs/fsck/Makefile +++ b/usr/src/cmd/fs.d/pcfs/fsck/Makefile @@ -48,11 +48,6 @@ POFILE= fsck.po catalog: $(POFILE) -# -# Uncomment the following two lines to build for dbx debugging -#COPTFLAG = -g -#COPTFLAG64 = -g -# CPPFLAGS += -D_LARGEFILE64_SOURCE CERRWARN += -_gcc=-Wno-parentheses diff --git a/usr/src/cmd/fs.d/smbclnt/mount/Makefile b/usr/src/cmd/fs.d/smbclnt/mount/Makefile index 8f61e99026..20435bcf08 100644 --- a/usr/src/cmd/fs.d/smbclnt/mount/Makefile +++ b/usr/src/cmd/fs.d/smbclnt/mount/Makefile @@ -47,13 +47,7 @@ CSTD= $(CSTD_GNU99) LDLIBS += -lsmbfs -CPPFLAGS += -I$(SRC)/uts/common -I$(SRC)/lib/libsmbfs - -# uncomment these for dbx debugging -#COPTFLAG = -g -#CTF_FLAGS = -#CTFCONVERT_O= -#CTFMERGE_LIB= +CPPFLAGS += -I$(SRC)/uts/common -I$(SRC)/lib/libsmbfs .KEEP_STATE: @@ -67,5 +61,5 @@ install: $(ROOTLIBFSTYPEPROG) lint: lint_SRCS -clean: +clean: $(RM) $(OBJS) $(POFILE) diff --git a/usr/src/cmd/fs.d/smbclnt/smbiod/Makefile b/usr/src/cmd/fs.d/smbclnt/smbiod/Makefile index 0b1f468a2b..c6e91f33b4 100644 --- a/usr/src/cmd/fs.d/smbclnt/smbiod/Makefile +++ b/usr/src/cmd/fs.d/smbclnt/smbiod/Makefile @@ -51,12 +51,6 @@ SMATCH=off # Debugging ${NOT_RELEASE_BUILD} CPPFLAGS += -DDEBUG -# uncomment these for dbx debugging -#COPTFLAG = -g -#CTF_FLAGS = -#CTFCONVERT_O= -#CTFMERGE_LIB= - all: $(TYPEPROG) catalog: $(POFILE) diff --git a/usr/src/cmd/fs.d/smbclnt/smbutil/Makefile b/usr/src/cmd/fs.d/smbclnt/smbutil/Makefile index 5794a07956..ae9dd15817 100644 --- a/usr/src/cmd/fs.d/smbclnt/smbutil/Makefile +++ b/usr/src/cmd/fs.d/smbclnt/smbutil/Makefile @@ -59,12 +59,6 @@ SMATCH=off # Debugging ${NOT_RELEASE_BUILD} CPPFLAGS += -DDEBUG -# uncomment these for dbx debugging -#COPTFLAG = -g -#CTF_FLAGS = -#CTFCONVERT_O= -#CTFMERGE_LIB= - # disable some of the less important lint LINTFLAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2 LINTFLAGS += -erroff=E_FUNC_RET_MAYBE_IGNORED2 diff --git a/usr/src/cmd/geniconvtbl/Makefile.com b/usr/src/cmd/geniconvtbl/Makefile.com index 95049755ef..adca670979 100644 --- a/usr/src/cmd/geniconvtbl/Makefile.com +++ b/usr/src/cmd/geniconvtbl/Makefile.com @@ -75,14 +75,13 @@ ROOTDIRS64= $(ROOTLIB)/iconv/$(MACH64) ROOTITM32 = $(ROOTDIRS32)/$(ITM) ROOTITM64 = $(ROOTDIRS64)/$(ITM) -# -# definition for some useful target like clean, +# defined for some useful targets like clean, OBJS = $(SRCSC1:%.c=%.o) $(YTABC:.c=.o) $(LEXYY:.c=.o) CHECKHDRS = $(HDRS%.h=%.check) CLOBBERFILES= $(ITM) $(SRCYC) -CLEANFILES = $(OBJS) $(YTABC) $(YTABH) $(LEXYY) $(YOUT) \ +CLEANFILES = $(OBJS) $(YTABC) $(YTABH) $(LEXYY) $(YOUT) \ $(POFILES) $(POFILE) CPPFLAGS += -I. -I.. @@ -92,13 +91,13 @@ CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-unused-variable CERRWARN += -_gcc=-Wno-implicit-function-declaration YFLAGS += -d -v -CFLAGS += -D_FILE_OFFSET_BITS=64 +CFLAGS += -D_FILE_OFFSET_BITS=64 # dump_expr() is too hairy SMATCH=off $(ITM) := CFLAGS += $(GSHARED) $(C_PICFLAGS) $(ZTEXT) -h$@ -$(ITM) := CPPFLAGS += -D_REENTRANT +$(ITM) := CPPFLAGS += -D_REENTRANT $(ITM) := sparc_CFLAGS += -xregs=no%appl $(ITM) := sparcv9_CFLAGS += -xregs=no%appl @@ -172,11 +171,7 @@ cstyle: $(SRCS) clean: $(RM) $(CLEANFILES) -debug: - $(MAKE) all COPTFLAG='' COPTFLAG64='' CFLAGS='-g -DDEBUG' - - -%.o: %.c +%.o: %.c $(COMPILE.c) $< %.o: ../%.c @@ -185,7 +180,6 @@ debug: # install rule -# $(ROOTDIRS32)/%: $(ROOTDIRS32) % -$(INS.file) diff --git a/usr/src/cmd/hal/Makefile.hal b/usr/src/cmd/hal/Makefile.hal index d95bc3e498..7e03986055 100644 --- a/usr/src/cmd/hal/Makefile.hal +++ b/usr/src/cmd/hal/Makefile.hal @@ -22,6 +22,8 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright (c) 2018, Joyent, Inc. +# # Definitions common for HAL code and consumers # @@ -59,7 +61,7 @@ HAL_DBUS_CPPFLAGS = -DDBUS_API_SUBJECT_TO_CHANGE \ -I$(ADJUNCT_PROTO)/usr/include/dbus-1.0 \ -I$(ADJUNCT_PROTO)/usr/lib/dbus-1.0/include -HAL_GLIB_CPPFLAGS = -I$(ADJUNCT_PROTO)/usr/include/glib-2.0 \ +HAL_GLIB_CPPFLAGS = -I$(ADJUNCT_PROTO)/usr/include/glib-2.0 \ -I$(ADJUNCT_PROTO)/usr/lib/glib-2.0/include HAL_GETTEXT_PACKAGE = $(TEXT_DOMAIN) @@ -71,3 +73,6 @@ CERRWARN += -_gcc=-Wno-extra CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-address CERRWARN += -_gcc=-Wno-unused-function + +# not linted +SMATCH=off diff --git a/usr/src/cmd/hal/addons/cpufreq/Makefile b/usr/src/cmd/hal/addons/cpufreq/Makefile index 1fdf1ad83c..ce5fc8d4f4 100644 --- a/usr/src/cmd/hal/addons/cpufreq/Makefile +++ b/usr/src/cmd/hal/addons/cpufreq/Makefile @@ -37,7 +37,8 @@ LDLIBS += -lc -ldbus-1 -lhal -lglib-2.0 -ldbus-glib-1 -lpolkit -lbsm CPPFLAGS += $(HAL_DBUS_CPPFLAGS) $(HAL_GLIB_CPPFLAGS) $(HAL_CONFIG_CPPFLAGS) CPPFLAGS += -I$(ROOT)/usr/include/hal -I../../hald -CPPFLAGS += -I$(ROOT)/usr/include/libpolkit -g +CPPFLAGS += -I$(ROOT)/usr/include/libpolkit +CFLAGS += $(CCGDEBUG) CSTD = $(CSTD_GNU99) .KEEP_STATE: diff --git a/usr/src/cmd/idmap/idmap/Makefile b/usr/src/cmd/idmap/idmap/Makefile index e8d87e4d9c..7f62b99649 100644 --- a/usr/src/cmd/idmap/idmap/Makefile +++ b/usr/src/cmd/idmap/idmap/Makefile @@ -27,7 +27,7 @@ PROG = idmap CLIENTOBJS = idmap.o idmap_engine.o namemaps.o # idmap_clnt.o CLIENTSRCS = $(CLIENTOBJS:%.o=%.c) -POFILES = $(CLIENTOBJS:.o=.po) +POFILES = $(CLIENTOBJS:.o=.po) OBJS = $(CLIENTOBJS) SRCS = $(CLIENTSRCS) IDMAP_PROT_DIR = $(SRC)/head/rpcsvc @@ -45,7 +45,7 @@ CERRWARN += -_gcc=-Wno-address # not linted SMATCH=off -POFILE = $(PROG)_all.po +POFILE = $(PROG)_all.po LDLIBS += -lidmap -ladutils -lsldap -lldap FILEMODE = 0555 @@ -66,7 +66,7 @@ lint_SRCS := CPPFLAGS += $(INCS) all: $(PROG) $(PROG): $(OBJS) - $(LINK.c) -g -o $@ $(OBJS) $(LDLIBS) + $(LINK.c) $(CCGDEBUG) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) $(POFILE): $(POFILES) diff --git a/usr/src/cmd/idmap/nltest/Makefile b/usr/src/cmd/idmap/nltest/Makefile index 1e6cb034fd..887c19880f 100644 --- a/usr/src/cmd/idmap/nltest/Makefile +++ b/usr/src/cmd/idmap/nltest/Makefile @@ -27,13 +27,13 @@ PROG = nltest CLIENTOBJS = nltest.o CLIENTSRCS = $(CLIENTOBJS:%.o=%.c) -POFILES = $(CLIENTOBJS:.o=.po) +POFILES = $(CLIENTOBJS:.o=.po) OBJS = $(CLIENTOBJS) SRCS = $(CLIENTSRCS) include ../../Makefile.cmd -POFILE = $(PROG)_all.po +POFILE = $(PROG)_all.po LDLIBS += -lads -luuid FILEMODE = 0555 @@ -50,7 +50,7 @@ lint_SRCS := CPPFLAGS += $(INCS) all: $(PROG) $(PROG): $(OBJS) - $(LINK.c) -g -o $@ $(OBJS) $(LDLIBS) + $(LINK.c) $(CCGDEBUG) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) $(POFILE): $(POFILES) diff --git a/usr/src/cmd/idmap/test-getdc/Makefile b/usr/src/cmd/idmap/test-getdc/Makefile index 10238ebb01..1ae331fa4a 100644 --- a/usr/src/cmd/idmap/test-getdc/Makefile +++ b/usr/src/cmd/idmap/test-getdc/Makefile @@ -27,11 +27,11 @@ PROG = test-getdc OBJS = getdc_main.o SRCS = $(OBJS:%.o=%.c) -POFILES = $(OBJS:.o=.po) +POFILES = $(OBJS:.o=.po) include ../../Makefile.cmd -POFILE = $(PROG)_all.po +POFILE = $(PROG)_all.po LDLIBS += -ladutils -lnsl -lumem LDFLAGS += -R'$$ORIGIN/../lib' @@ -51,7 +51,7 @@ lint_SRCS := CPPFLAGS += $(INCS) all: $(PROG) $(PROG): $(OBJS) FRC - $(LINK.c) -g -o $@ $(OBJS) $(LDLIBS) + $(LINK.c) $(CCGDEBUG) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) $(POFILE): $(POFILES) diff --git a/usr/src/cmd/latencytop/Makefile.com b/usr/src/cmd/latencytop/Makefile.com index 8bfc1e13a6..9918e58bee 100644 --- a/usr/src/cmd/latencytop/Makefile.com +++ b/usr/src/cmd/latencytop/Makefile.com @@ -22,6 +22,7 @@ # Copyright (c) 2008-2009, Intel Corporation. # All Rights Reserved. # +# Copyright (c) 2018, Joyent, Inc. PROG = latencytop OBJS = latencytop.o display.o dwrapper.o klog.o stat.o table.o util.o @@ -34,6 +35,8 @@ CFLAGS64 += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-uninitialized +SMOFF += all_func_returns + CPPFLAGS += -DEMBED_CONFIGS -I$(ADJUNCT_PROTO)/usr/include/glib-2.0 \ -I$(ADJUNCT_PROTO)/usr/lib/glib-2.0/include CSTD = $(CSTD_GNU99) diff --git a/usr/src/cmd/mdb/sun4u/Makefile.kmdb b/usr/src/cmd/mdb/sun4u/Makefile.kmdb index b19c14a9a4..dc58c5e066 100644 --- a/usr/src/cmd/mdb/sun4u/Makefile.kmdb +++ b/usr/src/cmd/mdb/sun4u/Makefile.kmdb @@ -86,7 +86,7 @@ MAPFILE_SOURCES = \ %.fth: $(SRC)/cmd/mdb/sparc/kmdb/%.fdbg grep '^#' <$< >$(<F).c grep -v '^#' <$< >$(<F).tmp - $(CC) $(CTFSTABSCFLAGS) $(CPPFLAGS) -g -c -o $(<F).o $(<F).c + $(CC) $(CTFSTABSCFLAGS) $(CPPFLAGS) $(CCGDEBUG) -c -o $(<F).o $(<F).c $(CTFCONVERT) $(CTFCVTFLAGS) $(<F).o $(CTFSTABS) -t forth -i $(<F).tmp -o $@ $(<F).o $(RM) $(<F).c $(<F).tmp $(<F).o diff --git a/usr/src/cmd/mdb/sun4v/Makefile.kmdb b/usr/src/cmd/mdb/sun4v/Makefile.kmdb index 335d3ec082..6412a9f017 100644 --- a/usr/src/cmd/mdb/sun4v/Makefile.kmdb +++ b/usr/src/cmd/mdb/sun4v/Makefile.kmdb @@ -95,7 +95,7 @@ MAPFILE_SOURCES = \ %.fth: $(SRC)/cmd/mdb/sparc/kmdb/%.fdbg grep '^#' <$< >$(<F).c grep -v '^#' <$< >$(<F).tmp - $(CC) $(CTFSTABSCFLAGS) $(CPPFLAGS) -g -c -o $(<F).o $(<F).c + $(CC) $(CTFSTABSCFLAGS) $(CPPFLAGS) $(CCGDEBUG) -c -o $(<F).o $(<F).c $(CTFCONVERT) $(CTFCVTFLAGS) $(<F).o $(CTFSTABS) -t forth -i $(<F).tmp -o $@ $(<F).o $(RM) $(<F).c $(<F).tmp $(<F).o diff --git a/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/Makefile b/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/Makefile index 187517ea11..66e2527c01 100644 --- a/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/Makefile +++ b/usr/src/cmd/print/printmgr/com/sun/admin/pm/server/Makefile @@ -35,7 +35,7 @@ JNIHDR_FILES = com_sun_admin_pm_server_DoPrinterNS.h OBJECTS = DoPrinterNS.o NS.o -CLASSFILES = Printer.class \ +CLASSFILES = Printer.class \ Host.class \ SysCommand.class \ NameService.class \ @@ -111,7 +111,7 @@ $(JNIHDR_FILES): $(JNICLASSFILES) # Build standalone programs for testing # NS: NS.c - $(CC) NS.c -g $(ILDOFF) -o NS -DMAIN=1 $(ENVLDLIBS1) $(ENVLIBS2) \ + $(CC) NS.c $(CCGDEBUG) $(ILDOFF) -o NS -DMAIN=1 $(ENVLDLIBS1) $(ENVLIBS2) \ -lprint -lnsl -lsocket lint: $(JNIHDR_FILES) lintcheck diff --git a/usr/src/cmd/sgs/0@0/Makefile.com b/usr/src/cmd/sgs/0@0/Makefile.com index cb8aba4043..42da97d835 100644 --- a/usr/src/cmd/sgs/0@0/Makefile.com +++ b/usr/src/cmd/sgs/0@0/Makefile.com @@ -22,6 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # LIBRARY= 0@0.a @@ -32,7 +33,7 @@ CRTI= pics/crti.o CRTN= pics/crtn.o CRTS= $(CRTI) $(CRTN) -include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.lib MAPFILES= ASFLAGS= -P -D_ASM $(CPPFLAGS) @@ -43,7 +44,7 @@ BUILD.s= $(AS) $(ASFLAGS) $< -o $@ SRCS= $(OBJECTS:%.o=../common/%.c) -CLEANFILES += $(LINTOUT) $(CRTS) +CLEANFILES += $(CRTS) CLOBBERFILES += $(DYNLIB) ROOTDYNLIB= $(DYNLIB:%=$(ROOTLIBDIR)/%) diff --git a/usr/src/cmd/sgs/0@0/Makefile.targ b/usr/src/cmd/sgs/0@0/Makefile.targ index 07f3bdd901..9e9f4a645a 100644 --- a/usr/src/cmd/sgs/0@0/Makefile.targ +++ b/usr/src/cmd/sgs/0@0/Makefile.targ @@ -18,12 +18,11 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# pics/%.o: ../common/%.c $(COMPILE.c) -o $@ $< @@ -41,7 +40,3 @@ include $(SRC)/lib/Makefile.targ delete: $(RM) $(DYNLIB) - -lint: - perl ../../tools/lint_hdr.pl 0@0.so.1 > $(LINTOUT) - $(LINT.c) $(SRCS) 2>&1 | tee -a $(LINTOUT) diff --git a/usr/src/cmd/sgs/Makefile b/usr/src/cmd/sgs/Makefile index f43ea16e2c..d9ac6c2305 100644 --- a/usr/src/cmd/sgs/Makefile +++ b/usr/src/cmd/sgs/Makefile @@ -22,6 +22,7 @@ # Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2016 RackTop Systems. # Copyright 2017 Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include $(SRC)/cmd/Makefile.cmd @@ -92,7 +93,7 @@ POFILES= $(POSUBDIRS:%=%/%.po) MSGSUBDIRS= ld ldd libld liblddbg \ libldstab librtld rtld libelf \ ldprof libcrle pvs elfdump \ - elfedit crle moe lari \ + elfedit crle moe lari \ librtld_db elfwrap ar MSGDIR= messages @@ -146,7 +147,7 @@ install_lib: FRC @ cd lex; pwd; $(MAKE) $@ @ cd yacc; pwd; $(MAKE) $@ -lint: $(SUBDIRS) +lint: delete \ clean clobber: native-clobber .WAIT $(SUBDIRS) $(MSGDIR) @@ -181,7 +182,7 @@ FRC: # and tweak the file globs slightly. # XRPRUNE= rtld.4.x packages abi -XRADD= *.msg mapfile* llib-[a-z]* +XRADD= *.msg mapfile* XRDEL= Makefile* kobj_* # diff --git a/usr/src/cmd/sgs/Makefile.com b/usr/src/cmd/sgs/Makefile.com index 9230fd96de..c2c5143c66 100644 --- a/usr/src/cmd/sgs/Makefile.com +++ b/usr/src/cmd/sgs/Makefile.com @@ -22,6 +22,7 @@ # # Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2016 RackTop Systems. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # .KEEP_STATE: @@ -135,46 +136,6 @@ native := DYNFLAGS = -R$(SGSLIBDIR) -L$(SGSLIBDIR) $(ZNOVERSION) \ CC_USE_PROTO = -Yl,$(SGSBINDIR) LD_USE_PROTO = $(SGSBINDIR)/ -# -# lint-related stuff -# -LIBNAME32 = $(LIBNAME:%=%32) -LIBNAME64 = $(LIBNAME:%=%64) -LIBNAMES = $(LIBNAME32) $(LIBNAME64) - -SGSLINTOUT = lint.out -LINTOUT1 = lint.out.1 -LINTOUT32 = lint.out.32 -LINTOUT64 = lint.out.64 -LINTOUTS = $(SGSLINTOUT) $(LINTOUT1) $(LINTOUT32) $(LINTOUT64) - -LINTLIBSRC = $(LINTLIB:%.ln=%) -LINTLIB32 = $(LINTLIB:%.ln=%32.ln) -LINTLIB64 = $(LINTLIB:%.ln=%64.ln) -LINTLIBS = $(LINTLIB32) $(LINTLIB64) - -LINTFLAGS = -m -errtags=yes -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED -LINTFLAGS64 = -m -errtags=yes -erroff=E_SUPPRESSION_DIRECTIVE_UNUSED \ - $(VAR_LINTFLAGS64) - -# -# When building a lint library, no other lint libraries are verified as -# dependencies, nor is the stardard C lint library processed. All dependency -# verification is carried out through linting the sources themselves. -# -$(LINTLIB) := LINTFLAGS += -n -$(LINTLIB) := LINTFLAGS64 += -n - -$(LINTLIB32) := LINTFLAGS += -n -$(LINTLIB32) := LINTFLAGS64 += -n -$(LINTLIB64) := LINTFLAGS += -n -$(LINTLIB64) := LINTFLAGS64 += -n - -# -# These libraries have two resulting lint libraries. If a dependency is -# declared using these variables, the substitution for the 32/64 versions at -# lint time happens automatically (see Makefile.targ). -# LD_LIB = -lld LD_LIB32 = -lld32 LD_LIB64 = -lld64 diff --git a/usr/src/cmd/sgs/Makefile.sub b/usr/src/cmd/sgs/Makefile.sub index 08fb449778..31d82769b8 100644 --- a/usr/src/cmd/sgs/Makefile.sub +++ b/usr/src/cmd/sgs/Makefile.sub @@ -19,13 +19,10 @@ # CDDL HEADER END # -# -# ident "%Z%%M% %I% %E% SMI" -# # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# Standard subdirs makefile for the sgs area. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include $(SRC)/Makefile.master @@ -49,7 +46,6 @@ clean := TARGET= clean clobber := TARGET= clobber delete := TARGET= delete install := TARGET= install -lint := TARGET= lint catalog := TARGET= catalog package := TARGET= package chkmsg := TARGET= chkmsg @@ -57,7 +53,7 @@ chkmsg := TARGET= chkmsg .KEEP_STATE: .KEEP_STATE_FILE: .make.state.$(MACH) -all clean clobber delete install lint catalog package chkmsg: \ +all clean clobber delete install catalog package chkmsg: \ $(SUBDIRS) $(SUBDIRS): FRC diff --git a/usr/src/cmd/sgs/Makefile.targ b/usr/src/cmd/sgs/Makefile.targ index 4940367e99..776fedad57 100644 --- a/usr/src/cmd/sgs/Makefile.targ +++ b/usr/src/cmd/sgs/Makefile.targ @@ -22,11 +22,12 @@ # # Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2016 RackTop Systems. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # # Standard install rules # The VAR_SGSBIN and VAR_SGSBIN64 install rules included here are applicable -# to Solaris 10 and earlier releases. For post Solaris 10 releases, the +# to Solaris 10 and earlier releases. For post Solaris 10 releases, the # standard ROOTBIN and ROOTBIN64 rules defined in ../Makefile.cmd are used. # The new rules here are included to allow for easier backporting. Making # the appropriate updates in ./Makefile.var, will allow the SGS components @@ -38,188 +39,6 @@ $(VAR_SGSBIN)/%: % $(VAR_SGSBIN64)/%: % $(INS.file) -################################################################################ -# -# Linting the Linker Libraries -# -# Several of the linker's libraries are, in whole or in part, built in two -# passes, once as Elf32 and once as Elf64 (i.e. with -D_ELF64 defined). Lint -# needs to be able to do both passes, but combining the two is problematic for -# the 2nd pass of lint, as it sees many interfaces as being defined both ways -# and considers them to be incompatible. The targets defined here allow for -# both passes to live independently. This means that both the lint.out, and -# the lint library itself get generated separately, to different output files. -# The lint.out's get combined into a single lint.out report, and the lint -# libraries get generated with a 32/64 suffix. The dependents on these lint -# libraries, then, choose which version they need to use. Substitutions can -# be made automatically if the macro's defined in ./Makefile.com are used to -# specify the dependency, for those libs that need them. -# -# Don't -# -# Don't use the /*LINTLIBRARY*/ directive in linker libraries, this disables -# some important checks, including the ability to test format strings from the -# msg.h files. -# -# Don't use the `-x' option to lint when linting linker libraries. This masks -# all the dead wood in our own header files. Instead, there has been added to -# the relevant common directories a file called `lintsup.c' which is used to -# mask out the headers that we aren't interested in. This method is used for -# libraries, like libld, which have their own header files, but is irrelevant -# to libraries like libldstab which exports no interface of it's own. -# -# The `lintsup.c' file can also be used, in some cases, to mask out other -# issues that lint won't otherwise shut up about. -# -# Other Lint Options -# -# `-m' has been added to the LINTFLAGS. Warnings about globals that could be -# static are irrelevant as we use mapfiles to scope down unnecessary globals. -# -# `-u' is used in the LINTFLAGS for libraries, otherwise lint tends to be very -# noisy. -# -# `-x' is avoided for libraries, but is used for executables because all we -# care about is that what we use is defined, not about declarations in public -# headers that we don't use. -# -# Relevant variables: -# -# */Makefile.com -# SRCS= ../common/llib-l<libname> -# LINTSRCS= <source files> -# LDLIBS= ... [$(LDDBG_LIB) $(LD_LIB)] -# LINTFLAGS= ... -# LINTFLAGS64= ... -# CLEANFILES += ... $(LINTOUTS) -# CLOBBERFILES += ... $(LINTLIBS) -# -# Relevant targets: -# -# */Makefile.targ -# # this file for SGS lint targets. -# include $(SRC)/cmd/sgs/Makefile.targ -# -# lint: <choose the desired functionality> $(SGSLINTOUT) -# -# $(LINTLIB32), -# $(LINTLIB64) Create an Elf32 or Elf64 lint library from -# a proto file indicated by the $(SRCS) variable. -# -# $(LINTOUT32), -# $(LINTOUT64) Run lint on the sources indicated by the -# $(LINTSRCS) variable with respect to Elf32 -# or Elf64. Dependencies are gathered from -# the $(LDLIBS) variable. -# -# $(SGSLINTOUT) Create a `lint.out' file as the concatination -# of the lint output from the previous targets. -# This should be specified *last* in the list. -# -################################################################################ - -# -# Override the OS's $(LINTOUT) target to avoid confusion. -# -LINTOUT = $(LINTOUT1) - -# -# If LD_LIB, LDDBG_LIB, or CONV_LIB is added to LDLIBS, then the right lint -# library should be picked up automatically. -# -$(LINTOUT32) := LD_LIB=$(LD_LIB32) -$(LINTOUT32) := LDDBG_LIB=$(LDDBG_LIB32) -$(LINTOUT32) := CONV_LIB=$(CONV_LIB32) - -$(LINTOUT64) := LD_LIB=$(LD_LIB64) -$(LINTOUT64) := LDDBG_LIB=$(LDDBG_LIB64) -$(LINTOUT64) := CONV_LIB=$(CONV_LIB64) - -# -# Force $(LINTLIB) in order to help the $(SGSLINTOUT) -# target produce the same output on successive runs. -# -$(LINTLIB): FRC - -$(LINTLIB32): $(SRCS) - $(LINT.c) -o $(LIBNAME32) $(SRCS) - -$(LINTLIB64): $(SRCS) - $(LINT.c) -D_ELF64 -o $(LIBNAME64) $(SRCS) - -$(LINTOUT32): $(LINTSRCS) $(LINTSRCS32) - $(LINT.c) $(LINTSRCS) $(LINTSRCS32) $(LDLIBS) > $(LINTOUT32) 2>&1 - -$(LINTOUT64): $(LINTSRCS) $(LINTSRCS64) - $(LINT.c) -D_ELF64 $(LINTSRCS) $(LINTSRCS64) \ - $(LDLIBS) > $(LINTOUT64) 2>&1 - -# -# A couple of macros used in the SGSLINTOUT rule below -# -# LINT_HDR - Use sgs/tools/lint_hdr.pl to generate lint output headers -# LINT_TEE - Use tee to write output to stdout and also capture it -# in the SGSLINT output file. -# -# An additional complexity: We produce headers for all the lint -# output so that we can tell what came from where when we look -# at the resulting file. We also cat these headers to stdout so that -# the user of make will see them. However, we don't want the headers -# to go to stdout if there is only one of LINTOUT32 and LINTOUT64. To -# the interactive user, the headers are only interesting as a way to -# separate the two ELF classes. We only bother with this for the -# non-DYNLIB and non-RTLD case, because at the current time, both of these -# cases always have both 32 and 64-bit ELFCLASS support. -# -LINT_HDR= perl $(SGSTOOLS)/lint_hdr.pl -LINT_TEE= tee -a $(SGSLINTOUT) - -$(SGSLINTOUT): FRC - @ rm -f $(SGSLINTOUT) - @ if [ -r $(LINTOUT1) ]; then \ - $(LINT_HDR) $(LINTLIB) | $(LINT_TEE); \ - cat $(LINTOUT1) | $(LINT_TEE); \ - fi - @ if [ -r $(LINTOUT32) ]; then \ - if [ -n "$(DYNLIB)" ] ; then \ - $(LINT_HDR) $(DYNLIB) 32 | $(LINT_TEE); \ - elif [ -n "$(RTLD)" ] ; then \ - $(LINT_HDR) $(RTLD) 32 | $(LINT_TEE); \ - else \ - if [ -r $(LINTOUT64) ]; then \ - $(LINT_HDR) $(PROG) 32 | $(LINT_TEE); \ - else \ - $(LINT_HDR) $(PROG) 32 >> $(SGSLINTOUT); \ - fi; \ - fi; \ - cat $(LINTOUT32) | $(LINT_TEE); \ - fi - @ if [ -r $(LINTOUT64) ]; then \ - if [ -n "$(DYNLIB)" ] ; then \ - if [ $(DYNLIB) = "libld.so.2" ] ; then \ - $(LINT_HDR) libld.so.3 64 | $(LINT_TEE); \ - else \ - $(LINT_HDR) $(DYNLIB) 64 | $(LINT_TEE); \ - fi; \ - elif [ -n "$(RTLD)" ] ; then \ - $(LINT_HDR) $(RTLD) 64 | $(LINT_TEE); \ - else \ - if [ -r $(LINTOUT32) ]; then \ - $(LINT_HDR) $(PROG) 64 | $(LINT_TEE); \ - else \ - $(LINT_HDR) $(PROG) 64 >> $(SGSLINTOUT); \ - fi; \ - fi; \ - cat $(LINTOUT64) | $(LINT_TEE); \ - fi - @ rm -f $(LINTOUT1) $(LINTOUT32) $(LINTOUT64) - -# -# For those that install the lint library source file. -# -$(ROOTLIBDIR)/$(LINTLIBSRC): ../common/$(LINTLIBSRC) - $(INS.file) ../common/$(LINTLIBSRC) - $(ROOTFS_LIBDIR)/$(LIBLINKS): $(ROOTFS_LIBDIR)/$(LIBLINKS)$(VERS) $(INS.liblink) diff --git a/usr/src/cmd/sgs/Makefile.var b/usr/src/cmd/sgs/Makefile.var index d6452d1f0e..2e27e5411b 100644 --- a/usr/src/cmd/sgs/Makefile.var +++ b/usr/src/cmd/sgs/Makefile.var @@ -21,16 +21,17 @@ # # Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # # The link-editor related source files and Makefile files have at times been # unified across all presently maintained release gates. However, some of the # compiler pre-processor flags and link-editor flags are different among the -# releases. This file is used to specify such flags. -# +# releases. This file is used to specify such flags. +# # This file is included by ./Makefile.com, but may also be included directly in # the case where the utility is relying on the contents of ../../Makefile.com. -# +# # This file should be the only file which is different among the presently # maintained release workspaces, when the sources are unified. # @@ -40,7 +41,7 @@ # Some source files need to use #ifdef to distinguish between the patch release, # and for the packages targeting to the pre-libc/libthread unified environment. # These values are available for CPPFLAGS: -# +# # SGS_PRE_UNIFIED_PROCESS # # is set if the target release is for pre-libc/libthread unified @@ -49,7 +50,6 @@ # # Common Macro definitions # -VAR_LINTFLAGS64= -m64 VAR_PLAT_sparc= sparc VAR_PLAT_i386= intel/ia32 diff --git a/usr/src/cmd/sgs/ar/Makefile.com b/usr/src/cmd/sgs/ar/Makefile.com index e2064d26ea..99e73f70ce 100644 --- a/usr/src/cmd/sgs/ar/Makefile.com +++ b/usr/src/cmd/sgs/ar/Makefile.com @@ -21,6 +21,7 @@ # # Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # PROG= ar @@ -47,8 +48,6 @@ CERRWARN += -_gcc=-Wno-uninitialized SMOFF += signed LDLIBS += -lelf $(CONVLIBDIR) $(CONV_LIB) -lsendfile -LINTFLAGS= -x -LINTFLAGS64= -x $(XPG4) := CPPFLAGS += -DXPG4 @@ -65,6 +64,5 @@ SGSMSGALL = $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n ar_msg SRCS= $(COMOBJ:%.o=../common/%.c) $(BLTDATA:%.o=$(SGSTOOLS)/common/%.c) -LINTSRCS= $(SRCS) ../common/lintsup.c -CLEANFILES += $(LINTOUTS) $(BLTFILES) +CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/ar/Makefile.targ b/usr/src/cmd/sgs/ar/Makefile.targ index 6d28736736..c962a700fc 100644 --- a/usr/src/cmd/sgs/ar/Makefile.targ +++ b/usr/src/cmd/sgs/ar/Makefile.targ @@ -20,6 +20,7 @@ # # # Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. objs/%.o \ objs.xpg4/%.o: ../common/%.c @@ -39,10 +40,6 @@ delete: catalog: $(BLTMESG) -.PARALLEL: $(LINTOUT32) $(LINTOUT64) - -lint: $(LINTOUT32) $(SGSLINTOUT) - $(PROG): $(OBJS) $(LINK.c) -o $@ $(LLDFLAGS) $(OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/sgs/ar/amd64/Makefile b/usr/src/cmd/sgs/ar/amd64/Makefile index 4077158a06..4522ff6331 100644 --- a/usr/src/cmd/sgs/ar/amd64/Makefile +++ b/usr/src/cmd/sgs/ar/amd64/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -31,7 +32,6 @@ LLDFLAGS = $(LLDFLAGS64) CONVLIBDIR = $(CONVLIBDIR64) ELFLIBDIR = $(ELFLIBDIR64) LDDBGLIBDIR = $(LDDBGLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) ROOTPROG = $(ROOTPROG64) diff --git a/usr/src/cmd/sgs/ar/common/lintsup.c b/usr/src/cmd/sgs/ar/common/lintsup.c deleted file mode 100644 index e456077e2e..0000000000 --- a/usr/src/cmd/sgs/ar/common/lintsup.c +++ /dev/null @@ -1,37 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - */ - -/* - * Supplemental Pseudo-code to get lint to consider these symbols used. - */ -#include <msg.h> - -#pragma error_messages(off, E_STATIC_UNUSED) - -static void -foo(void) -{ - (void) _ar_msg((Msg)&__ar_msg[0]); -} diff --git a/usr/src/cmd/sgs/ar/sparcv9/Makefile b/usr/src/cmd/sgs/ar/sparcv9/Makefile index dc3747cacb..d1d43e8fda 100644 --- a/usr/src/cmd/sgs/ar/sparcv9/Makefile +++ b/usr/src/cmd/sgs/ar/sparcv9/Makefile @@ -20,6 +20,7 @@ # # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -30,7 +31,6 @@ LLDFLAGS = $(LLDFLAGS64) CONVLIBDIR = $(CONVLIBDIR64) ELFLIBDIR = $(ELFLIBDIR64) LDDBGLIBDIR = $(LDDBGLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) ROOTPROG = $(ROOTPROG64) diff --git a/usr/src/cmd/sgs/crle/Makefile.com b/usr/src/cmd/sgs/crle/Makefile.com index 0a26a6845a..252ecd28a3 100644 --- a/usr/src/cmd/sgs/crle/Makefile.com +++ b/usr/src/cmd/sgs/crle/Makefile.com @@ -24,13 +24,15 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= crle include $(SRC)/cmd/Makefile.cmd include $(SRC)/cmd/sgs/Makefile.com -COMOBJ= config.o crle.o depend.o dump.o \ +COMOBJ= config.o crle.o depend.o dump.o \ inspect.o hash.o print.o util.o BLTOBJ= msg.o TOOLSOBJ= alist.o @@ -50,8 +52,6 @@ LLDFLAGS64 = '-R$$ORIGIN/../../lib/$(MACH64)' LDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPT) \ $(LLDFLAGS) $(ZNOLAZYLOAD) LDLIBS += -lelf $(CONVLIBDIR) $(CONV_LIB) $(DLLIB) -LINTFLAGS += -x -LINTFLAGS64 += -x BLTDEFS= msg.h BLTDATA= msg.c @@ -67,6 +67,5 @@ SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n crle_msg SRCS= $(COMOBJ:%.o=../common/%.c) $(BLTDATA) \ $(TOOLSOBJ:%.o=$(SGSTOOLS)/common/%.c) -LINTSRCS= $(SRCS) ../common/lintsup.c -CLEANFILES += $(SGSLINTOUT) $(BLTFILES) +CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/crle/Makefile.targ b/usr/src/cmd/sgs/crle/Makefile.targ index b851144f89..850e37892f 100644 --- a/usr/src/cmd/sgs/crle/Makefile.targ +++ b/usr/src/cmd/sgs/crle/Makefile.targ @@ -20,6 +20,9 @@ # # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. +# +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# %.o: ../common/%.c $(COMPILE.c) $< @@ -44,13 +47,11 @@ clean: delete: $(RM) $(PROG) -lint: $(SGSLINTOUT) - include $(SRC)/cmd/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ # Derived source and header files (messaging). - + catalog: $(BLTMESG) chkmsg: $(SRCS) diff --git a/usr/src/cmd/sgs/crle/amd64/Makefile b/usr/src/cmd/sgs/crle/amd64/Makefile index 6f4bdc5f8c..a93a68d57b 100644 --- a/usr/src/cmd/sgs/crle/amd64/Makefile +++ b/usr/src/cmd/sgs/crle/amd64/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -35,11 +35,8 @@ LLDFLAGS = $(LLDFLAGS64) CONVLIBDIR = $(CONVLIBDIR64) ELFLIBDIR = $(ELFLIBDIR64) LDDBGLIBDIR = $(LDDBGLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) ROOTPROG = $(ROOTPROG64) -lint: $(LINTOUT64) - include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/crle/common/lintsup.c b/usr/src/cmd/sgs/crle/common/lintsup.c deleted file mode 100644 index 71be8eb2a4..0000000000 --- a/usr/src/cmd/sgs/crle/common/lintsup.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Supplimental Pseudo-code to get lint to consider these symbols used. - */ -#include "alist.h" -#include "msg.h" - -#pragma error_messages(off, E_STATIC_UNUSED) - -static void -foo() -{ - (void) _crle_msg((Msg)&__crle_msg[0]); - - (void) alist_append(NULL, NULL, 0, 0); - alist_delete_by_offset(NULL, NULL); - (void) alist_insert_by_offset(NULL, NULL, 0, 0, 0); - alist_reset(NULL); - - (void) aplist_delete_value(NULL, NULL); - aplist_reset(NULL); - (void) aplist_test(NULL, NULL, 0); -} diff --git a/usr/src/cmd/sgs/crle/i386/Makefile b/usr/src/cmd/sgs/crle/i386/Makefile index 76eacd820c..c516dbb377 100644 --- a/usr/src/cmd/sgs/crle/i386/Makefile +++ b/usr/src/cmd/sgs/crle/i386/Makefile @@ -18,16 +18,14 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. +# +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include ../Makefile.com .KEEP_STATE: -lint: $(LINTOUT32) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/crle/sparc/Makefile b/usr/src/cmd/sgs/crle/sparc/Makefile index 76eacd820c..c516dbb377 100644 --- a/usr/src/cmd/sgs/crle/sparc/Makefile +++ b/usr/src/cmd/sgs/crle/sparc/Makefile @@ -18,16 +18,14 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. +# +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include ../Makefile.com .KEEP_STATE: -lint: $(LINTOUT32) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/crle/sparcv9/Makefile b/usr/src/cmd/sgs/crle/sparcv9/Makefile index 6f4bdc5f8c..a93a68d57b 100644 --- a/usr/src/cmd/sgs/crle/sparcv9/Makefile +++ b/usr/src/cmd/sgs/crle/sparcv9/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -35,11 +35,8 @@ LLDFLAGS = $(LLDFLAGS64) CONVLIBDIR = $(CONVLIBDIR64) ELFLIBDIR = $(ELFLIBDIR64) LDDBGLIBDIR = $(LDDBGLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) ROOTPROG = $(ROOTPROG64) -lint: $(LINTOUT64) - include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/dump/Makefile.com b/usr/src/cmd/sgs/dump/Makefile.com index 4a0d909491..2224b6ffe1 100644 --- a/usr/src/cmd/sgs/dump/Makefile.com +++ b/usr/src/cmd/sgs/dump/Makefile.com @@ -24,11 +24,13 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= dump -include $(SRC)/cmd/Makefile.cmd -include $(SRC)/cmd/sgs/Makefile.com +include $(SRC)/cmd/Makefile.cmd +include $(SRC)/cmd/sgs/Makefile.com COMOBJS= dump.o fcns.o @@ -47,7 +49,3 @@ CERRWARN += -_gcc=-Wno-uninitialized SMOFF += indenting LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf -LINTFLAGS += -x -LINTSRCS = $(SRCS) - -CLEANFILES += $(LINTOUTS) diff --git a/usr/src/cmd/sgs/dump/amd64/Makefile b/usr/src/cmd/sgs/dump/amd64/Makefile index 57cd6b100e..b6617b6dad 100644 --- a/usr/src/cmd/sgs/dump/amd64/Makefile +++ b/usr/src/cmd/sgs/dump/amd64/Makefile @@ -23,7 +23,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -40,7 +40,5 @@ VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) include ../Makefile.targ include ../../Makefile.sub.64 -lint: $(LINTOUT64) $(SGSLINTOUT) - install \ package: $(VAR_SGSBINPROG64) diff --git a/usr/src/cmd/sgs/dump/i386/Makefile b/usr/src/cmd/sgs/dump/i386/Makefile index 761372e144..ba0a4032e6 100644 --- a/usr/src/cmd/sgs/dump/i386/Makefile +++ b/usr/src/cmd/sgs/dump/i386/Makefile @@ -23,13 +23,11 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com .KEEP_STATE: -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/dump/sparc/Makefile b/usr/src/cmd/sgs/dump/sparc/Makefile index 761372e144..ba0a4032e6 100644 --- a/usr/src/cmd/sgs/dump/sparc/Makefile +++ b/usr/src/cmd/sgs/dump/sparc/Makefile @@ -23,13 +23,11 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com .KEEP_STATE: -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/dump/sparcv9/Makefile b/usr/src/cmd/sgs/dump/sparcv9/Makefile index 018d76d3bd..c0c824f3f3 100644 --- a/usr/src/cmd/sgs/dump/sparcv9/Makefile +++ b/usr/src/cmd/sgs/dump/sparcv9/Makefile @@ -23,7 +23,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -40,7 +40,5 @@ VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) include ../Makefile.targ include ../../Makefile.sub.64 -lint: $(LINTOUT64) $(SGSLINTOUT) - install \ package: $(VAR_SGSBINPROG64) diff --git a/usr/src/cmd/sgs/elfdump/Makefile.com b/usr/src/cmd/sgs/elfdump/Makefile.com index fcc0489e9f..5d5c1f4345 100644 --- a/usr/src/cmd/sgs/elfdump/Makefile.com +++ b/usr/src/cmd/sgs/elfdump/Makefile.com @@ -22,6 +22,7 @@ # # Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # PROG= elfdump @@ -31,8 +32,8 @@ include $(SRC)/cmd/sgs/Makefile.com COMOBJ = main.o corenote.o \ dwarf.o struct_layout.o \ - struct_layout_i386.o struct_layout_amd64.o \ - struct_layout_sparc.o struct_layout_sparcv9.o + struct_layout_i386.o struct_layout_amd64.o \ + struct_layout_sparc.o struct_layout_sparcv9.o COMOBJ32 = elfdump32.o fake_shdr32.o @@ -56,9 +57,6 @@ LDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPT) $(LLDFLAGS) LDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) $(LDDBG_LIB) \ $(CONVLIBDIR) $(CONV_LIB) -LINTFLAGS += -x -LINTFLAGS64 += -x - CERRWARN += -_gcc=-Wno-uninitialized # not linted @@ -78,6 +76,5 @@ SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n elfdump_msg SRCS = $(COMOBJ:%.o=../common/%.c) \ $(COMOBJ32:%32.o=../common/%.c) \ $(TOOLOBJ:%.o=../../tools/common/%.c) $(BLTDATA) -LINTSRCS = $(SRCS) ../common/lintsup.c -CLEANFILES += $(LINTOUTS) $(BLTFILES) gen_struct_layout +CLEANFILES += $(BLTFILES) gen_struct_layout diff --git a/usr/src/cmd/sgs/elfdump/Makefile.targ b/usr/src/cmd/sgs/elfdump/Makefile.targ index a0125d8a3d..bef356bb28 100644 --- a/usr/src/cmd/sgs/elfdump/Makefile.targ +++ b/usr/src/cmd/sgs/elfdump/Makefile.targ @@ -24,6 +24,7 @@ # Use is subject to license terms. # # Copyright 2015 Nexenta Systems, Inc. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # %.o: ../common/%.c @@ -81,10 +82,6 @@ install: all $(VAR_SGSBINPROG) $(VAR_SGSCCSLINK) -$(RM) $(ROOTPROG) -$(LN) $(ISAEXEC) $(ROOTPROG) -.PARALLEL: $(LINTOUT32) $(LINTOUT64) - -lint: $(LINTOUT32) $(LINTOUT64) $(SGSLINTOUT) - include $(SRC)/cmd/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ diff --git a/usr/src/cmd/sgs/elfdump/amd64/Makefile b/usr/src/cmd/sgs/elfdump/amd64/Makefile index 039edb65b6..7c3f1eb876 100644 --- a/usr/src/cmd/sgs/elfdump/amd64/Makefile +++ b/usr/src/cmd/sgs/elfdump/amd64/Makefile @@ -23,6 +23,8 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include ../Makefile.com @@ -33,7 +35,6 @@ LLDFLAGS = $(LLDFLAGS64) ELFLIBDIR = $(ELFLIBDIR64) LDDBGLIBDIR = $(LDDBGLIBDIR64) CONVLIBDIR = $(CONVLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) VAR_SGSBINPROG= $(VAR_SGSBINPROG64) VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) diff --git a/usr/src/cmd/sgs/elfdump/common/lintsup.c b/usr/src/cmd/sgs/elfdump/common/lintsup.c deleted file mode 100644 index 7ace5b4906..0000000000 --- a/usr/src/cmd/sgs/elfdump/common/lintsup.c +++ /dev/null @@ -1,58 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Supplemental Pseudo-code to get lint to consider these symbols used. - */ -#include <sys/types.h> -#include <libelf.h> -#include <conv.h> -#include <msg.h> -#include <_elfdump.h> - -#pragma error_messages(off, E_STATIC_UNUSED) - -static void -foo() -{ - (void) _elfdump_msg((Msg)&__elfdump_msg[0]); -} - -#if defined(_ELF64) -int -regular32(const char *file, int fd, Elf *elf, uint_t flags, - const char *wname, int wfd, uchar_t osabi) -{ - return (regular64(file, fd, elf, flags, wname, wfd, osabi)); -} -#else -int -regular64(const char *file, int fd, Elf *elf, uint_t flags, - const char *wname, int wfd, uchar_t osabi) -{ - return (regular32(file, fd, elf, flags, wname, wfd, osabi)); -} -#endif diff --git a/usr/src/cmd/sgs/elfdump/sparcv9/Makefile b/usr/src/cmd/sgs/elfdump/sparcv9/Makefile index e629729766..9dd92b9635 100644 --- a/usr/src/cmd/sgs/elfdump/sparcv9/Makefile +++ b/usr/src/cmd/sgs/elfdump/sparcv9/Makefile @@ -23,6 +23,8 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include ../Makefile.com @@ -33,7 +35,6 @@ LLDFLAGS = $(LLDFLAGS64) ELFLIBDIR = $(ELFLIBDIR64) LDDBGLIBDIR = $(LDDBGLIBDIR64) CONVLIBDIR = $(CONVLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) VAR_SGSBINPROG= $(VAR_SGSBINPROG64) VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) diff --git a/usr/src/cmd/sgs/elfedit/Makefile.com b/usr/src/cmd/sgs/elfedit/Makefile.com index 67059f62b0..276d11972e 100644 --- a/usr/src/cmd/sgs/elfedit/Makefile.com +++ b/usr/src/cmd/sgs/elfedit/Makefile.com @@ -23,6 +23,8 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= elfedit @@ -50,9 +52,6 @@ LDFLAGS += $(VERSREF) $(CC_USE_PROTO) -M$(MAPFILE) $(LLDFLAGS) LDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) $(LDDBG_LIB) \ $(CONVLIBDIR) $(CONV_LIB) -ltecla -LINTFLAGS += -x -LINTFLAGS64 += -x - CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-uninitialized @@ -70,6 +69,5 @@ SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n elfedit_msg SRCS = $(COMOBJ:%.o=../common/%.c) \ $(COMOBJ32:%32.o=../common/%.c) \ $(BLTDATA) -LINTSRCS = $(SRCS) ../common/lintsup.c -CLEANFILES += $(LINTOUTS) $(BLTFILES) +CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/elfedit/amd64/Makefile b/usr/src/cmd/sgs/elfedit/amd64/Makefile index 75487b577b..0d3551cdc4 100644 --- a/usr/src/cmd/sgs/elfedit/amd64/Makefile +++ b/usr/src/cmd/sgs/elfedit/amd64/Makefile @@ -23,7 +23,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -40,7 +40,5 @@ ROOTPROG= $(ROOTPROG64) include ../Makefile.targ include ../../Makefile.sub.64 -lint: $(LINTOUT64) $(SGSLINTOUT) - install \ package: $(ROOTPROG64) diff --git a/usr/src/cmd/sgs/elfedit/common/lintsup.c b/usr/src/cmd/sgs/elfedit/common/lintsup.c deleted file mode 100644 index f27def869c..0000000000 --- a/usr/src/cmd/sgs/elfedit/common/lintsup.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Supplemental Pseudo-code to get lint to consider these symbols used. - */ -#include <msg.h> -#include <debug.h> -#include <elfedit.h> - -/* - * Lint doesn't understand that both elfedit{32|64}_init_obj_state() - * gets built, because it doesn't know that elfedit_machelf.c gets - * compiled twice. The difference between this case and the others - * is that we don't use macros to give them both the same name, - * because elfedit.c needs to know about both explictly. So, - * supply the "missing" one here, for lint's benefit. - * - * This dummy routine eliminates the "name used but not defined" - * errors that otherwise result. - */ -#ifdef _ELF64 -/*ARGSUSED*/ -void -elfedit32_init_obj_state(const char *file, int fd, Elf *elf) -{ -} -#else -/*ARGSUSED*/ -void -elfedit64_init_obj_state(const char *file, int fd, Elf *elf) -{ -} -#endif - -#pragma error_messages(off, E_STATIC_UNUSED) - -static void -foo() -{ - dbg_print(NULL, NULL, 0); - - elfedit_array_elts_delete(NULL, NULL, 0, 0, 0, 0); - elfedit_array_elts_move(NULL, NULL, 0, 0, 0, 0, 0, NULL); - - (void) _elfedit_msg((Msg)&__elfedit_msg[0]); - - (void) elfedit_atoi(NULL, NULL); - (void) elfedit_atoui(NULL, NULL); - (void) elfedit_atoconst(NULL, 0); - - (void) elfedit_atoi2(NULL, NULL, NULL); - (void) elfedit_atoui2(NULL, NULL, NULL); - (void) elfedit_atoconst2(NULL, 0, NULL); - - (void) elfedit_atoi_range(NULL, NULL, 0, 0, NULL); - (void) elfedit_atoui_range(NULL, NULL, 0, 0, NULL); - (void) elfedit_atoconst_range(NULL, NULL, 0, 0, 0); - - (void) elfedit_atoi_range2(NULL, 0, 0, NULL, NULL); - (void) elfedit_atoui_range2(NULL, 0, 0, NULL, NULL); - (void) elfedit_atoconst_range2(NULL, 0, 0, 0, NULL); - - (void) elfedit_atoi_value_to_str(NULL, 0, 0); - (void) elfedit_atoui_value_to_str(NULL, 0, 0); - (void) elfedit_atoconst_value_to_str(0, 0, 0); - - (void) elfedit_atoshndx(NULL, 0); - - (void) elfedit_cpl_atoi(NULL, NULL); - (void) elfedit_cpl_atoui(NULL, NULL); - (void) elfedit_cpl_atoconst(NULL, 0); - (void) elfedit_cpl_ndx(NULL, 0); - - (void) elfedit_dyn_offset_to_str(NULL, NULL); - (void) elfedit_dynstr_insert(NULL, NULL, NULL, NULL); - (void) elfedit_flags(); - (void) elfedit_modified_ehdr(NULL); - (void) elfedit_modified_phdr(NULL); - (void) elfedit_modified_shdr(NULL); - (void) elfedit_name_to_shndx(NULL, NULL); - (void) elfedit_name_to_symndx(NULL, NULL, NULL, ELFEDIT_MSG_ERR, NULL); - (void) elfedit_outstyle(); - (void) elfedit_sec_get(NULL, NULL); - (void) elfedit_sec_getcap(NULL, NULL, NULL); - (void) elfedit_sec_getdyn(NULL, NULL, NULL); - (void) elfedit_sec_getstr(NULL, 0, 0); - (void) elfedit_sec_getsyminfo(NULL, NULL, NULL); - (void) elfedit_sec_getsymtab(NULL, 0, 0, NULL, NULL, NULL, NULL); - (void) elfedit_sec_getversym(NULL, NULL, NULL, NULL); - (void) elfedit_sec_getxshndx(NULL, NULL, NULL, NULL); - (void) elfedit_sec_msgprefix(NULL); - (void) elfedit_shndx_to_name(NULL, NULL); - elfedit_str_to_c_literal(NULL, NULL); - (void) elfedit_strtab_insert(NULL, NULL, NULL, NULL); - (void) elfedit_strtab_insert_test(NULL, NULL, NULL, NULL); - (void) elfedit_type_to_shndx(NULL, 0); -} diff --git a/usr/src/cmd/sgs/elfedit/i386/Makefile b/usr/src/cmd/sgs/elfedit/i386/Makefile index 11b6540fbb..756663813d 100644 --- a/usr/src/cmd/sgs/elfedit/i386/Makefile +++ b/usr/src/cmd/sgs/elfedit/i386/Makefile @@ -23,13 +23,11 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com .KEEP_STATE: -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/elfedit/modules/Makefile b/usr/src/cmd/sgs/elfedit/modules/Makefile index 864315211c..8171228077 100644 --- a/usr/src/cmd/sgs/elfedit/modules/Makefile +++ b/usr/src/cmd/sgs/elfedit/modules/Makefile @@ -18,12 +18,11 @@ # # CDDL HEADER END # -# -# ident "%Z%%M% %I% %E% SMI" -# # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include $(SRC)/Makefile.master @@ -37,11 +36,10 @@ install:= TARGET= install package:= TARGET= package clean:= TARGET= clean clobber:= TARGET= clobber -lint:= TARGET= lint .KEEP_STATE: -package all chkmsg catalog clean clobber lint install: \ +package all chkmsg catalog clean clobber install: \ $(SUBDIRS) $(SUBDIRS): FRC diff --git a/usr/src/cmd/sgs/elfedit/modules/Makefile.com b/usr/src/cmd/sgs/elfedit/modules/Makefile.com index 226b8a4f13..e49e89a81f 100644 --- a/usr/src/cmd/sgs/elfedit/modules/Makefile.com +++ b/usr/src/cmd/sgs/elfedit/modules/Makefile.com @@ -23,6 +23,8 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include ../../../../../lib/Makefile.lib include ../../../Makefile.com @@ -99,14 +101,11 @@ DYNFLAGS += $(VERSREF) CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-uninitialized -LINTFLAGS += -uaxs $(LDLIBS) -LINTFLAGS64 += -uaxs $(LDLIBS64) - BLTDEFS = $(ELFEDITLIBS:%.so=%_msg.h) BLTDATA = $(ELFEDITLIBS:%.so=%_msg.c) BLTFILES = $(BLTDEFS) $(BLTDATA) -CLEANFILES += $(BLTFILES) $(LINTOUT) $(PICDIR)/* +CLEANFILES += $(BLTFILES) $(PICDIR)/* CLOBBERFILES += $(ELFEDITLIBS) ROOTELFEDITDIR= $(ROOT)/usr/lib/elfedit diff --git a/usr/src/cmd/sgs/elfedit/modules/Makefile.targ b/usr/src/cmd/sgs/elfedit/modules/Makefile.targ index 231a6a083c..24f3b53e68 100644 --- a/usr/src/cmd/sgs/elfedit/modules/Makefile.targ +++ b/usr/src/cmd/sgs/elfedit/modules/Makefile.targ @@ -22,7 +22,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # @@ -113,7 +113,6 @@ catalog: $(SGSMSGDIR)/elfedit_cap \ $(SGSMSGDIR)/elfedit_str \ $(SGSMSGDIR)/elfedit_sym \ $(SGSMSGDIR)/elfedit_syminfo - chkmsg: $(SRCS) sh $(CHKMSG) -m ../common/cap.msg ../common/cap.c @@ -126,32 +125,4 @@ chkmsg: $(SRCS) sh $(CHKMSG) -m ../common/syminfo.msg ../common/syminfo.c -LINT_HDR= perl $(SGSTOOLS)/lint_hdr.pl - -lint: - $(LINT_HDR) "elfedit modules" > $(LINTOUT) - $(LINT_HDR) -s "cap.so" >> $(LINTOUT) - $(LINT.c) ../common/cap.c 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s "dyn.so" >> $(LINTOUT) - $(LINT.c) ../common/dyn.c 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s "ehdr.so" >> $(LINTOUT) - $(LINT.c) ../common/ehdr.c 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s "phdr.so" >> $(LINTOUT) - $(LINT.c) ../common/phdr.c 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s "shdr.so" >> $(LINTOUT) - $(LINT.c) ../common/shdr.c 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s "str.so" >> $(LINTOUT) - $(LINT.c) ../common/str.c 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s "sym.so" >> $(LINTOUT) - $(LINT.c) ../common/sym.c 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s "syminfo.so" >> $(LINTOUT) - $(LINT.c) ../common/syminfo.c 2>&1 | tee -a $(LINTOUT) - include $(SRC)/lib/Makefile.targ diff --git a/usr/src/cmd/sgs/elfedit/modules/amd64/Makefile b/usr/src/cmd/sgs/elfedit/modules/amd64/Makefile index c69276347c..61caecccdc 100644 --- a/usr/src/cmd/sgs/elfedit/modules/amd64/Makefile +++ b/usr/src/cmd/sgs/elfedit/modules/amd64/Makefile @@ -23,7 +23,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -33,16 +33,10 @@ CONVLIBDIR = $(CONVLIBDIR64) ELFLIBDIR = $(ELFLIBDIR64) MTARG = amd64/ -lint := CONV_LIB = $(CONV_LIB64) -lint := LDDBG_LIB = $(LDDBG_LIB64) - CFLAGS64 += $(C_PICFLAGS64) LLDFLAGS = $(LLDFLAGS64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) - - .KEEP_STATE: all: $(PICDIR) .WAIT $(ELFEDITLIBS) diff --git a/usr/src/cmd/sgs/elfedit/modules/i386/Makefile b/usr/src/cmd/sgs/elfedit/modules/i386/Makefile index d8203060c0..cce4b929ec 100644 --- a/usr/src/cmd/sgs/elfedit/modules/i386/Makefile +++ b/usr/src/cmd/sgs/elfedit/modules/i386/Makefile @@ -23,14 +23,11 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com -lint := CONV_LIB = $(CONV_LIB32) -lint := LDDBG_LIB = $(LDDBG_LIB32) - CFLAGS += $(C_PICFLAGS) .KEEP_STATE: diff --git a/usr/src/cmd/sgs/elfedit/modules/sparc/Makefile b/usr/src/cmd/sgs/elfedit/modules/sparc/Makefile index d8203060c0..cce4b929ec 100644 --- a/usr/src/cmd/sgs/elfedit/modules/sparc/Makefile +++ b/usr/src/cmd/sgs/elfedit/modules/sparc/Makefile @@ -23,14 +23,11 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com -lint := CONV_LIB = $(CONV_LIB32) -lint := LDDBG_LIB = $(LDDBG_LIB32) - CFLAGS += $(C_PICFLAGS) .KEEP_STATE: diff --git a/usr/src/cmd/sgs/elfedit/modules/sparcv9/Makefile b/usr/src/cmd/sgs/elfedit/modules/sparcv9/Makefile index 13c70cd279..bae1a3208a 100644 --- a/usr/src/cmd/sgs/elfedit/modules/sparcv9/Makefile +++ b/usr/src/cmd/sgs/elfedit/modules/sparcv9/Makefile @@ -23,7 +23,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -33,15 +33,10 @@ CONVLIBDIR = $(CONVLIBDIR64) ELFLIBDIR = $(ELFLIBDIR64) MTARG = sparcv9/ -lint := CONV_LIB = $(CONV_LIB64) -lint := LDDBG_LIB = $(LDDBG_LIB64) - CFLAGS64 += $(C_PICFLAGS64) LLDFLAGS = $(LLDFLAGS64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) - .KEEP_STATE: all: $(PICDIR) .WAIT $(ELFEDITLIBS) diff --git a/usr/src/cmd/sgs/elfedit/sparc/Makefile b/usr/src/cmd/sgs/elfedit/sparc/Makefile index 11b6540fbb..756663813d 100644 --- a/usr/src/cmd/sgs/elfedit/sparc/Makefile +++ b/usr/src/cmd/sgs/elfedit/sparc/Makefile @@ -23,13 +23,11 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com .KEEP_STATE: -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/elfedit/sparcv9/Makefile b/usr/src/cmd/sgs/elfedit/sparcv9/Makefile index 75487b577b..0d3551cdc4 100644 --- a/usr/src/cmd/sgs/elfedit/sparcv9/Makefile +++ b/usr/src/cmd/sgs/elfedit/sparcv9/Makefile @@ -23,7 +23,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -40,7 +40,5 @@ ROOTPROG= $(ROOTPROG64) include ../Makefile.targ include ../../Makefile.sub.64 -lint: $(LINTOUT64) $(SGSLINTOUT) - install \ package: $(ROOTPROG64) diff --git a/usr/src/cmd/sgs/elfwrap/Makefile.com b/usr/src/cmd/sgs/elfwrap/Makefile.com index 0236d7a437..a167760c6b 100644 --- a/usr/src/cmd/sgs/elfwrap/Makefile.com +++ b/usr/src/cmd/sgs/elfwrap/Makefile.com @@ -23,6 +23,8 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= elfwrap @@ -54,9 +56,6 @@ LLDFLAGS64 = LDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPTS) $(LLDFLAGS) LDLIBS += $(ELFLIBDIR) -lelf $(CONVLIBDIR) $(CONV_LIB) -LINTFLAGS += -x -LINTFLAGS64 += -x - CERRWARN += -_gcc=-Wno-uninitialized BLTDEFS = msg.h @@ -73,6 +72,5 @@ SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n elfwrap_msg SRCS = $(COMOBJ:%.o=../common/%.c) ../common/machine.c \ $(COMOBJ32:%32.o=../common/%.c) \ $(TOOLOBJ:%.o=../../tools/common/%.c) $(BLTDATA) -LINTSRCS = $(SRCS) ../common/lintsup.c -CLEANFILES += $(LINTOUTS) $(BLTFILES) +CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/elfwrap/Makefile.targ b/usr/src/cmd/sgs/elfwrap/Makefile.targ index 26b0b71032..b315de2c50 100644 --- a/usr/src/cmd/sgs/elfwrap/Makefile.targ +++ b/usr/src/cmd/sgs/elfwrap/Makefile.targ @@ -23,7 +23,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # %.o: ../common/%.c @@ -73,10 +73,6 @@ delete: install \ package: all $(ROOTPROG) -.PARALLEL: $(LINTOUT32) $(LINTOUT64) - -lint: $(LINTOUT32) $(LINTOUT64) $(SGSLINTOUT) - include $(SRC)/cmd/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ diff --git a/usr/src/cmd/sgs/elfwrap/amd64/Makefile b/usr/src/cmd/sgs/elfwrap/amd64/Makefile index 0639219eef..b3fa261cff 100644 --- a/usr/src/cmd/sgs/elfwrap/amd64/Makefile +++ b/usr/src/cmd/sgs/elfwrap/amd64/Makefile @@ -23,7 +23,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -32,7 +32,6 @@ include ../Makefile.com ELFLIBDIR = $(ELFLIBDIR64) CONVLIBDIR = $(CONVLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) ROOTPROG= $(ROOTPROG64) diff --git a/usr/src/cmd/sgs/elfwrap/common/lintsup.c b/usr/src/cmd/sgs/elfwrap/common/lintsup.c deleted file mode 100644 index 83384f72fa..0000000000 --- a/usr/src/cmd/sgs/elfwrap/common/lintsup.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Supplemental Pseudo-code to get lint to consider these symbols used. - */ -#include <msg.h> -#include <_elfwrap.h> - -#pragma error_messages(off, E_STATIC_UNUSED) - -static void -foo() -{ - (void) _elfwrap_msg((Msg)&__elfwrap_msg[0]); -} - -#if defined(_ELF64) -int -input32(int argc, char **argv, const char *prog, const char *ofile, - ObjDesc_t *odp) -{ - return (input64(argc, argv, prog, ofile, odp)); -} - -int -output32(const char *prog, int fd, const char *ofile, ushort_t mach, - ObjDesc_t *odp) -{ - return (output64(prog, fd, ofile, mach, odp)); -} -#else -int -input64(int argc, char **argv, const char *prog, const char *ofile, - ObjDesc_t *odp) -{ - return (input32(argc, argv, prog, ofile, odp)); -} -int -output64(const char *prog, int fd, const char *ofile, ushort_t mach, - ObjDesc_t *odp) -{ - return (output32(prog, fd, ofile, mach, odp)); -} -#endif diff --git a/usr/src/cmd/sgs/elfwrap/sparcv9/Makefile b/usr/src/cmd/sgs/elfwrap/sparcv9/Makefile index 0639219eef..b3fa261cff 100644 --- a/usr/src/cmd/sgs/elfwrap/sparcv9/Makefile +++ b/usr/src/cmd/sgs/elfwrap/sparcv9/Makefile @@ -23,7 +23,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -32,7 +32,6 @@ include ../Makefile.com ELFLIBDIR = $(ELFLIBDIR64) CONVLIBDIR = $(CONVLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) ROOTPROG= $(ROOTPROG64) diff --git a/usr/src/cmd/sgs/error/Makefile b/usr/src/cmd/sgs/error/Makefile index 3f3caea185..f4601aac59 100644 --- a/usr/src/cmd/sgs/error/Makefile +++ b/usr/src/cmd/sgs/error/Makefile @@ -19,13 +19,8 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1993 by Sun Microsystems, Inc. -# -# cmd/sgs/error/Makefile -# +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. include ../../../Makefile.master @@ -35,11 +30,10 @@ all:= TARGET= all install:= TARGET= install clean:= TARGET= clean clobber:= TARGET= clobber -lint:= TARGET= lint .KEEP_STATE: -all clean clobber install lint: $(SUBDIRS) +all clean clobber install: $(SUBDIRS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/sgs/error/i386/Makefile b/usr/src/cmd/sgs/error/i386/Makefile index 0154fd97fa..9d08117798 100644 --- a/usr/src/cmd/sgs/error/i386/Makefile +++ b/usr/src/cmd/sgs/error/i386/Makefile @@ -25,10 +25,12 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= error -include ../../../Makefile.cmd +include ../../../Makefile.cmd OBJS= errormain.o errorinput.o errorpi.o errorsubr.o \ errorfilter.o errortouch.o @@ -46,8 +48,6 @@ CERRWARN += -_gcc=-Wno-parentheses SMOFF += no_if_block,indenting -CLEANFILES += $(LINTOUT) - %.o: ../common/%.c $(COMPILE.c) $< @@ -64,10 +64,4 @@ install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) -lint: $(LINTOUT) - -$(LINTOUT): $(SRCS) - perl ../../tools/lint_hdr.pl $(PROG) > $(LINTOUT) - $(LINT.c) $(SRCS) $(LDLIBS) 2>&1 | tee -a $(LINTOUT) - include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/error/sparc/Makefile b/usr/src/cmd/sgs/error/sparc/Makefile index 2023ad1a42..029bcd6f7d 100644 --- a/usr/src/cmd/sgs/error/sparc/Makefile +++ b/usr/src/cmd/sgs/error/sparc/Makefile @@ -24,11 +24,12 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/error/sparc/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= error -include ../../../Makefile.cmd +include ../../../Makefile.cmd OBJS= errormain.o errorinput.o errorpi.o errorsubr.o \ errorfilter.o errortouch.o @@ -43,8 +44,6 @@ CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses CSTD= $(CSTD_GNU99) -CLEANFILES += $(LINTOUT) - %.o: ../common/%.c $(COMPILE.c) $< @@ -61,10 +60,4 @@ install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) -lint: $(LINTOUT) - -$(LINTOUT): $(SRCS) - perl ../../tools/lint_hdr.pl $(PROG) > $(LINTOUT) - $(LINT.c) $(SRCS) $(LDLIBS) 2>&1 | tee -a $(LINTOUT) - include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/gprof/Makefile b/usr/src/cmd/sgs/gprof/Makefile index 570c5e16f4..9888628550 100644 --- a/usr/src/cmd/sgs/gprof/Makefile +++ b/usr/src/cmd/sgs/gprof/Makefile @@ -20,11 +20,8 @@ # CDDL HEADER END # # -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1993 by Sun Microsystems, Inc. -# -# cmd/sgs/gprof/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../../../Makefile.master @@ -35,11 +32,10 @@ all:= TARGET= all install:= TARGET= install clean:= TARGET= clean clobber:= TARGET= clobber -lint:= TARGET= lint .KEEP_STATE: -all clean clobber install lint: $(SUBDIRS) +all clean clobber install: $(SUBDIRS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/sgs/gprof/Makefile.com b/usr/src/cmd/sgs/gprof/Makefile.com index 435f86d0bd..4dd3a736aa 100644 --- a/usr/src/cmd/sgs/gprof/Makefile.com +++ b/usr/src/cmd/sgs/gprof/Makefile.com @@ -23,11 +23,13 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= gprof -include $(SRC)/cmd/Makefile.cmd -include $(SRC)/cmd/sgs/Makefile.com +include $(SRC)/cmd/Makefile.cmd +include $(SRC)/cmd/sgs/Makefile.com COMOBJS= gprof.o arcs.o dfn.o lookup.o calls.o \ printgprof.o printlist.o readelf.o @@ -42,15 +44,11 @@ CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) -I$(ELFCAP) CFLAGS += $(CCVERBOSE) CSTD= $(CSTD_GNU99) LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf -LINTSRCS = $(SRCS) -LINTFLAGS += -x CERRWARN += -_gcc=-Wno-uninitialized # not linted SMATCH=off -CLEANFILES += $(LINTOUTS) - ROOTLIBBLURB= $(BLURBS:%=$(ROOTSHLIBCCS)/%) $(ROOTLIBBLURB) := FILEMODE= 444 diff --git a/usr/src/cmd/sgs/gprof/i386/Makefile b/usr/src/cmd/sgs/gprof/i386/Makefile index b177dd3916..9919d6f606 100644 --- a/usr/src/cmd/sgs/gprof/i386/Makefile +++ b/usr/src/cmd/sgs/gprof/i386/Makefile @@ -18,16 +18,13 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/gprof/i386/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -include ../Makefile.com +include ../Makefile.com .KEEP_STATE: @@ -35,6 +32,4 @@ all: $(PROG) install: all .WAIT $(ROOTPROG) $(ROOTLIBBLURB) $(ROOTCCSBINLINK) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/gprof/sparc/Makefile b/usr/src/cmd/sgs/gprof/sparc/Makefile index c018b8f889..4d7b282d70 100644 --- a/usr/src/cmd/sgs/gprof/sparc/Makefile +++ b/usr/src/cmd/sgs/gprof/sparc/Makefile @@ -18,15 +18,13 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/gprof/sparc/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# -include ../Makefile.com +include ../Makefile.com DEFLIST += -DSPARC @@ -36,7 +34,5 @@ all: $(PROG) install: all .WAIT $(ROOTPROG) $(ROOTLIBBLURB) $(ROOTCCSBINLINK) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/lari/Makefile b/usr/src/cmd/sgs/lari/Makefile index 64e275975c..c9efe63689 100644 --- a/usr/src/cmd/sgs/lari/Makefile +++ b/usr/src/cmd/sgs/lari/Makefile @@ -19,10 +19,11 @@ # CDDL HEADER END # # -# ident "%Z%%M% %I% %E% SMI" -# # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. +# +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= lari @@ -47,8 +48,7 @@ package: all $(VAR_SGSBINPROG) $(VAR_SGSCCSLINK) clean: $(RM) $(PROG) -chkmsg \ -lint: +chkmsg: catalog: $(POFILE) diff --git a/usr/src/cmd/sgs/ld/Makefile.com b/usr/src/cmd/sgs/ld/Makefile.com index 277b62c95b..9cf9e0a713 100644 --- a/usr/src/cmd/sgs/ld/Makefile.com +++ b/usr/src/cmd/sgs/ld/Makefile.com @@ -22,12 +22,13 @@ # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2016 RackTop Systems. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # PROG = ld -include $(SRC)/cmd/Makefile.cmd -include $(SRC)/cmd/sgs/Makefile.com +include $(SRC)/cmd/Makefile.cmd +include $(SRC)/cmd/sgs/Makefile.com COMOBJS = ld.o BLTOBJ = msg.o @@ -45,11 +46,6 @@ LDLIBS += $(LDLIBDIR) $(LD_LIB) $(ELFLIBDIR) -lelf \ CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses -LINTFLAGS += -x -LINTFLAGS64 += -x $(VAR_LINTFLAGS64) - -CLEANFILES += $(LINTOUTS) - native := LDFLAGS = -R$(SGSLIBDIR) $(ZNOVERSION) native := LDLIBS = -L$(SGSLIBDIR) $(LD_LIB) -lelf $(CONVLIBDIR) \ $(CONV_LIB) @@ -67,7 +63,6 @@ SGSMSGALL= $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n ld_msg SRCS= $(MACHOBJS:%.o=%.c) $(COMOBJS:%.o=../common/%.c) $(BLTDATA) -LINTSRCS= $(SRCS) ../common/lintsup.c CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/ld/Makefile.targ b/usr/src/cmd/sgs/ld/Makefile.targ index 8b1131d9e3..b2155c2a73 100644 --- a/usr/src/cmd/sgs/ld/Makefile.targ +++ b/usr/src/cmd/sgs/ld/Makefile.targ @@ -24,6 +24,7 @@ # Use is subject to license terms. # # Copyright 2016 RackTop Systems. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # all: $(PROG) @@ -45,8 +46,6 @@ clean: delete: $(RM) $(PROG) -lint: $(LINTOUT32) $(SGSLINTOUT) - include $(SRC)/cmd/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ diff --git a/usr/src/cmd/sgs/ld/common/lintsup.c b/usr/src/cmd/sgs/ld/common/lintsup.c deleted file mode 100644 index a47d0081d8..0000000000 --- a/usr/src/cmd/sgs/ld/common/lintsup.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Supplimental Pseudo-code to get lint to consider - * these symbols used. - */ - -#include <stdio.h> -#include "msg.h" - -#pragma error_messages(off, E_STATIC_UNUSED) - -static void -exit(int status) -{ - (void) printf("%s: %d\n", _ld_msg((Msg)&__ld_msg[0]), status); -} diff --git a/usr/src/cmd/sgs/ldd/Makefile.com b/usr/src/cmd/sgs/ldd/Makefile.com index 6530a3e5cb..d3ec53655c 100644 --- a/usr/src/cmd/sgs/ldd/Makefile.com +++ b/usr/src/cmd/sgs/ldd/Makefile.com @@ -24,6 +24,8 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= ldd @@ -46,8 +48,6 @@ LLDFLAGS = '-R$$ORIGIN/../../lib' LLDFLAGS64 = '-R$$ORIGIN/../../../lib/$(MACH64)' LDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPTS) $(LLDFLAGS) LDLIBS += $(CONVLIBDIR) $(CONV_LIB) -lelf $(DLLIB) -LINTFLAGS += -x -LINTFLAGS64 += -x SMOFF += or_vs_and @@ -64,6 +64,5 @@ SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n ldd_msg SRCS= $(COMOBJ:%.o=../common/%.c) $(BLTDATA) \ $(TOOLSOBJ:%.o=$(SGSTOOLS)/common/%.c) -LINTSRCS= $(SRCS) ../common/lintsup.c -CLEANFILES += $(LINTOUTS) $(BLTFILES) +CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/ldd/amd64/Makefile b/usr/src/cmd/sgs/ldd/amd64/Makefile index a89bb7561d..1819ad03dc 100644 --- a/usr/src/cmd/sgs/ldd/amd64/Makefile +++ b/usr/src/cmd/sgs/ldd/amd64/Makefile @@ -18,12 +18,11 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include ../Makefile.com @@ -31,11 +30,8 @@ include ../Makefile.com CONVLIBDIR = $(CONVLIBDIR64) LLDFLAGS = $(LLDFLAGS64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) ROOTPROG = $(ROOTPROG64) -lint: $(LINTOUT64) $(SGSLINTOUT) - include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/ldd/common/lintsup.c b/usr/src/cmd/sgs/ldd/common/lintsup.c deleted file mode 100644 index 6c5115a05a..0000000000 --- a/usr/src/cmd/sgs/ldd/common/lintsup.c +++ /dev/null @@ -1,48 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Supplimental Pseudo-code to get lint to consider these symbols used. - */ -#include "alist.h" -#include "msg.h" - -#pragma error_messages(off, E_STATIC_UNUSED) - -static void -foo() -{ - (void) _ldd_msg((Msg)&__ldd_msg[0]); - - (void) alist_append(NULL, NULL, 0, 0); - alist_delete_by_offset(NULL, NULL); - (void) alist_insert_by_offset(NULL, NULL, 0, 0, 0); - alist_reset(NULL); - - (void) aplist_delete_value(NULL, NULL); - aplist_reset(NULL); - (void) aplist_test(NULL, NULL, 0); -} diff --git a/usr/src/cmd/sgs/ldd/i386/Makefile b/usr/src/cmd/sgs/ldd/i386/Makefile index 32c0e146ac..c604f5274a 100644 --- a/usr/src/cmd/sgs/ldd/i386/Makefile +++ b/usr/src/cmd/sgs/ldd/i386/Makefile @@ -18,12 +18,11 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include ../Makefile.com @@ -32,6 +31,4 @@ include ../Makefile.com install \ package: $(ROOTPROG) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/ldd/sparc/Makefile b/usr/src/cmd/sgs/ldd/sparc/Makefile index 32c0e146ac..c604f5274a 100644 --- a/usr/src/cmd/sgs/ldd/sparc/Makefile +++ b/usr/src/cmd/sgs/ldd/sparc/Makefile @@ -18,12 +18,11 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include ../Makefile.com @@ -32,6 +31,4 @@ include ../Makefile.com install \ package: $(ROOTPROG) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/ldd/sparcv9/Makefile b/usr/src/cmd/sgs/ldd/sparcv9/Makefile index a89bb7561d..1819ad03dc 100644 --- a/usr/src/cmd/sgs/ldd/sparcv9/Makefile +++ b/usr/src/cmd/sgs/ldd/sparcv9/Makefile @@ -18,12 +18,11 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include ../Makefile.com @@ -31,11 +30,8 @@ include ../Makefile.com CONVLIBDIR = $(CONVLIBDIR64) LLDFLAGS = $(LLDFLAGS64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) ROOTPROG = $(ROOTPROG64) -lint: $(LINTOUT64) $(SGSLINTOUT) - include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/lddstub/Makefile.targ b/usr/src/cmd/sgs/lddstub/Makefile.targ index b75c28e088..9575c44150 100644 --- a/usr/src/cmd/sgs/lddstub/Makefile.targ +++ b/usr/src/cmd/sgs/lddstub/Makefile.targ @@ -20,11 +20,11 @@ # CDDL HEADER END # # -#pragma ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1994-2001 by Sun Microsystems, Inc. # All rights reserved. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# .KEEP_STATE: @@ -42,6 +42,4 @@ delete: install: all -lint: - include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/ldprof/Makefile.com b/usr/src/cmd/sgs/ldprof/Makefile.com index f5ebebd867..81c85b2251 100644 --- a/usr/src/cmd/sgs/ldprof/Makefile.com +++ b/usr/src/cmd/sgs/ldprof/Makefile.com @@ -22,6 +22,7 @@ # # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # LIBRARY= ldprof.a @@ -50,12 +51,8 @@ CFLAGS += $(C_PICFLAGS) SMOFF += indenting -lint := ZRECORD = LDLIBS += $(ZRECORD) -lmapmalloc -lc $(DLLIB) -LINTFLAGS += -u -erroff=E_NAME_DECL_NOT_USED_DEF2 -LINTFLAGS64 += -u -erroff=E_NAME_DECL_NOT_USED_DEF2 - BLTDEFS= msg.h BLTDATA= msg.c BLTMESG= $(SGSMSGDIR)/ldprof @@ -68,9 +65,8 @@ SGSMSGALL= $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n ldprof_msg SRCS= $(COMOBJS:%.o=../common/%.c) $(BLTDATA) -LINTSRCS= $(SRCS) ../common/lintsup.c -CLEANFILES += $(LINTOUTS) $(BLTFILES) -CLOBBERFILES += $(DYNLIB) $(LINTLIB) +CLEANFILES += $(BLTFILES) +CLOBBERFILES += $(DYNLIB) ROOTDYNLIB= $(DYNLIB:%=$(ROOTLIBDIR)/%) diff --git a/usr/src/cmd/sgs/ldprof/Makefile.targ b/usr/src/cmd/sgs/ldprof/Makefile.targ index a52407b7b6..abbea3f2cf 100644 --- a/usr/src/cmd/sgs/ldprof/Makefile.targ +++ b/usr/src/cmd/sgs/ldprof/Makefile.targ @@ -22,11 +22,9 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -lint: $(SGSLINTOUT) - pics/%.o: ../common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) diff --git a/usr/src/cmd/sgs/ldprof/amd64/Makefile b/usr/src/cmd/sgs/ldprof/amd64/Makefile index 1958ced85c..5dff83cc9b 100644 --- a/usr/src/cmd/sgs/ldprof/amd64/Makefile +++ b/usr/src/cmd/sgs/ldprof/amd64/Makefile @@ -23,7 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -32,14 +32,12 @@ ROOTLIBDIR64= $(ROOT)/usr/lib/link_audit/$(MACH64) ROOTDYNLIB64= $(DYNLIB:%=$(ROOTLIBDIR64)/%) CFLAGS64 += $(C_PICFLAGS64) -D_ELF64 -LINTFLAGS64 += $(VAR_LINTFLAGS64) .KEEP_STATE: all: $(BLTDEFS) .WAIT $(DYNLIB) install package: all $(ROOTDYNLIB64) @echo doing make install $(ROOTDYNLIB64) -lint: $(LINTOUT64) include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/ldprof/common/lintsup.c b/usr/src/cmd/sgs/ldprof/common/lintsup.c deleted file mode 100644 index 616587919d..0000000000 --- a/usr/src/cmd/sgs/ldprof/common/lintsup.c +++ /dev/null @@ -1,40 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -/* - * Copyright (c) 1999 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Supplimental definitions for lint that help us avoid - * options like `-x' that filter out things we want to - * know about as well as things we don't. - */ -#include "_rtld.h" - -int profile_rtld; -uintptr_t (* p_cg_interp)(int, caddr_t, caddr_t); diff --git a/usr/src/cmd/sgs/ldprof/i386/Makefile b/usr/src/cmd/sgs/ldprof/i386/Makefile index aa584f9c3a..2e70fda0be 100644 --- a/usr/src/cmd/sgs/ldprof/i386/Makefile +++ b/usr/src/cmd/sgs/ldprof/i386/Makefile @@ -19,12 +19,11 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include ../Makefile.com @@ -32,6 +31,5 @@ include ../Makefile.com all: $(BLTDEFS) .WAIT $(DYNLIB) install package: all $(ROOTDYNLIB) -lint: $(LINTOUT32) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/ldprof/sparc/Makefile b/usr/src/cmd/sgs/ldprof/sparc/Makefile index aa584f9c3a..2e70fda0be 100644 --- a/usr/src/cmd/sgs/ldprof/sparc/Makefile +++ b/usr/src/cmd/sgs/ldprof/sparc/Makefile @@ -19,12 +19,11 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include ../Makefile.com @@ -32,6 +31,5 @@ include ../Makefile.com all: $(BLTDEFS) .WAIT $(DYNLIB) install package: all $(ROOTDYNLIB) -lint: $(LINTOUT32) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/ldprof/sparcv9/Makefile b/usr/src/cmd/sgs/ldprof/sparcv9/Makefile index 1958ced85c..5dff83cc9b 100644 --- a/usr/src/cmd/sgs/ldprof/sparcv9/Makefile +++ b/usr/src/cmd/sgs/ldprof/sparcv9/Makefile @@ -23,7 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -32,14 +32,12 @@ ROOTLIBDIR64= $(ROOT)/usr/lib/link_audit/$(MACH64) ROOTDYNLIB64= $(DYNLIB:%=$(ROOTLIBDIR64)/%) CFLAGS64 += $(C_PICFLAGS64) -D_ELF64 -LINTFLAGS64 += $(VAR_LINTFLAGS64) .KEEP_STATE: all: $(BLTDEFS) .WAIT $(DYNLIB) install package: all $(ROOTDYNLIB64) @echo doing make install $(ROOTDYNLIB64) -lint: $(LINTOUT64) include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/lex/Makefile b/usr/src/cmd/sgs/lex/Makefile index c60b9a3848..26fc646e8f 100644 --- a/usr/src/cmd/sgs/lex/Makefile +++ b/usr/src/cmd/sgs/lex/Makefile @@ -19,13 +19,10 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1993,1997 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/sgs/lex/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../../../Makefile.master @@ -39,12 +36,10 @@ install := TARGET= install install_lib := TARGET= install_lib clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint .KEEP_STATE: -all clean clobber install install_lib lint: $(SUBDIRS) - +all clean clobber install install_lib: $(SUBDIRS) $(MACH) $(MACH64): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/sgs/lex/Makefile.com b/usr/src/cmd/sgs/lex/Makefile.com index e13b98168f..f2d2c37388 100644 --- a/usr/src/cmd/sgs/lex/Makefile.com +++ b/usr/src/cmd/sgs/lex/Makefile.com @@ -23,6 +23,8 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= lex @@ -40,7 +42,7 @@ OBJECTS= $(LIBOBJS) $(LIBOBJS_W) $(LIBOBJS_E) FORMS= nceucform ncform nrform -include ../../../../lib/Makefile.lib +include ../../../../lib/Makefile.lib SRCDIR = ../common @@ -57,14 +59,7 @@ MACHSRCS= $(MACHOBJS:%.o=../common/%.c) LIBSRCS = $(LIBOBJS:%.o=../common/%.c) SRCS= $(MACHSRCS) $(LIBSRCS) -LIBS = $(DYNLIB) $(LINTLIB) - -# Append to LINTFLAGS and LINTFLAGS64 from lib/Makefile.lib -LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2 -erroff=E_FUNC_RET_MAYBE_IGNORED2 -LINTFLAGS64 += -erroff=E_NAME_MULTIPLY_DEF2 -erroff=E_FUNC_RET_MAYBE_IGNORED2 - -LINTSRCS= ../common/llib-l$(LIBNAME) -$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC) +LIBS = $(DYNLIB) INCLIST= $(INCLIST_$(MACH)) -I../../include -I../../include/$(MACH) DEFLIST= -DELF @@ -83,15 +78,10 @@ pics/%_e.o:= DEFLIST = -DEUC -DJLSLEX -DEOPTION -D$*=$*_e CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) BUILD.AR= $(AR) $(ARFLAGS) $@ `$(LORDER) $(OBJS) | $(TSORT)` -LINTPOUT= lint.out - $(ROOTPROG):= FILEMODE = 0555 ROOTFORMS= $(FORMS:%=$(ROOTSHLIBCCS)/%) -ROOTLINTDIR= $(ROOTLIBDIR) -ROOTLINT= $(LINTSRCS:../common/%=$(ROOTLINTDIR)/%) - DYNLINKLIBDIR= $(ROOTLIBDIR) DYNLINKLIB= $(LIBLINKS:%=$(DYNLINKLIBDIR)/%) @@ -101,7 +91,5 @@ $(DYNLIB) := CFLAGS64 += $(CCVERBOSE) LDLIBS += -lc -CLEANFILES += ../common/parser.c $(LINTPOUT) +CLEANFILES += ../common/parser.c CLOBBERFILES += $(LIBS) $(LIBRARY) - -lint: lintcheck diff --git a/usr/src/cmd/sgs/lex/Makefile.targ b/usr/src/cmd/sgs/lex/Makefile.targ index 8d9ee4f7b7..c4653c5d75 100644 --- a/usr/src/cmd/sgs/lex/Makefile.targ +++ b/usr/src/cmd/sgs/lex/Makefile.targ @@ -23,6 +23,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # $(PROG): objs .WAIT $(POBJS) @@ -79,18 +80,8 @@ objs/%.o pics/%.o: ../common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -# install rule for lint library target -$(ROOTLINTDIR)/%: ../common/% - $(INS.file) - $(DYNLINKLIBDIR)/%: %$(VERS) $(INS.liblink) clean: $(RM) $(POBJS) $(OBJS) $(PICS) $(CLEANFILES) - -$(LINTLIB): $$(SRCS) - $(LINT.c) -o $(LIBNAME) $(SRCS) > $(LINTOUT) 2>&1 - -lintcheck: $$(SRCS) - $(LINT.c) $(LINTCHECKFLAGS) $(SRCS) $(LDLIBS) diff --git a/usr/src/cmd/sgs/lex/common/llib-ll b/usr/src/cmd/sgs/lex/common/llib-ll deleted file mode 100644 index 345b9fd191..0000000000 --- a/usr/src/cmd/sgs/lex/common/llib-ll +++ /dev/null @@ -1,43 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* Copyright (c) 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -/* from libl/common/allprint.c */ -extern void allprint(char); -extern void sprint(char *); -extern int printable(int); - -/* from libl/common/reject.c */ -extern int yyreject(void); -extern int yyracc(int); - -/* from libl/common/yyless.c */ -extern int yyless(int); - -/* from libl/common/yywrap.c */ -extern int yywrap(void); diff --git a/usr/src/cmd/sgs/lex/i386/Makefile b/usr/src/cmd/sgs/lex/i386/Makefile index 23cf9b00cf..7c4ed059ec 100644 --- a/usr/src/cmd/sgs/lex/i386/Makefile +++ b/usr/src/cmd/sgs/lex/i386/Makefile @@ -22,14 +22,12 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/sgs/lex/i386/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # INCLIST_i386= -I. -include ../../../Makefile.cmd +include ../../../Makefile.cmd include ../Makefile.com .KEEP_STATE: @@ -40,7 +38,7 @@ all_lib: $(LIBS) install: all $(ROOTPROG) $(ROOTFORMS) $(ROOTCCSBINLINK) -install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTLINT) +install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) include ../Makefile.targ include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/lex/sparc/Makefile b/usr/src/cmd/sgs/lex/sparc/Makefile index 73f492b1e9..ca3f074cc4 100644 --- a/usr/src/cmd/sgs/lex/sparc/Makefile +++ b/usr/src/cmd/sgs/lex/sparc/Makefile @@ -22,14 +22,12 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/sgs/lex/sparc/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # INCLIST_sparc= -I../common -include ../../../Makefile.cmd +include ../../../Makefile.cmd include ../Makefile.com .KEEP_STATE: @@ -40,7 +38,7 @@ all_lib: $(LIBS) install: all $(ROOTPROG) $(ROOTFORMS) $(ROOTCCSBINLINK) -install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTLINT) +install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) include ../Makefile.targ include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/libconv/Makefile.com b/usr/src/cmd/sgs/libconv/Makefile.com index 3f095a9aeb..cfc99fce64 100644 --- a/usr/src/cmd/sgs/libconv/Makefile.com +++ b/usr/src/cmd/sgs/libconv/Makefile.com @@ -22,6 +22,7 @@ # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2018 Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # LIBRARY = libconv.a @@ -110,25 +111,10 @@ AS_CPPFLAGS= -P -D_ASM $(CPPFLAGS) BLTDATA= $(BLTOBJS:%.o=%.c) $(BLTOBJS:%.o=%.h) report_bufsize.h -SRCS= ../common/llib-lconv -LINTSRCS= $(COMOBJS:%.o=../common/%.c) \ - $(COMOBJS_NOMSG:%.o=../common/%.c) \ - $(ELFCOM_OBJS:%.o=$(ELFCAP)/%.c) ../common/lintsup.c -LINTSRCS32 = $(COMOBJS32:%32.o=../common/%.c) -LINTSRCS64 = $(COMOBJS64:%64.o=../common/%.c) - -# Since libconv uses dlopen(3C) to load libdemangle-sys.so (much like it did -# for the old Sun Studio libdemangle.so) in order to avoid messy bootstrapping -# problems, but it also needs the definitions from demangle-sys.h for -# SYSDEM_LANG_AUTO, lint will complain about sysdemangle() being defined but not -# used unless it is explicitly included during the lint pass -$(LINTOUT32) := LDLIBS += -ldemangle-sys -$(LINTOUT64) := LDLIBS += -ldemangle-sys +MSGSRCS= $(COMOBJS:%.o=../common/%.c) \ + $(COMOBJS_NOMSG:%.o=../common/%.c) \ + $(ELFCOM_OBJS:%.o=$(ELFCAP)/%.c) SGSMSGTARG= $(BLTOBJS:%_msg.o=../common/%.msg) -LINTFLAGS += -u -erroff=E_NAME_DECL_NOT_USED_DEF2 -LINTFLAGS64 += -u -erroff=E_NAME_DECL_NOT_USED_DEF2 - -CLEANFILES += $(BLTDATA) $(LINTOUTS) bld_vernote vernote.s -CLOBBERFILES += $(LINTLIBS) +CLEANFILES += $(BLTDATA) bld_vernote vernote.s diff --git a/usr/src/cmd/sgs/libconv/Makefile.targ b/usr/src/cmd/sgs/libconv/Makefile.targ index 9e23179a8a..94d9cf3fdf 100644 --- a/usr/src/cmd/sgs/libconv/Makefile.targ +++ b/usr/src/cmd/sgs/libconv/Makefile.targ @@ -23,6 +23,8 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# pics/%.o: ../common/%.c $(COMPILE.c) -o $@ $< @@ -81,13 +83,8 @@ $(LIBRARY): pics $$(PICS) $(AR) $(ARFLAGS) $@ $(PICS) $(POST_PROCESS_A) -chkmsg: $(LINTSRCS) - sh $(CHKMSG) $(CHKMSGFLAGS) $(LINTSRCS) - -.PARALLEL: $(LINTOUT32) $(LINTOUT64) $(LINTLIB32) $(LINTLIB64) - -lint: $(LINTLIB32) $(LINTOUT32) $(LINTLIB64) $(LINTOUT64) \ - .WAIT $(SGSLINTOUT) +chkmsg: $(MSGSRCS) + sh $(CHKMSG) $(CHKMSGFLAGS) $(MSGSRCS) catalog: diff --git a/usr/src/cmd/sgs/libconv/common/lintsup.c b/usr/src/cmd/sgs/libconv/common/lintsup.c deleted file mode 100644 index 6f1dfc4125..0000000000 --- a/usr/src/cmd/sgs/libconv/common/lintsup.c +++ /dev/null @@ -1,123 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2018, Joyent, Inc. - */ -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -/* - * Supplemental definitions for lint that help us avoid - * options like `-x' that filter out things we want to - * know about as well as things we don't. - */ - -/* - * The public interfaces are allowed to be "declared - * but not used". - */ -#include <stdio.h> -#include <sys/auxv.h> -#include <libelf.h> -#include <link.h> -#include <elfcap.h> -#include <dwarf.h> -#include "sgs.h" -#include "rtld.h" -#include "libld.h" -#include "conv.h" - -/* - * Suppress the actual message codes from the sgsmsg headers. - * With multiple string tables, we will have name collisions. - */ -#define LINTSUP_SUPPRESS_STRINGS -#include "arch_msg.h" -#include "audit_msg.h" -#include "c_literal_msg.h" -#include "cap_msg.h" -#include "config_msg.h" -#include "corenote_msg.h" -#include "data_msg.h" -#include "deftag_msg.h" -#include "demangle_msg.h" -#include "dl_msg.h" -#include "dwarf_ehe_msg.h" -#include "dwarf_msg.h" -#include "dynamic_msg.h" -#include "elf_msg.h" -#include "entry_msg.h" -#include "globals_msg.h" -#include "group_msg.h" -#include "lddstub_msg.h" -#include "map_msg.h" -#include "phdr_msg.h" -#include "relocate_amd64_msg.h" -#include "relocate_i386_msg.h" -#include "relocate_sparc_msg.h" -#include "sections_msg.h" -#include "segments_msg.h" -#include "symbols_msg.h" -#include "symbols_sparc_msg.h" -#include "syminfo_msg.h" -#include "time_msg.h" -#include "version_msg.h" - -void -foo() -{ -#define USE(name) (void) name((Msg)&_ ## name[0]) - - USE(_sgs_msg_libconv_arch); - USE(_sgs_msg_libconv_audit); - USE(_sgs_msg_libconv_c_literal); - USE(_sgs_msg_libconv_cap); - USE(_sgs_msg_libconv_config); - USE(_sgs_msg_libconv_corenote); - USE(_sgs_msg_libconv_data); - USE(_sgs_msg_libconv_deftag); - USE(_sgs_msg_libconv_demangle); - USE(_sgs_msg_libconv_dl); - USE(_sgs_msg_libconv_dwarf_ehe); - USE(_sgs_msg_libconv_dwarf); - USE(_sgs_msg_libconv_dynamic); - USE(_sgs_msg_libconv_elf); - USE(_sgs_msg_libconv_entry); - USE(_sgs_msg_libconv_globals); - USE(_sgs_msg_libconv_group); - USE(_sgs_msg_libconv_lddstub); - USE(_sgs_msg_libconv_map); - USE(_sgs_msg_libconv_phdr); - USE(_sgs_msg_libconv_relocate_amd64); - USE(_sgs_msg_libconv_relocate_i386); - USE(_sgs_msg_libconv_relocate_sparc); - USE(_sgs_msg_libconv_sections); - USE(_sgs_msg_libconv_segments); - USE(_sgs_msg_libconv_symbols); - USE(_sgs_msg_libconv_symbols_sparc); - USE(_sgs_msg_libconv_syminfo); - USE(_sgs_msg_libconv_time); - USE(_sgs_msg_libconv_version); - -#undef USE -} diff --git a/usr/src/cmd/sgs/libconv/common/llib-lconv b/usr/src/cmd/sgs/libconv/common/llib-lconv deleted file mode 100644 index 42006517ce..0000000000 --- a/usr/src/cmd/sgs/libconv/common/llib-lconv +++ /dev/null @@ -1,311 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. - */ -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -#include <stdlib.h> -#include <libelf.h> -#include <_machelf.h> -#include <sgs.h> -#include <libld.h> -#include <conv.h> - -/* - * Generic miscellaneous interfaces - */ -uchar_t conv_check_native(char **, char **); -const char *conv_lddstub(int); -int conv_sys_eclass(void); -int conv_strproc_isspace(int); -char *conv_strproc_trim(char *); -Boolean conv_strproc_extract_value(char *, size_t, int, const char **); - - -/* - * Generic core formatting and iteration functionality - */ -conv_iter_ret_t _conv_iter_ds(conv_iter_osabi_t, Half, const conv_ds_t **, - conv_iter_cb_t, void *, const char *); -conv_iter_ret_t _conv_iter_ds_msg(const conv_ds_msg_t *, conv_iter_cb_t, - void *, const char *); -conv_iter_ret_t _conv_iter_msgarr(Conv_elfvalue_t, const Msg *, size_t, - conv_iter_cb_t, void *, const char *); -conv_iter_ret_t _conv_iter_vd(const Val_desc *, conv_iter_cb_t, - void *, const char *); -conv_iter_ret_t _conv_iter_vd2(conv_iter_osabi_t, Half, const Val_desc2 *, - conv_iter_cb_t, void *, const char *); -int conv_iter_strtol_init(const char *, conv_strtol_uvalue_t *); -conv_iter_ret_t conv_iter_strtol(const char *, Conv_elfvalue_t, void *); -const char *_conv_map2str(Conv_inv_buf_t *, Conv_elfvalue_t, - Conv_fmt_flags_t, size_t, const Msg *, const char *); -const char *_conv_map_ds(uchar_t, Half, Conv_elfvalue_t, - const conv_ds_t **, Conv_fmt_flags_t, Conv_inv_buf_t *, - const char *); -const char *_conv_map_vd2str(Conv_inv_buf_t *, Conv_elfvalue_t, - Conv_fmt_flags_t, const Val_desc *, const char *); -const char *_conv_map_vd22str(Conv_inv_buf_t *, uchar_t, Half, - Conv_elfvalue_t, Conv_fmt_flags_t, const Val_desc2 *, - const char *); - -/* - * Generic formatting interfaces. - */ -const char *conv_bnd_obj(uint_t, Conv_bnd_obj_buf_t *); -const char *conv_bnd_type(uint_t, Conv_bnd_type_buf_t *); -const char *conv_config_feat(int, Conv_config_feat_buf_t *); -const char *conv_config_obj(ushort_t, Conv_config_obj_buf_t *); -const char *conv_config_upm(const char *, const char *, - const char *, size_t); -const char *conv_cnote_auxv_af(Word, Conv_fmt_flags_t, - Conv_cnote_auxv_af_buf_t *); -const char *conv_cnote_auxv_type(Word, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_cnote_cc_content(Lword, Conv_fmt_flags_t, - Conv_cnote_cc_content_buf_t *); -const char *conv_cnote_errno(int, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_cnote_fault(Word, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_cnote_fltset(uint32_t *, int, Conv_fmt_flags_t, - Conv_cnote_fltset_buf_t *); -const char *conv_cnote_old_pr_flags(int, Conv_fmt_flags_t, - Conv_cnote_old_pr_flags_buf_t *); -const char *conv_cnote_pr_dmodel(Word, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_cnote_pr_flags(int, Conv_fmt_flags_t, - Conv_cnote_pr_flags_buf_t *); -const char *conv_cnote_proc_flag(int, Conv_fmt_flags_t, - Conv_cnote_proc_flag_buf_t *); -const char *conv_cnote_pr_regname(Half, int, Conv_fmt_flags_t, - Conv_inv_buf_t *inv_buf); -const char *conv_cnote_pr_stype(Word, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_cnote_pr_what(short, short, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_cnote_pr_why(short, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_cnote_priv(int, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_cnote_psetid(int, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_cnote_sa_flags(int, Conv_fmt_flags_t, - Conv_cnote_sa_flags_buf_t *); -const char *conv_cnote_signal(Word, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_cnote_si_code(Half, int, int, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_cnote_sigset(uint32_t *, int, Conv_fmt_flags_t, - Conv_cnote_sigset_buf_t *); -const char *conv_cnote_ss_flags(int, Conv_fmt_flags_t, - Conv_cnote_ss_flags_buf_t *); -const char *conv_cnote_syscall(Word, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_cnote_sysset(uint32_t *, int, Conv_fmt_flags_t, - Conv_cnote_sysset_buf_t *); -const char *conv_cnote_type(Word, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_def_tag(Symref, Conv_inv_buf_t *); -const char *conv_demangle_name(const char *); -const char *conv_dl_flag(int, Conv_fmt_flags_t, Conv_dl_flag_buf_t *); -const char *conv_dl_info(int); -const char *conv_dl_mode(int, int, Conv_dl_mode_buf_t *); -const char *conv_dwarf_cfa(uchar_t, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_dwarf_ehe(uint_t, Conv_dwarf_ehe_buf_t *); -const char *conv_dwarf_regname(Half, Word, Conv_fmt_flags_t, - int *, Conv_inv_buf_t *); -const char *conv_ehdr_abivers(uchar_t, Word, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_ehdr_class(uchar_t, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_ehdr_data(uchar_t, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_ehdr_flags(Half, Word, Conv_fmt_flags_t, - Conv_ehdr_flags_buf_t *); -const char *conv_ehdr_mach(Half, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_ehdr_osabi(uchar_t, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_ehdr_type(uchar_t, Half, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_ehdr_vers(Word, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_elfdata_type(Elf_Type, Conv_inv_buf_t *); -const char *conv_ent_flags(ec_flags_t, Conv_ent_flags_buf_t *); -const char *conv_ent_filcmp(Word, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_grphdl_flags(uint_t, Conv_grphdl_flags_buf_t *); -const char *conv_grpdesc_flags(uint_t, Conv_grpdesc_flags_buf_t *); -const char *conv_la_activity(uint_t, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_la_bind(uint_t, Conv_la_bind_buf_t *); -const char *conv_la_search(uint_t, Conv_la_search_buf_t *); -const char *conv_la_symbind(uint_t, Conv_la_symbind_buf_t *); -Isa_desc *conv_isalist(void); -const char *conv_mapfile_version(Word, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_phdr_flags(uchar_t, Word, Conv_fmt_flags_t, - Conv_phdr_flags_buf_t *); -const char *conv_phdr_type(uchar_t, Half, Word, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_reject_desc(Rej_desc *, Conv_reject_desc_buf_t *, - Half mach); -const char *conv_reloc_type(Half, Word, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_reloc_type_static(Half, Word, Conv_fmt_flags_t); -const char *conv_reloc_386_type(Word, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_reloc_amd64_type(Word, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_reloc_SPARC_type(Word, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_sec_type(uchar_t, Half, Word, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_seg_flags(Half, Conv_seg_flags_buf_t *); -void conv_str_to_c_literal(const char *buf, size_t n, - Conv_str_to_c_literal_func_t *cb_func, void *uvalue); -const char *conv_sym_info_bind(uchar_t, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_sym_info_type(Half, uchar_t, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_sym_shndx(uchar_t, Half, Half, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_sym_other(uchar_t, Conv_inv_buf_t *); -const char *conv_sym_other_vis(uchar_t, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv_syminfo_boundto(Half, Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv_syminfo_flags(Half, Conv_fmt_flags_t, - Conv_syminfo_flags_buf_t *); -const char *conv_time(struct timeval *, struct timeval *, - Conv_time_buf_t *); -Uts_desc *conv_uts(void); -const char *conv_ver_flags(Half, Conv_fmt_flags_t, Conv_ver_flags_buf_t *); -const char *conv_ver_index(Versym, int, Conv_inv_buf_t *); - - -/* - * Generic iteration interfaces. - */ -conv_iter_ret_t conv_iter_cap_tags(Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_cap_val_hw1(Half, Conv_fmt_flags_t, - conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_cap_val_hw2(Half, Conv_fmt_flags_t, - conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_cap_val_sf1(Conv_fmt_flags_t, conv_iter_cb_t, void *); - -conv_iter_ret_t conv_iter_dyn_feature1(Conv_fmt_flags_t, - conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_dyn_flag(Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_dyn_flag1(Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_dyn_posflag1(Conv_fmt_flags_t, - conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_dyn_tag(conv_iter_osabi_t, Half, - Conv_fmt_flags_t, conv_iter_cb_t, void *); - -conv_iter_ret_t conv_iter_ehdr_abivers(conv_iter_osabi_t, - Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_ehdr_class(Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_ehdr_data(Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_ehdr_eident(Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_ehdr_flags(Half, Conv_fmt_flags_t, - conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_ehdr_mach(Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_ehdr_osabi(Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_ehdr_type(conv_iter_osabi_t, Conv_fmt_flags_t, - conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_ehdr_vers(Conv_fmt_flags_t, conv_iter_cb_t, void *); - -conv_iter_ret_t conv_iter_phdr_flags(conv_iter_osabi_t, - Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_phdr_type(conv_iter_osabi_t, Conv_fmt_flags_t, - conv_iter_cb_t, void *); - -conv_iter_ret_t conv_iter_sec_flags(conv_iter_osabi_t, Half, - Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_sec_symtab(conv_iter_osabi_t, - Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_sec_type(conv_iter_osabi_t, Half, - Conv_fmt_flags_t, conv_iter_cb_t, void *); - -conv_iter_ret_t conv_iter_sym_info_bind(Conv_fmt_flags_t, - conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_sym_other_vis(Conv_fmt_flags_t, - conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_sym_shndx(conv_iter_osabi_t, Half, - Conv_fmt_flags_t, conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_sym_info_type(Half, Conv_fmt_flags_t, - conv_iter_cb_t, void *); - -conv_iter_ret_t conv_iter_syminfo_boundto(Conv_fmt_flags_t, - conv_iter_cb_t, void *); -conv_iter_ret_t conv_iter_syminfo_flags(Conv_fmt_flags_t, - conv_iter_cb_t, void *); - - -/* - * ELFCLASS-specific core formatting functionality - */ -int _conv_expn_field(CONV_EXPN_FIELD_ARG *, - const Val_desc *, Conv_fmt_flags_t, const char *); -int _conv_expn_field2(CONV_EXPN_FIELD_ARG *, uchar_t, - Half, const Val_desc2 *, Conv_fmt_flags_t, const char *); -const char *conv_invalid_val(Conv_inv_buf_t *, Xword, Conv_fmt_flags_t); - - -/* - * Define all class specific routines. - */ -const char *conv32_cap_tag(Elf32_Word, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv64_cap_tag(Elf64_Xword, Conv_fmt_flags_t, - Conv_inv_buf_t *); -const char *conv32_cap_val(Elf32_Word, Elf32_Word, Half, - Conv_fmt_flags_t, Conv_cap_val_buf_t *); -const char *conv64_cap_val(Elf64_Xword, Elf64_Xword, Half, - Conv_fmt_flags_t, Conv_cap_val_buf_t *); -const char *conv32_cap_val_hw1(Elf32_Word, Half, Conv_fmt_flags_t, - Conv_cap_val_hw1_buf_t *); -const char *conv32_cap_val_hw2(Elf32_Word, Half, Conv_fmt_flags_t, - Conv_cap_val_hw2_buf_t *); -const char *conv64_cap_val_hw1(Elf64_Xword, Half, Conv_fmt_flags_t, - Conv_cap_val_hw1_buf_t *); -const char *conv64_cap_val_hw2(Elf64_Xword, Half, Conv_fmt_flags_t, - Conv_cap_val_hw2_buf_t *); -const char *conv32_cap_val_sf1(Elf32_Word, Half, Conv_fmt_flags_t, - Conv_cap_val_sf1_buf_t *); -const char *conv64_cap_val_sf1(Elf64_Xword, Half, Conv_fmt_flags_t, - Conv_cap_val_sf1_buf_t *); -const char *conv32_dyn_flag1(Elf32_Word, Conv_fmt_flags_t, - Conv_dyn_flag1_buf_t *); -const char *conv64_dyn_flag1(Elf64_Xword, Conv_fmt_flags_t, - Conv_dyn_flag1_buf_t *); -const char *conv32_dyn_flag(Elf32_Word, int, Conv_dyn_flag_buf_t *); -const char *conv64_dyn_flag(Elf64_Xword, int, Conv_dyn_flag_buf_t *); -const char *conv32_dyn_posflag1(Elf32_Word, int, - Conv_dyn_posflag1_buf_t *); -const char *conv64_dyn_posflag1(Elf64_Xword, int, - Conv_dyn_posflag1_buf_t *); -const char *conv32_dyn_tag(Elf32_Word, uchar_t, Elf32_Half, - Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv64_dyn_tag(Elf64_Xword, uchar_t, Elf64_Half, - Conv_fmt_flags_t, Conv_inv_buf_t *); -const char *conv32_dyn_feature1(Elf32_Word, int, - Conv_dyn_feature1_buf_t *); -const char *conv64_dyn_feature1(Elf64_Xword, int, - Conv_dyn_feature1_buf_t *); -const char *conv32_sec_flags(uchar_t, Half, Elf32_Word, Conv_fmt_flags_t, - Conv_sec_flags_buf_t *); -const char *conv64_sec_flags(uchar_t, Half, Elf64_Xword, Conv_fmt_flags_t, - Conv_sec_flags_buf_t *); -const char *conv32_sec_linkinfo(Elf32_Word, Elf32_Word, - Conv_inv_buf_t *); -const char *conv64_sec_linkinfo(Elf64_Word, Elf64_Xword, - Conv_inv_buf_t *); -const char *conv32_sym_value(Elf32_Half, uchar_t, Elf32_Addr, - Conv_inv_buf_t *); -const char *conv64_sym_value(Elf64_Half, uchar_t, Elf64_Addr, - Conv_inv_buf_t *); -const char *conv32_sym_SPARC_value(Elf32_Addr, int, Conv_inv_buf_t *); -const char *conv64_sym_SPARC_value(Elf64_Addr, int, Conv_inv_buf_t *); diff --git a/usr/src/cmd/sgs/libcrle/Makefile.com b/usr/src/cmd/sgs/libcrle/Makefile.com index 6419340503..92904198aa 100644 --- a/usr/src/cmd/sgs/libcrle/Makefile.com +++ b/usr/src/cmd/sgs/libcrle/Makefile.com @@ -23,6 +23,8 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# LIBRARY= libcrle.a VERS= .1 @@ -38,16 +40,11 @@ include $(SRC)/cmd/sgs/Makefile.com SRCDIR = ../common -lint := ZRECORD = LDLIBS += $(ZRECORD) -lmapmalloc $(DLLIB) -lc -LINTFLAGS += -u -LINTFLAGS64 += -u - CPPFLAGS += -I$(SRCBASE)/lib/libc/inc -I$(SRC)/common/sgsrtcid DYNFLAGS += $(VERSREF) $(CONVLIBDIR) -lconv $(CC_USE_PROTO) - BLTDEFS= msg.h BLTDATA= msg.c BLTMESG= $(SGSMSGDIR)/libcrle @@ -60,9 +57,8 @@ SGSMSGTARG= $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n libcrle_msg LIBSRCS= $(COMOBJS:%.o=../common/%.c) $(BLTDATA) -LINTSRCS= $(LIBSRCS) -CLEANFILES += $(LINTOUTS) $(BLTFILES) -CLOBBERFILES += $(DYNLIB) $(LINTLIB) $(LIBLINKS) +CLEANFILES += $(BLTFILES) +CLOBBERFILES += $(DYNLIB) $(LIBLINKS) ROOTDYNLIB= $(DYNLIB:%=$(ROOTLIBDIR)/%) diff --git a/usr/src/cmd/sgs/libcrle/amd64/Makefile b/usr/src/cmd/sgs/libcrle/amd64/Makefile index 425d513e92..bdabb4e0f7 100644 --- a/usr/src/cmd/sgs/libcrle/amd64/Makefile +++ b/usr/src/cmd/sgs/libcrle/amd64/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -31,7 +31,6 @@ include ../Makefile.com CONVLIBDIR= $(CONVLIBDIR64) ROOTDYNLIB64= $(DYNLIB:%=$(ROOTLIBDIR64)/%) -LINTFLAGS64 += $(VAR_LINTFLAGS64) CPPFLAGS += -D_ELF64 .KEEP_STATE: @@ -41,7 +40,5 @@ all: $(DYNLIB) $(LIBLINKS) install \ package: all $(ROOTDYNLIB64) -lint: $(LINTOUT64) $(SGSLINTOUT) - include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/libcrle/i386/Makefile b/usr/src/cmd/sgs/libcrle/i386/Makefile index 488cb7f9a8..683ffc3a05 100644 --- a/usr/src/cmd/sgs/libcrle/i386/Makefile +++ b/usr/src/cmd/sgs/libcrle/i386/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -35,6 +35,4 @@ all: $(DYNLIB) $(LIBLINKS) install \ package: all $(ROOTDYNLIB) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/libcrle/sparc/Makefile b/usr/src/cmd/sgs/libcrle/sparc/Makefile index 488cb7f9a8..683ffc3a05 100644 --- a/usr/src/cmd/sgs/libcrle/sparc/Makefile +++ b/usr/src/cmd/sgs/libcrle/sparc/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -35,6 +35,4 @@ all: $(DYNLIB) $(LIBLINKS) install \ package: all $(ROOTDYNLIB) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/libcrle/sparcv9/Makefile b/usr/src/cmd/sgs/libcrle/sparcv9/Makefile index 425d513e92..bdabb4e0f7 100644 --- a/usr/src/cmd/sgs/libcrle/sparcv9/Makefile +++ b/usr/src/cmd/sgs/libcrle/sparcv9/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -31,7 +31,6 @@ include ../Makefile.com CONVLIBDIR= $(CONVLIBDIR64) ROOTDYNLIB64= $(DYNLIB:%=$(ROOTLIBDIR64)/%) -LINTFLAGS64 += $(VAR_LINTFLAGS64) CPPFLAGS += -D_ELF64 .KEEP_STATE: @@ -41,7 +40,5 @@ all: $(DYNLIB) $(LIBLINKS) install \ package: all $(ROOTDYNLIB64) -lint: $(LINTOUT64) $(SGSLINTOUT) - include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/libdl/Makefile.com b/usr/src/cmd/sgs/libdl/Makefile.com index eac0600bee..edc149f8ec 100644 --- a/usr/src/cmd/sgs/libdl/Makefile.com +++ b/usr/src/cmd/sgs/libdl/Makefile.com @@ -20,11 +20,10 @@ # # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # LIBRARY = libdl.a VERS = .1 include $(SRC)/lib/Makefile.rootfs - -LIBS += $(LINTLIB) diff --git a/usr/src/cmd/sgs/libdl/common/llib-ldl b/usr/src/cmd/sgs/libdl/common/llib-ldl deleted file mode 100644 index 66a16aa60d..0000000000 --- a/usr/src/cmd/sgs/libdl/common/llib-ldl +++ /dev/null @@ -1,43 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -/* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include <sys/types.h> -#include <link.h> -#include <dlfcn.h> - -void * dlopen(const char *, int); -void * dlsym(void *_RESTRICT_KYWD, const char *_RESTRICT_KYWD); -int dlclose(void *); -char * dlerror(void); -void * dlmopen(Lmid_t, const char *, int); -int dladdr(void *, Dl_info *); -int dladdr1(void *, Dl_info *, void **, int); -int dldump(const char *, const char *, int); -int dlinfo(void *, int, void *); -void _ld_libc(void *); -int dl_iterate_phdr(int (*)(struct dl_phdr_info *, size_t, void *), void *); diff --git a/usr/src/cmd/sgs/libdl/i386/Makefile b/usr/src/cmd/sgs/libdl/i386/Makefile index 3faec045c9..ea152db4b2 100644 --- a/usr/src/cmd/sgs/libdl/i386/Makefile +++ b/usr/src/cmd/sgs/libdl/i386/Makefile @@ -22,12 +22,14 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include $(SRC)/lib/Makefile.filter.com include ../Makefile.com DYNFLAGS += -F /usr/lib/ld.so.1 -install: all $(ROOTLIBDIR) .WAIT $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) +install: all $(ROOTLIBDIR) .WAIT $(ROOTLIBS) $(ROOTLINKS) include $(SRC)/lib/Makefile.filter.targ diff --git a/usr/src/cmd/sgs/libdl/sparc/Makefile b/usr/src/cmd/sgs/libdl/sparc/Makefile index 6bc95b1ea1..371e25288e 100644 --- a/usr/src/cmd/sgs/libdl/sparc/Makefile +++ b/usr/src/cmd/sgs/libdl/sparc/Makefile @@ -22,6 +22,8 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include $(SRC)/lib/Makefile.filter.com include ../Makefile.com @@ -37,8 +39,7 @@ ROOT4LIBDIR = $(ROOT)/usr/4lib ROOT4LINKS = $(ROOT4LIBDIR)/$(4DYNLIB) $(ROOT4LINKS):= LIBLINKPATH = ../../lib/ -install: all $(ROOTLIBDIR) .WAIT $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) \ - $(ROOT4LINKS) +install: all $(ROOTLIBDIR) .WAIT $(ROOTLIBS) $(ROOTLINKS) $(ROOT4LINKS) $(ROOT4LINKS): $(ROOTFS_DYNLIB) $(INS.liblink) diff --git a/usr/src/cmd/sgs/libelf/Makefile.com b/usr/src/cmd/sgs/libelf/Makefile.com index 90c360940b..c715eba55e 100644 --- a/usr/src/cmd/sgs/libelf/Makefile.com +++ b/usr/src/cmd/sgs/libelf/Makefile.com @@ -22,6 +22,7 @@ # Copyright 2015 Gary Mills # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # LIBRARY= libelf.a @@ -66,9 +67,6 @@ MAPFILES = ../common/mapfile-vers DYNFLAGS += $(VERSREF) LDLIBS += $(CONVLIBDIR) $(CONV_LIB) -lc -LINTFLAGS += -u -erroff=E_BAD_PTR_CAST_ALIGN -LINTFLAGS64 += -u -erroff=E_CAST_INT_TO_SMALL_INT - CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-uninitialized @@ -96,20 +94,16 @@ SGSMSGFLAGS2= $(SGSMSGFLAGS) -h $(BLTDEFS) -d $(BLTDATA) -n libelf_msg BLTSRCS= $(BLTOBJS:%.o=%.c) LIBSRCS= $(COMOBJS:%.o=../common/%.c) $(MISCOBJS:%.o=../misc/%.c) \ $(MACHOBJS:%.o=%.c) $(BLTSRCS) -SRCS= ../common/llib-lelf -LINTSRCS= $(LIBSRCS) ../common/lintsup.c ROOTFS_DYNLIB= $(DYNLIB:%=$(ROOTFS_LIBDIR)/%) -ROOTFS_LINTLIB= $(LINTLIB:%=$(ROOTFS_LIBDIR)/%) ROOTFS_DYNLIB64= $(DYNLIB:%=$(ROOTFS_LIBDIR64)/%) -ROOTFS_LINTLIB64= $(LINTLIB:%=$(ROOTFS_LIBDIR64)/%) $(ROOTFS_DYNLIB) := FILEMODE= 755 $(ROOTFS_DYNLIB64) := FILEMODE= 755 -LIBS = $(DYNLIB) $(LINTLIB) +LIBS = $(DYNLIB) -CLEANFILES += $(LINTOUTS) $(BLTSRCS) $(BLTFILES) +CLEANFILES += $(BLTSRCS) $(BLTFILES) .PARALLEL: $(LIBS) diff --git a/usr/src/cmd/sgs/libelf/Makefile.targ b/usr/src/cmd/sgs/libelf/Makefile.targ index 0ca8d64218..7fd082fb9f 100644 --- a/usr/src/cmd/sgs/libelf/Makefile.targ +++ b/usr/src/cmd/sgs/libelf/Makefile.targ @@ -21,6 +21,7 @@ # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2016 RackTop Systems. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # objs/%.o \ @@ -46,16 +47,7 @@ pics/%.o: ../common/%.c all: $(BLTSRCS) .WAIT $(LIBS) $(LIBLINKS) install: all .WAIT $(ROOTFS_LIBS) $(ROOTFS_LINKS) \ - $(ROOTFS_LINTLIB) \ - .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) \ - $(ROOTFS_LIBDIR)/$(LINTLIBSRC) - -$(ROOTFS_LIBDIR)/$(LINTLIBSRC): ../common/$(LINTLIBSRC) - $(VAR_POUND_1) $(INS.file) ../common/$(LINTLIBSRC) - -lint: $(LINTLIB) $(LINTOUT32) $(LINTOUT64) $(SGSLINTOUT) - -.PARALLEL: $(LINTOUT32) $(LINTOUT64) + .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) delete: $(RM) $(DYNLIB) diff --git a/usr/src/cmd/sgs/libelf/Makefile.targ.64 b/usr/src/cmd/sgs/libelf/Makefile.targ.64 index 7ea67ef177..058ceace4c 100644 --- a/usr/src/cmd/sgs/libelf/Makefile.targ.64 +++ b/usr/src/cmd/sgs/libelf/Makefile.targ.64 @@ -20,6 +20,7 @@ # # # Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # objs/%.o \ @@ -44,13 +45,7 @@ pics/%.o: ../common/%.c all: $(BLTSRCS) .WAIT $(LIBS) $(LIBLINKS) -install: all .WAIT $(ROOTFS_LIBS64) $(ROOTFS_LINKS64) \ - $(ROOTFS_LINTLIB64) - -lint: $(LINTLIB) $(LINTOUT32) $(LINTOUT64) $(SGSLINTOUT) - -.PARALLEL: $(LINTOUT32) $(LINTOUT64) - +install: all .WAIT $(ROOTFS_LIBS64) $(ROOTFS_LINKS64) delete: $(RM) $(DYNLIB) diff --git a/usr/src/cmd/sgs/libelf/amd64/Makefile b/usr/src/cmd/sgs/libelf/amd64/Makefile index 38303fff2e..99651ac38b 100644 --- a/usr/src/cmd/sgs/libelf/amd64/Makefile +++ b/usr/src/cmd/sgs/libelf/amd64/Makefile @@ -23,14 +23,13 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com CONVLIBDIR= $(CONVLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) MISCOBJS= $(MISCOBJS64) .KEEP_STATE: diff --git a/usr/src/cmd/sgs/libelf/common/lintsup.c b/usr/src/cmd/sgs/libelf/common/lintsup.c deleted file mode 100644 index a13104e7c3..0000000000 --- a/usr/src/cmd/sgs/libelf/common/lintsup.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <malloc.h> -#include <link.h> -#include <sgs.h> -#include <_libelf.h> diff --git a/usr/src/cmd/sgs/libelf/common/llib-lelf b/usr/src/cmd/sgs/libelf/common/llib-lelf deleted file mode 100644 index f525dde839..0000000000 --- a/usr/src/cmd/sgs/libelf/common/llib-lelf +++ /dev/null @@ -1,152 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. - */ - -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -/* - * Generic interface definition for usr/src/lib/libelf. - */ - -#include <_libelf.h> -#include <nlist.h> - - -/* - * Elf32 Symbols - */ -size_t elf32_fsize(Elf_Type, size_t, uint_t); -Elf32_Ehdr * elf32_getehdr(Elf *); -Elf32_Phdr * elf32_getphdr(Elf *); -Elf32_Shdr * elf32_getshdr(Elf_Scn *); -Elf32_Ehdr * elf32_newehdr(Elf *); -Elf32_Phdr * elf32_newphdr(Elf *, size_t); -Elf_Data * elf32_xlatetof(Elf_Data *, const Elf_Data *, uint_t); -Elf_Data * elf32_xlatetom(Elf_Data *, const Elf_Data *, uint_t); - - -/* - * Elf64 Symbols - */ -size_t elf64_fsize(Elf_Type, size_t, uint_t); -Elf64_Ehdr * elf64_getehdr(Elf *); -Elf64_Phdr * elf64_getphdr(Elf *); -Elf64_Shdr * elf64_getshdr(Elf_Scn *); -Elf64_Ehdr * elf64_newehdr(Elf *); -Elf64_Phdr * elf64_newphdr(Elf *, size_t); -Elf_Data * elf64_xlatetof(Elf_Data *, const Elf_Data *, uint_t); -Elf_Data * elf64_xlatetom(Elf_Data *, const Elf_Data *, uint_t); - - -/* - * GElf Symbols - */ -size_t gelf_fsize(Elf *, Elf_Type, size_t, uint_t); -int gelf_getclass(Elf *); -GElf_Ehdr * gelf_getehdr(Elf *, GElf_Ehdr *); -int gelf_update_ehdr(Elf *, GElf_Ehdr *); -ulong_t gelf_newehdr(Elf *, int); -GElf_Phdr * gelf_getphdr(Elf *, int, GElf_Phdr *); -int gelf_update_phdr(Elf *, int, GElf_Phdr *); -ulong_t gelf_newphdr(Elf *, size_t); -GElf_Shdr * gelf_getshdr(Elf_Scn *, GElf_Shdr *); -int gelf_update_shdr(Elf_Scn *, GElf_Shdr *); -Elf_Data * gelf_xlatetof(Elf *, Elf_Data *, const Elf_Data *, uint_t); -Elf_Data * gelf_xlatetom(Elf *, Elf_Data *, const Elf_Data *, uint_t); -GElf_Sym * gelf_getsym(Elf_Data *, int, GElf_Sym *); -int gelf_update_sym(Elf_Data *, int, GElf_Sym *); -GElf_Syminfo * gelf_getsyminfo(Elf_Data *, int, GElf_Syminfo *); -int gelf_update_syminfo(Elf_Data *, int, GElf_Syminfo *); -GElf_Sym * gelf_getsymshndx(Elf_Data *, Elf_Data *, int, GElf_Sym *, - Elf32_Word *); -int gelf_update_symshndx(Elf_Data *, Elf_Data *, int, GElf_Sym *, - Elf32_Word); -GElf_Move * gelf_getmove(Elf_Data *, int, GElf_Move *); -int gelf_update_move(Elf_Data *, int, GElf_Move *); -GElf_Dyn * gelf_getdyn(Elf_Data *, int, GElf_Dyn *); -int gelf_update_dyn(Elf_Data *, int, GElf_Dyn *); -GElf_Rela * gelf_getrela(Elf_Data *, int, GElf_Rela *); -int gelf_update_rela(Elf_Data *, int, GElf_Rela *); -GElf_Rel * gelf_getrel(Elf_Data *, int, GElf_Rel *); -int gelf_update_rel(Elf_Data *, int, GElf_Rel *); -GElf_Cap * gelf_getcap(Elf_Data *, int, GElf_Cap *); -int gelf_update_cap(Elf_Data *, int, GElf_Cap *); - -GElf_Xword _gelf_getdyndtflags_1(Elf *); - -/* - * Class-Independent Elf Symbols - */ -Elf * elf_begin(int, Elf_Cmd, Elf *); -int elf_cntl(Elf *, Elf_Cmd); -int elf_end(Elf *); -const char * elf_errmsg(int); -int elf_errno(void); -void elf_fill(int); -uint_t elf_flagdata(Elf_Data *, Elf_Cmd, uint_t); -uint_t elf_flagehdr(Elf *, Elf_Cmd, uint_t); -uint_t elf_flagelf(Elf *, Elf_Cmd, uint_t); -uint_t elf_flagphdr(Elf *, Elf_Cmd, uint_t); -uint_t elf_flagscn(Elf_Scn *, Elf_Cmd, uint_t); -uint_t elf_flagshdr(Elf_Scn *, Elf_Cmd, uint_t); -Elf_Arhdr * elf_getarhdr(Elf *); -Elf_Arsym * elf_getarsym(Elf *, size_t *); -off_t elf_getbase(Elf *); -Elf_Data * elf_getdata(Elf_Scn *, Elf_Data *); -char * elf_getident(Elf *, size_t *); -int elf_getphnum(Elf *, size_t *); -int elf_getshnum(Elf *, size_t *); -int elf_getshstrndx(Elf *, size_t *); -Elf_Scn * elf_getscn(Elf *elf, size_t); -ulong_t elf_hash(const char *); -Elf_Kind elf_kind(Elf *); -Elf * elf_memory(char *, size_t); -size_t elf_ndxscn(Elf_Scn *); -Elf_Data * elf_newdata(Elf_Scn *); -Elf_Scn * elf_newscn(Elf *); -Elf_Cmd elf_next(Elf *); -Elf_Scn * elf_nextscn(Elf *, Elf_Scn *); -size_t _elf_outsync(int, char *, size_t, uint_t); -size_t elf_rand(Elf *, size_t); -Elf_Data * elf_rawdata(Elf_Scn *, Elf_Data *); -char * elf_rawfile(Elf *, size_t *); -char * elf_strptr(Elf *, size_t, size_t); -off_t elf_update(Elf *, Elf_Cmd); -uint_t elf_version(uint_t); -int nlist(const char *, struct nlist *); - - -/* - * Private Symbols - */ -extern void _elf_execfill(_elf_execfill_func_t *); -extern off_t _elf_getarhdrbase(Elf *); -extern size_t _elf_getarsymwordsize(Elf *); -extern size_t _elf_getnextoff(Elf *); -Elf64_Off _elf_getxoff(Elf_Data *); -int _elf_swap_wrimage(Elf *); -uint_t _elf_sys_encoding(void); - -extern GElf_Xword _gelf_getdyndtflags_1(Elf *); diff --git a/usr/src/cmd/sgs/libelf/sparcv9/Makefile b/usr/src/cmd/sgs/libelf/sparcv9/Makefile index 38303fff2e..99651ac38b 100644 --- a/usr/src/cmd/sgs/libelf/sparcv9/Makefile +++ b/usr/src/cmd/sgs/libelf/sparcv9/Makefile @@ -23,14 +23,13 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com CONVLIBDIR= $(CONVLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) MISCOBJS= $(MISCOBJS64) .KEEP_STATE: diff --git a/usr/src/cmd/sgs/libld/Makefile.com b/usr/src/cmd/sgs/libld/Makefile.com index 08efdd8315..44f372d088 100644 --- a/usr/src/cmd/sgs/libld/Makefile.com +++ b/usr/src/cmd/sgs/libld/Makefile.com @@ -24,6 +24,7 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. LIBRARY = libld.a VERS = .4 @@ -50,8 +51,7 @@ TOOLOBJS = alist.o assfail.o findprime.o string_table.o \ strhash.o AVLOBJ = avl.o -# Relocation engine objects. These are kept separate from the L_XXX_MACHOBJS -# lists below in order to facilitate linting them. +# Relocation engine objects. G_MACHOBJS32 = doreloc_sparc_32.o doreloc_x86_32.o G_MACHOBJS64 = doreloc_sparc_64.o doreloc_x86_64.o @@ -64,7 +64,6 @@ E_X86_TOOLOBJS = leb128.o L_X86_MACHOBJS32 = machrel.intel32.o L_X86_MACHOBJS64 = machrel.amd64.o - # All target specific objects rolled together E_TOOLOBJS = $(E_SPARC_TOOLOBJS) \ $(E_X86_TOOLOBJS) @@ -74,7 +73,6 @@ L_MACHOBJS64 = $(L_SPARC_MACHOBJS64) \ $(L_X86_MACHOBJS64) - BLTOBJ = msg.o ELFCAPOBJ = elfcap.o @@ -83,8 +81,8 @@ OBJECTS = $(BLTOBJ) $(G_MACHOBJS32) $(G_MACHOBJS64) \ $(COMOBJS) $(COMOBJS32) $(COMOBJS64) \ $(TOOLOBJS) $(E_TOOLOBJS) $(AVLOBJ) $(ELFCAPOBJ) -include $(SRC)/lib/Makefile.lib -include $(SRC)/cmd/sgs/Makefile.com +include $(SRC)/lib/Makefile.lib +include $(SRC)/cmd/sgs/Makefile.com SRCDIR = ../common @@ -110,9 +108,6 @@ CPPFLAGS += -DUSE_LIBLD_MALLOC -I$(SRCBASE)/lib/libc/inc \ LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(LDDBGLIBDIR) $(LDDBG_LIB) \ $(ELFLIBDIR) -lelf $(DLLIB) -lc -LINTFLAGS += -u -D_REENTRANT -LINTFLAGS64 += -u -D_REENTRANT - DYNFLAGS += $(VERSREF) $(CC_USE_PROTO) '-R$$ORIGIN' native:= DYNFLAGS += $(CONVLIBDIR) @@ -144,33 +139,13 @@ CHKSRCS = $(SRCBASE)/uts/common/krtld/reloc.h \ $(KRTLD_AMD64)/doreloc.c \ $(KRTLD_SPARC)/doreloc.c -SRCS = ../common/llib-lld LIBSRCS = $(TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \ $(E_TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \ $(COMOBJS:%.o=../common/%.c) \ $(AVLOBJS:%.o=$(VAR_AVLDIR)/%.c) \ $(BLTDATA) -LINTSRCS = $(LIBSRCS) ../common/lintsup.c -LINTSRCS32 = $(COMOBJS32:%32.o=../common/%.c) \ - $(L_MACHOBJS32:%32.o=../common/%.c) -LINTSRCS64 = $(COMOBJS64:%64.o=../common/%.c) \ - $(L_MACHOBJS64:%64.o=../common/%.c) - -# Add the shared relocation engine source files to the lint -# sources and add the necessary command line options to lint them -# correctly. Make can't derive the files since the source and object -# names are not directly related -$(LINTOUT32) := CPPFLAGS += -DDO_RELOC_LIBLD -$(LINTOUT64) := CPPFLAGS += -DDO_RELOC_LIBLD -D_ELF64 -$(LINTLIB32) := CPPFLAGS += -DDO_RELOC_LIBLD -$(LINTLIB64) := CPPFLAGS += -DDO_RELOC_LIBLD -D_ELF64 -LINTSRCS32 += $(KRTLD_I386)/doreloc.c \ - $(KRTLD_SPARC)/doreloc.c -LINTSRCS64 += $(KRTLD_AMD64)/doreloc.c \ - $(KRTLD_SPARC)/doreloc.c - -CLEANFILES += $(LINTOUTS) $(BLTFILES) -CLOBBERFILES += $(DYNLIB) $(LINTLIBS) $(LIBLINKS) +CLEANFILES += $(BLTFILES) +CLOBBERFILES += $(DYNLIB) $(LIBLINKS) ROOTFS_DYNLIB = $(DYNLIB:%=$(ROOTFS_LIBDIR)/%) diff --git a/usr/src/cmd/sgs/libld/Makefile.targ b/usr/src/cmd/sgs/libld/Makefile.targ index c8f514cd2f..f48f6fcd56 100644 --- a/usr/src/cmd/sgs/libld/Makefile.targ +++ b/usr/src/cmd/sgs/libld/Makefile.targ @@ -23,6 +23,7 @@ # Use is subject to license terms. # # Copyright 2016 RackTop Systems. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # pics/%.o: ../common/%.c @@ -93,11 +94,6 @@ $(LIBLINKS): delete: $(RM) $(DYNLIB) -.PARALLEL: $(LINTOUT32) $(LINTOUT64) $(LINTLIB32) $(LINTLIB64) - -lint: $(LINTLIB32) $(LINTOUT32) $(LINTLIB64) $(LINTOUT64) \ - .WAIT $(SGSLINTOUT) - # Special target for native builds (ie. when we need to build a version of ld # to build a version of ld :-). diff --git a/usr/src/cmd/sgs/libld/common/lintsup.c b/usr/src/cmd/sgs/libld/common/lintsup.c deleted file mode 100644 index 0091d28426..0000000000 --- a/usr/src/cmd/sgs/libld/common/lintsup.c +++ /dev/null @@ -1,42 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <debug.h> -#include <elfcap.h> -#include <_libld.h> -#include <sys/debug.h> - - -void -foo() -{ - assfail3(NULL, 0, NULL, 0, NULL, 0); -} diff --git a/usr/src/cmd/sgs/libld/common/llib-lld b/usr/src/cmd/sgs/libld/common/llib-lld deleted file mode 100644 index 667cafa931..0000000000 --- a/usr/src/cmd/sgs/libld/common/llib-lld +++ /dev/null @@ -1,67 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#include "libld.h" - -/* - * Generic interface definition for usr/src/lib/libld. - */ -uintptr_t ld32_create_outfile(Ofl_desc *); -uintptr_t ld64_create_outfile(Ofl_desc *); - -uintptr_t ld32_ent_setup(Ofl_desc *, Xword); -uintptr_t ld64_ent_setup(Ofl_desc *, Xword); - -uintptr_t ld32_init_strings(Ofl_desc *); -uintptr_t ld64_init_strings(Ofl_desc *); - -int ld_getopt(Lm_list *, int, int, char **); - -int ld32_main(int, char **, Elf32_Half); -int ld64_main(int, char **, Elf64_Half); -uintptr_t ld32_make_sections(Ofl_desc *); -uintptr_t ld64_make_sections(Ofl_desc *); - -void ld32_ofl_cleanup(Ofl_desc *); -void ld64_ofl_cleanup(Ofl_desc *); - -Ifl_desc *ld32_process_open(const char *, const char *, int *, - Ofl_desc *, Elf32_Word, Rej_desc *); -Ifl_desc *ld64_process_open(const char *, const char *, int *, - Ofl_desc *, Elf64_Word, Rej_desc *); - -uintptr_t ld32_reloc_init(Ofl_desc *); -uintptr_t ld64_reloc_init(Ofl_desc *); -uintptr_t ld32_reloc_process(Ofl_desc *); -uintptr_t ld64_reloc_process(Ofl_desc *); - -uintptr_t ld32_sym_validate(Ofl_desc *); -uintptr_t ld64_sym_validate(Ofl_desc *); - -uintptr_t ld32_update_outfile(Ofl_desc *); -uintptr_t ld64_update_outfile(Ofl_desc *); diff --git a/usr/src/cmd/sgs/libld/common/machrel.intel.c b/usr/src/cmd/sgs/libld/common/machrel.intel.c index c449d6d894..28999e7d89 100644 --- a/usr/src/cmd/sgs/libld/common/machrel.intel.c +++ b/usr/src/cmd/sgs/libld/common/machrel.intel.c @@ -415,11 +415,22 @@ static uchar_t tlsinstr_gd_le[] = { 0x90 }; -static uchar_t tlsinstr_gd_ie_movgs[] = { +static uchar_t tlsinstr_ld_le_movgs[] = { /* - * movl %gs:0x0,%eax + * 0x00 movl %gs:0x0,%eax */ - 0x65, 0xa1, 0x00, 0x00, 0x00, 00 + 0x65, 0xa1, 0x00, 0x00, 0x00, 0x00, +}; + +/* + * 0x00 nopl 0(%eax,%eax) -- the intel recommended 5-byte nop + * See Intel® 64 and IA-32 Architectures Software Developer’s Manual + * Volume 2B: Instruction Set Reference, M-U + * Table 4-12, Recommended Multi-Byte Sequence of NOP Instruction + */ +static uchar_t tlsinstr_nop5[] = { + + 0x0f, 0x1f, 0x44, 0x00, 0x00 }; #define TLS_GD_IE_MOV 0x8b /* movl opcode */ @@ -528,7 +539,8 @@ tls_fixups(Ofl_desc *ofl, Rel_desc *arsp) case R_386_TLS_GD_PLT: case R_386_PLT32: /* - * Fixup done via the TLS_GD relocation + * Fixup done via the TLS_GD/TLS_LDM relocation processing + * and ld_reloc_plt() handling __tls_get_addr(). */ DBG_CALL(Dbg_reloc_transition(ofl->ofl_lml, M_MACH, R_386_NONE, arsp, ld_reloc_sym_name)); @@ -542,17 +554,10 @@ tls_fixups(Ofl_desc *ofl, Rel_desc *arsp) * Transition: * call __tls_get_addr() * to: - * nop - * nop - * nop - * nop - * nop + * nopl 0x0(%eax,%eax) */ - *(offset - 1) = TLS_NOP; - *(offset) = TLS_NOP; - *(offset + 1) = TLS_NOP; - *(offset + 2) = TLS_NOP; - *(offset + 3) = TLS_NOP; + (void) memcpy(offset - 1, tlsinstr_nop5, + sizeof (tlsinstr_nop5)); return (FIX_DONE); case R_386_TLS_LDM: @@ -569,8 +574,17 @@ tls_fixups(Ofl_desc *ofl, Rel_desc *arsp) * * 0x00 movl %gs:0, %eax */ - (void) memcpy(offset - 2, tlsinstr_gd_ie_movgs, - sizeof (tlsinstr_gd_ie_movgs)); + (void) memcpy(offset - 2, tlsinstr_ld_le_movgs, + sizeof (tlsinstr_ld_le_movgs)); + + /* + * We implicitly treat this as if a R_386_TLS_LDM_PLT for the + * __tls_get_addr call followed it as the GNU compiler + * doesn't generate one. This is safe, because if one _does_ + * exist we'll just write the nop again. + */ + (void) memcpy(offset + 4, tlsinstr_nop5, + sizeof (tlsinstr_nop5)); return (FIX_DONE); case R_386_TLS_LDO_32: @@ -736,7 +750,7 @@ ld_do_activerelocs(Ofl_desc *ofl) */ REL_CACHE_TRAVERSE(&ofl->ofl_actrels, idx, rcbp, arsp) { uchar_t *addr; - Xword value; + Xword value; Sym_desc *sdp; const char *ifl_name; Xword refaddr; diff --git a/usr/src/cmd/sgs/liblddbg/Makefile.com b/usr/src/cmd/sgs/liblddbg/Makefile.com index 860c62369a..3cf7318715 100644 --- a/usr/src/cmd/sgs/liblddbg/Makefile.com +++ b/usr/src/cmd/sgs/liblddbg/Makefile.com @@ -22,6 +22,7 @@ # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2016 RackTop Systems. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # LIBRARY = liblddbg.a @@ -56,9 +57,6 @@ include $(SRC)/cmd/sgs/Makefile.com SRCDIR = ../common -LINTFLAGS += -u -D_REENTRANT -LINTFLAGS64 += -u -D_REENTRANT - CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-uninitialized CERRWARN += -_gcc=-Wno-parentheses @@ -83,15 +81,10 @@ SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n liblddbg_msg CHKSRCS = $(COMOBJS32:%32.o=../common/%.c) -SRCS = ../common/llib-llddbg LIBSRCS = $(COMOBJS:%.o=../common/%.c) \ $(TOOLOBJ:%.o=$(SGSTOOLS)/common/%.c) $(BLTDATA) -LINTSRCS = $(LIBSRCS) ../common/lintsup.c -LINTSRCS32 = $(COMOBJS32:%32.o=../common/%.c) -LINTSRCS64 = $(COMOBJS64:%64.o=../common/%.c) - -CLEANFILES += $(LINTOUTS) $(BLTFILES) -CLOBBERFILES += $(DYNLIB) $(LINTLIBS) $(LIBLINKS) +CLEANFILES += $(BLTFILES) +CLOBBERFILES += $(DYNLIB) $(LIBLINKS) ROOTFS_DYNLIB = $(DYNLIB:%=$(ROOTFS_LIBDIR)/%) diff --git a/usr/src/cmd/sgs/liblddbg/Makefile.targ b/usr/src/cmd/sgs/liblddbg/Makefile.targ index 68978ceefa..30fb79e62a 100644 --- a/usr/src/cmd/sgs/liblddbg/Makefile.targ +++ b/usr/src/cmd/sgs/liblddbg/Makefile.targ @@ -23,6 +23,7 @@ # Use is subject to license terms. # # Copyright 2016 RackTop Systems. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # pics/%.o: ../common/%.c @@ -47,11 +48,6 @@ $(LIBLINKS): delete: $(RM) $(DYNLIB) -.PARALLEL: $(LINTOUT32) $(LINTOUT64) $(LINTLIB32) $(LINTLIB64) - -lint: $(LINTLIB32) $(LINTOUT32) $(LINTLIB64) $(LINTOUT64) \ - .WAIT $(SGSLINTOUT) - # Special target for native builds (ie. when we need to build a version of ld # to build a version of ld :-). diff --git a/usr/src/cmd/sgs/liblddbg/amd64/Makefile b/usr/src/cmd/sgs/liblddbg/amd64/Makefile index e0c4b7125b..1d0ab295e0 100644 --- a/usr/src/cmd/sgs/liblddbg/amd64/Makefile +++ b/usr/src/cmd/sgs/liblddbg/amd64/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -32,8 +33,6 @@ ROOTFS_DYNLIB64 = \ CONVLIBDIR = $(CONVLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) - .KEEP_STATE: $(ROOTFS_DYNLIB64) := FILEMODE= 755 diff --git a/usr/src/cmd/sgs/liblddbg/common/lintsup.c b/usr/src/cmd/sgs/liblddbg/common/lintsup.c deleted file mode 100644 index e61b8fbe94..0000000000 --- a/usr/src/cmd/sgs/liblddbg/common/lintsup.c +++ /dev/null @@ -1,65 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -/* - * Supplemental definitions for lint that help us avoid options like `-x' that - * filter out things we want to know about as well as things we don't. - */ -#include <libelf.h> -#include <link.h> -#include <sgs.h> -#include <libld.h> -#include <rtld.h> -#include <conv.h> -#include <msg.h> -#include <sys/debug.h> - -/* - * Get the Elf32 side to think that the _ELF64 side - * is defined, and vice versa. - */ -#if defined(_ELF64) -#undef _ELF64 -#include <debug.h> -#define _ELF64 -#else -#define _ELF64 -#include <debug.h> -#undef _ELF64 -#endif - -void Dbg_reloc_doactiverel(void); - -void -foo() -{ - assfail3(NULL, 0, NULL, 0, NULL, 0); -} diff --git a/usr/src/cmd/sgs/liblddbg/common/llib-llddbg b/usr/src/cmd/sgs/liblddbg/common/llib-llddbg deleted file mode 100644 index e3a43c6e0c..0000000000 --- a/usr/src/cmd/sgs/liblddbg/common/llib-llddbg +++ /dev/null @@ -1,601 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -/* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. - */ - -#include <sys/types.h> -#include <sys/auxv.h> -#include <debug.h> - -int Dbg_setup(dbg_setup_caller_t, const char *, Dbg_desc *, const char **); -void Dbg_help(void); -void Dbg_version(void); -const char * - Dbg_demangle_name(const char *); - -void Dbg_args_file(Lm_list *, int, char *); -void Dbg_args_guidance_unknown(Lm_list *, const char *); -void Dbg_args_option(Lm_list *, int, int, char *); -void Dbg_args_str2chr(Lm_list *, int, const char *, int); -void Dbg_args_Wldel(Lm_list *, int, const char *); -void Dbg_audit_activity(Lm_list *, const char *, const char *, uint_t); -void Dbg_audit_ignore(Rt_map *); -void Dbg_audit_interface(Lm_list *, const char *, const char *); -void Dbg_audit_lib(Rt_map *, const char *, int); -void Dbg_audit_objclose(Lm_list *, const char *, const char *); -void Dbg_audit_objfilter(Lm_list *, int, const char *, const char *, - const char *, const char *); -void Dbg_audit_objopen(Lm_list *, int, const char *, const char *, uint_t, - Boolean); -void Dbg_audit_objsearch(Lm_list *, int, const char *, const char *, uint_t, - const char *); -void Dbg_audit_pltenter(Lm_list *, int, const char *, const char *, Addr); -void Dbg_audit_pltexit(Lm_list *, const char *, const char *); -void Dbg_audit_preinit(Lm_list *, const char *, const char *); -void Dbg_audit_symbind(Lm_list *, int, const char *, const char *, - Addr, uint_t); -void Dbg_audit_skip(Lm_list *, const char *, const char *); -void Dbg_audit_terminate(Lm_list *, const char *); -void Dbg_audit_version(Lm_list *, const char *, uint_t, uint_t); - -void Dbg_basic_collect(Lm_list *); -void Dbg_basic_create(Lm_list *); -void Dbg_basic_files(Lm_list *); -void Dbg_basic_finish(Lm_list *); -void Dbg_basic_options(Lm_list *); -void Dbg_basic_relocate(Lm_list *); -void Dbg_basic_validate(Lm_list *); - -void Dbg_tls_modactivity(Lm_list *, void *, uint_t); -void Dbg_tls_static_block(Lm_list *, void *, ulong_t, ulong_t); -void Dbg_tls_static_resv(Rt_map *, ulong_t, ulong_t); - -void Dbg32_bind_global(Rt_map *, Elf32_Addr, Elf32_Off, Elf32_Word, - Pltbindtype, Rt_map *, Elf32_Addr, Elf32_Off, const char *, uint_t); -void Dbg64_bind_global(Rt_map *, Elf64_Addr, Elf64_Off, Elf64_Xword, - Pltbindtype, Rt_map *, Elf64_Addr, Elf64_Off, const char *, uint_t); -void Dbg64_bind_pltpad_to(Rt_map *, Addr, const char *, const char *); -void Dbg64_bind_pltpad_from(Rt_map *, Addr, const char *); -void Dbg32_bind_reject(Rt_map *, Rt_map *, const char *, int); -void Dbg64_bind_reject(Rt_map *, Rt_map *, const char *, int); -void Dbg32_bind_weak(Rt_map *, Elf32_Addr, Elf32_Addr, const char *); -void Dbg64_bind_weak(Rt_map *, Elf64_Addr, Elf64_Addr, const char *); - -void Dbg32_cap_candidate(Lm_list *, const char *); -void Dbg64_cap_candidate(Lm_list *, const char *); -void Dbg32_cap_filter(Lm_list *, const char *, Rt_map *); -void Dbg64_cap_filter(Lm_list *, const char *, Rt_map *); -void Dbg32_cap_id(Lm_list *, Lineno, const char *, const char *); -void Dbg64_cap_id(Lm_list *, Lineno, const char *, const char *); -void Dbg32_cap_identical(Lm_list *, const char *, const char *); -void Dbg64_cap_identical(Lm_list *, const char *, const char *); -void Dbg32_cap_mapfile_title(Lm_list *, Lineno); -void Dbg64_cap_mapfile_title(Lm_list *, Lineno); -void Dbg32_cap_post_title(Lm_list *, int *); -void Dbg64_cap_post_title(Lm_list *, int *); -void Dbg32_cap_out_title(Lm_list *); -void Dbg64_cap_out_title(Lm_list *); -void Dbg32_cap_sec_title(Lm_list *, const char *); -void Dbg64_cap_sec_title(Lm_list *, const char *); -void Dbg32_cap_val(Lm_list *, Syscapset *, Syscapset *, Elf32_Half); -void Dbg64_cap_val(Lm_list *, Syscapset *, Syscapset *, Elf64_Half); - -void Dbg32_dl_dladdr(Rt_map *, void *); -void Dbg64_dl_dladdr(Rt_map *, void *); -void Dbg32_dl_dlclose(Rt_map *, const char *, int); -void Dbg64_dl_dlclose(Rt_map *, const char *, int); -void Dbg32_dl_dldump(Rt_map *, const char *, const char *, int); -void Dbg64_dl_dldump(Rt_map *, const char *, const char *, int); -void Dbg32_dl_dlerror(Rt_map *, const char *); -void Dbg64_dl_dlerror(Rt_map *, const char *); -void Dbg32_dl_dlinfo(Rt_map *, const char *, int, void *); -void Dbg64_dl_dlinfo(Rt_map *, const char *, int, void *); -void Dbg32_dl_dlopen(Rt_map *, const char *, int *, int); -void Dbg64_dl_dlopen(Rt_map *, const char *, int *, int); -void Dbg32_dl_dlsym(Rt_map *, const char *, int *, const char *, int); -void Dbg64_dl_dlsym(Rt_map *, const char *, int *, const char *, int); -void Dbg32_dl_iphdr_callback(Lm_list *, struct dl_phdr_info *); -void Dbg64_dl_iphdr_callback(Lm_list *, struct dl_phdr_info *); -void Dbg32_dl_iphdr_enter(Rt_map *, u_longlong_t, u_longlong_t); -void Dbg64_dl_iphdr_enter(Rt_map *, u_longlong_t, u_longlong_t); -void Dbg32_dl_iphdr_mapchange(Lm_list *, u_longlong_t, u_longlong_t); -void Dbg64_dl_iphdr_mapchange(Lm_list *, u_longlong_t, u_longlong_t); -void Dbg32_dl_iphdr_unmap_ret(Lm_list *); -void Dbg64_dl_iphdr_unmap_ret(Lm_list *); - -void Dbg32_ent_print(Lm_list *, uchar_t, Elf32_Half, APlist *); -void Dbg64_ent_print(Lm_list *, uchar_t, Elf64_Half, APlist *); - -void Dbg32_file_analyze(Rt_map *); -void Dbg64_file_analyze64(Rt_map *); -void Dbg32_file_aout(Lm_list *, const char *, Addr, size_t, const char *, - Aliste); -void Dbg64_file_aout(Lm_list *, const char *, Addr, size_t, const char *, - Aliste); -void Dbg32_file_ar(Lm_list *, const char *, Boolean); -void Dbg64_file_ar(Lm_list *, const char *, Boolean); -void Dbg32_file_archive(Lm_list *, const char *, int); -void Dbg64_file_archive(Lm_list *, const char *, int); -void Dbg32_file_bind_entry(Lm_list *, Bnd_desc *); -void Dbg64_file_bind_entry(Lm_list *, Bnd_desc *); -void Dbg32_file_bindings(Rt_map *, int); -void Dbg64_file_bindings(Rt_map *, int); -void Dbg32_file_bindings_done(Lm_list *); -void Dbg64_file_bindings_done(Lm_list *); -void Dbg32_file_config_dis(Lm_list *, const char *, int); -void Dbg64_file_config_dis(Lm_list *, const char *, int); -void Dbg32_file_config_obj(Lm_list *, const char *, const char *, - const char *); -void Dbg64_file_config_obj(Lm_list *, const char *, const char *, - const char *); -void Dbg32_file_cntl(Lm_list *, Aliste, Aliste); -void Dbg64_file_cntl(Lm_list *, Aliste, Aliste); -void Dbg32_file_cleanup(Lm_list *, const char *, Aliste); -void Dbg64_file_cleanup(Lm_list *, const char *, Aliste); -void Dbg32_file_deferred(Lm_list *, const char *, const char *); -void Dbg64_file_deferred(Lm_list *, const char *, const char *); -void Dbg32_file_del_rescan(Lm_list *); -void Dbg64_file_del_rescan(Lm_list *); -void Dbg32_file_delete(Rt_map *); -void Dbg64_file_delete(Rt_map *); -void Dbg32_file_elf(Lm_list *, const char *, Addr, size_t, const char *, - Aliste); -void Dbg64_file_elf(Lm_list *, const char *, Addr, size_t, const char *, - Aliste); -void Dbg32_file_filtee(Lm_list *, const char *, const char *, int); -void Dbg64_file_filtee(Lm_list *, const char *, const char *, int); -void Dbg32_file_filter(Lm_list *, const char *, const char *, int); -void Dbg64_file_filter(Lm_list *, const char *, const char *, int); -void Dbg64_file_fixname(Lm_list *, const char *, const char *); -void Dbg32_file_fixname(Lm_list *, const char *, const char *); -void Dbg32_file_hdl_action(Grp_hdl *, Rt_map *, int, uint_t); -void Dbg64_file_hdl_action(Grp_hdl *, Rt_map *, int, uint_t); -void Dbg32_file_hdl_collect(Grp_hdl *, const char *); -void Dbg64_file_hdl_collect(Grp_hdl *, const char *); -void Dbg32_file_hdl_title(int); -void Dbg64_file_hdl_title(int); -void Dbg64_file_lazyload(Rt_map *, const char *, const char *); -void Dbg32_file_lazyload(Rt_map *, const char *, const char *); -void Dbg32_file_ldso(Rt_map *, char **, auxv_t *, const char *, Aliste); -void Dbg64_file_ldso(Rt_map *, char **, auxv_t *, const char *, Aliste); -void Dbg32_file_mmapobj(Lm_list *, const char *, mmapobj_result_t *, uint_t); -void Dbg64_file_mmapobj(Lm_list *, const char *, mmapobj_result_t *, uint_t); -void Dbg32_file_mode_promote(Rt_map *, int); -void Dbg64_file_mode_promote(Rt_map *, int); -void Dbg32_file_modified(Lm_list *, const char *, const char *, const char *, - int, int, Elf *, Elf *); -void Dbg64_file_modified(Lm_list *, const char *, const char *, const char *, - int, int, Elf *, Elf *); -void Dbg32_file_needed(Rt_map *, const char *); -void Dbg64_file_needed(Rt_map *, const char *); -void Dbg32_file_output(Ofl_desc *); -void Dbg64_file_output64(Ofl_desc *); -void Dbg32_file_preload(Lm_list *, const char *); -void Dbg64_file_preload(Lm_list *, const char *); -void Dbg32_file_prot(Rt_map *, int); -void Dbg64_file_prot(Rt_map *, int); -void Dbg32_file_rejected(Lm_list *, Rej_desc *, Elf32_Half); -void Dbg64_file_rejected(Lm_list *, Rej_desc *, Elf32_Half); -void Dbg32_file_reuse(Lm_list *, const char *, const char *); -void Dbg64_file_reuse(Lm_list *, const char *, const char *); -void Dbg32_file_skip(Lm_list *, const char *, const char *); -void Dbg64_file_skip(Lm_list *, const char *, const char *); - -void Dbg32_got_display(Ofl_desc *, Elf32_Off, int, - Elf32_Word, size_t m_got_entsize); -void Dbg64_got_display(Ofl_desc *, Elf64_Off, int, - Elf64_Word, size_t m_got_entsize); - -void Dbg32_libs_audit(Lm_list *, const char *, const char *); -void Dbg64_libs_audit(Lm_list *, const char *, const char *); -void Dbg32_libs_find(Lm_list *, const char *); -void Dbg64_libs_find(Lm_list *, const char *); -void Dbg32_libs_found(Lm_list *, const char *, int); -void Dbg64_libs_found(Lm_list *, const char *, int); -void Dbg32_libs_insecure(Lm_list *, const char *, int); -void Dbg64_libs_insecure(Lm_list *, const char *, int); -void Dbg32_libs_init(Lm_list *, APlist *, APlist *); -void Dbg64_libs_init(Lm_list *, APlist *, APlist *); -void Dbg32_libs_l(Lm_list *, const char *, const char *); -void Dbg64_libs_l(Lm_list *, const char *, const char *); -void Dbg32_libs_path(Lm_list *, const char *, uint_t, const char *); -void Dbg64_libs_path(Lm_list *, const char *, uint_t, const char *); -void Dbg32_libs_req(Lm_list *, const char *, const char *, const char *); -void Dbg64_libs_req(Lm_list *, const char *, const char *, const char *); -void Dbg32_libs_update(Lm_list *, APlist *, APlist *); -void Dbg64_libs_update(Lm_list *, APlist *, APlist *); -void Dbg32_libs_yp(Lm_list *, const char *); -void Dbg64_libs_yp(Lm_list *, const char *); -void Dbg32_libs_ylu(Lm_list *, const char *, const char *, int); -void Dbg64_libs_ylu(Lm_list *, const char *, const char *, int); - -void Dbg32_map_cexp_id(Lm_list *, Boolean, const char *, ulong_t, - const char *); -void Dbg64_map_cexp_id(Lm_list *, Boolean, const char *, ulong_t, - const char *); -void Dbg32_map_dv(Lm_list *, const char *, Lineno); -void Dbg64_map_dv(Lm_list *, const char *, Lineno); -void Dbg32_map_dv_entry(Lm_list *, Lineno, int, const char *); -void Dbg64_map_dv_entry(Lm_list *, Lineno, int, const char *); -void Dbg32_map_ent(Lm_list *, Ent_desc *, Ofl_desc *, Lineno); -void Dbg64_map_ent(Lm_list *, Ent_desc *, Ofl_desc *, Lineno); -void Dbg32_map_ent_ord_title(Lm_list *, const char *); -void Dbg64_map_ent_ord_title(Lm_list *, const char *); -void Dbg32_map_hdr_noalloc(Lm_list *, Lineno); -void Dbg64_map_hdr_noalloc(Lm_list *, Lineno); -void Dbg32_map_parse(Lm_list *, const char *, int); -void Dbg64_map_parse(Lm_list *, const char *, int); -void Dbg32_map_pass(Lm_list *, Boolean, const char *, ulong_t, const char *); -void Dbg64_map_pass(Lm_list *, Boolean, const char *, ulong_t, const char *); -void Dbg32_map_post_title(Lm_list *); -void Dbg64_map_post_title(Lm_list *); -void Dbg32_map_seg_os_order(Lm_list *, Sg_desc *, const char *, - Elf32_Word, Lineno); -void Dbg64_map_seg_os_order(Lm_list *, Sg_desc *, const char *, - Elf64_Word, Lineno); -void Dbg32_map_seg(Ofl_desc *, uint_t, int, Sg_desc *, Lineno); -void Dbg64_map_seg(Ofl_desc *, uint_t, int, Sg_desc *, Lineno); -void Dbg32_map_size_new(Lm_list *, const char *, const char *, Lineno); -void Dbg64_map_size_new(Lm_list *, const char *, const char *, Lineno); -void Dbg32_map_size_old(Ofl_desc *, Sym_desc *, const char *, Lineno); -void Dbg64_map_size_old(Ofl_desc *, Sym_desc *, const char *, Lineno); -void Dbg32_map_sort_title(Lm_list *, Boolean); -void Dbg64_map_sort_title(Lm_list *, Boolean); -void Dbg32_map_sort_seg(Lm_list *, uchar_t, Elf32_Half, Sg_desc *); -void Dbg64_map_sort_seg(Lm_list *, uchar_t, Elf64_Half, Sg_desc *); -void Dbg32_map_symbol(Ofl_desc *, Sym_desc *); -void Dbg64_map_symbol(Ofl_desc *, Sym_desc *); -void Dbg32_map_version(Lm_list *, const char *, const char *, int); -void Dbg64_map_version(Lm_list *, const char *, const char *, int); - -void Dbg32_move_adjexpandreloc(Lm_list *, Elf32_Word, const char *); -void Dbg64_move_adjexpandreloc(Lm_list *, Elf64_Xword, const char *); -void Dbg32_move_adjmovereloc(Lm_list *, Elf32_Word, Elf32_Word, - const char *); -void Dbg64_move_adjmovereloc(Lm_list *, Elf64_Xword, Elf64_Xword, - const char *); -void Dbg32_move_bad(Lm_list *, ulong_t, const char *, Addr); -void Dbg64_move_bad(Lm_list *, ulong_t, const char *, Addr); -void Dbg32_move_data(Rt_map *); -void Dbg64_move_data(Rt_map *); -void Dbg32_move_entry1(Lm_list *, int, Move *, Sym_desc *); -void Dbg64_move_entry1(Lm_list *, int, Move *, Sym_desc *); -void Dbg32_move_entry2(Lm_list *, Elf32_Move *, Elf32_Word, const char *); -void Dbg64_move_entry2(Lm_list *, Elf64_Move *, Elf64_Word, const char *); -void Dbg32_move_expand(Lm_list *, Elf32_Move *, Elf32_Addr); -void Dbg64_move_expand(Lm_list *, Elf64_Move *, Elf64_Addr); -void Dbg32_move_input(Lm_list *, const char *); -void Dbg64_move_input(Lm_list *, const char *); -void Dbg32_move_outmove(Lm_list *, const char *); -void Dbg64_move_outmove(Lm_list *, const char *); -void Dbg32_move_outsctadj(Lm_list *, Sym_desc *); -void Dbg64_move_outsctadj(Lm_list *, Sym_desc *); -void Dbg32_move_parexpn(Lm_list *, const char *, const char *); -void Dbg64_move_parexpn(Lm_list *, const char *, const char *); - -void Dbg32_reloc_apply_reg(Lm_list *, int, Elf32_Half, Elf32_Word, - Elf32_Word); -void Dbg64_reloc_apply_reg(Lm_list *, int, Elf64_Half, Elf64_Xword, - Elf64_Xword); -void Dbg32_reloc_apply_val(Lm_list *, int, Elf32_Word, Elf32_Word); -void Dbg64_reloc_apply_val(Lm_list *, int, Elf64_Xword, Elf64_Xword); -void Dbg32_reloc_ars_entry(Lm_list *, int, Elf32_Word, Elf32_Half, Rel_desc *); -void Dbg64_reloc_ars_entry(Lm_list *, int, Elf64_Word, Elf64_Half, Rel_desc *); -void Dbg32_reloc_copy(Rt_map *, Rt_map *, const char *, int); -void Dbg64_reloc_copy(Rt_map *, Rt_map *, const char *, int); -void Dbg32_reloc_discard(Lm_list *, Elf32_Half, Rel_desc *); -void Dbg64_reloc_discard(Lm_list *, Elf64_Half, Rel_desc *); -void Dbg32_reloc_doact(Lm_list *, int, Elf32_Half, Elf32_Word, Rel_desc *, - Elf32_Word, Elf32_Word, rel_desc_sname_func_t); -void Dbg64_reloc_doact(Lm_list *, int, Elf64_Half, Elf64_Word, Rel_desc *, - Elf64_Xword, Elf64_Xword, rel_desc_sname_func_t); -void Dbg32_reloc_doact_title(Lm_list *); -void Dbg64_reloc_doact_title(Lm_list *); -void Dbg32_reloc_dooutrel(Lm_list *, Elf32_Word); -void Dbg64_reloc_dooutrel(Lm_list *, Elf64_Word); -void Dbg32_reloc_entry(Lm_list *, const char *, Elf32_Half, Elf32_Word, - void *, const char *, const char *, const char *); -void Dbg64_reloc_entry(Lm_list *, const char *, Elf64_Half, Elf64_Word, - void *, const char *, const char *, const char *); -void Dbg32_reloc_error(Lm_list *, int, Elf32_Half, Elf32_Word, void *, - const char *); -void Dbg64_reloc_error(Lm_list *, int, Elf64_Half, Elf64_Word, void *, - const char *); -void Dbg32_reloc_generate(Lm_list *, Os_desc *, Elf32_Word); -void Dbg64_reloc_generate(Lm_list *, Os_desc *, Elf64_Word); -void Dbg32_reloc_in(Lm_list *, int, Elf32_Half, Elf32_Word, void *, - const char *, Elf32_Word, const char *); -void Dbg64_reloc_in(Lm_list *, int, Elf64_Half, Elf64_Word, void *, - const char *, Elf64_Word, const char *); -void Dbg32_reloc_ors_entry(Lm_list *, int, Elf32_Word, Elf32_Half, Rel_desc *); -void Dbg64_reloc_ors_entry(Lm_list *, int, Elf64_Word, Elf64_Half, Rel_desc *); -void Dbg32_reloc_out(Ofl_desc *, int, Elf32_Word, void *, const char *, - const char *); -void Dbg64_reloc_out(Ofl_desc *, int, Elf64_Word, void *, const char *, - const char *); -void Dbg32_reloc_proc(Lm_list *, Os_desc *, Is_desc *, Is_desc *); -void Dbg64_reloc_proc(Lm_list *, Os_desc *, Is_desc *, Is_desc *); -void Dbg32_reloc_run(Rt_map *, uint_t, int, int); -void Dbg64_reloc_run(Rt_map *, uint_t, int, int); -void Dbg32_reloc_transition(Lm_list *, Elf32_Half, Elf32_Word, Rel_desc *, - rel_desc_sname_func_t); -void Dbg64_reloc_transition(Lm_list *, Elf64_Half, Elf64_Word, Rel_desc *, - rel_desc_sname_func_t); - -void Dbg32_sec_added(Lm_list *, Os_desc *, Sg_desc *); -void Dbg64_sec_added(Lm_list *, Os_desc *, Sg_desc *); -void Dbg32_sec_backing(Lm_list *); -void Dbg64_sec_backing(Lm_list *); -void Dbg32_sec_created(Lm_list *, Os_desc *, Sg_desc *); -void Dbg64_sec_created(Lm_list *, Os_desc *, Sg_desc *); -void Dbg32_sec_discarded(Lm_list *, Is_desc *, Is_desc *); -void Dbg64_sec_discarded(Lm_list *, Is_desc *, Is_desc *); -void Dbg32_sec_group(Lm_list *, Is_desc *, Group_desc *); -void Dbg64_sec_group(Lm_list *, Is_desc *, Group_desc *); -void Dbg32_sec_gnu_comdat(Lm_list *, Is_desc *, Boolean, Boolean); -void Dbg64_sec_gnu_comdat(Lm_list *, Is_desc *, Boolean, Boolean); -void Dbg32_sec_in(Lm_list *, Is_desc *); -void Dbg64_sec_in(Lm_list *, Is_desc *); -void Dbg32_sec_order_error(Lm_list *, Ifl_desc *, Elf32_Word, int); -void Dbg64_sec_order_error(Lm_list *, Ifl_desc *, Elf64_Word, int); -void Dbg32_sec_order_list(Ofl_desc *, int); -void Dbg64_sec_order_list(Ofl_desc *, int); -void Dbg32_sec_redirected(Lm_list *, Is_desc *, const char *); -void Dbg64_sec_redirected(Lm_list *, Is_desc *, const char *); -void Dbg32_sec_strtab(Lm_list *, Os_desc *, Str_tbl *); -void Dbg64_sec_strtab(Lm_list *, Os_desc *, Str_tbl *); - -void Dbg32_seg_desc_entry(Lm_list *, uchar_t, Elf32_Half, int, Sg_desc *, - Boolean); -void Dbg64_seg_desc_entry(Lm_list *, uchar_t, Elf64_Half, int, Sg_desc *, - Boolean); -void Dbg32_seg_entry(Ofl_desc *, int, Sg_desc *); -void Dbg64_seg_entry(Ofl_desc *, int, Sg_desc *); -void Dbg32_seg_list(Lm_list *, uchar_t, Elf32_Half, APlist *); -void Dbg64_seg_list(Lm_list *, uchar_t, Elf64_Half, APlist *); -void Dbg32_seg_os(Ofl_desc *, Os_desc *, int); -void Dbg64_seg_os(Ofl_desc *, Os_desc *, int); -void Dbg32_seg_title(Lm_list *); -void Dbg64_seg_title(Lm_list *); - -void Dbg32_shdr_modified(Lm_list *, const char *, uchar_t, Half, - Elf32_Word, Shdr *, Shdr *, const char *); -void Dbg64_shdr_modified(Lm_list *, const char *, uchar_t, Half, - Elf64_Word, Shdr *, Shdr *, const char *); - -void Dbg32_statistics_ar(Ofl_desc *); -void Dbg64_statistics_ar(Ofl_desc *); -void Dbg32_statistics_ld(Ofl_desc *); -void Dbg64_statistics_ld(Ofl_desc *); - -void Dbg32_support_action(Lm_list *, const char *, const char *, Support_ndx, - const char *); -void Dbg64_support_action(Lm_list *, const char *, const char *, Support_ndx, - const char *); -void Dbg32_support_load(Lm_list *, const char *, const char *); -void Dbg64_support_load(Lm_list *, const char *, const char *); -void Dbg32_support_req(Lm_list *, const char *, int); -void Dbg64_support_req(Lm_list *, const char *, int); - -void Dbg32_syminfo_entry(Lm_list *, Elf32_Word, Syminfo *, Sym *, const char *, - Dyn *); -void Dbg64_syminfo_entry(Lm_list *, Elf64_Word, Syminfo *, Sym *, const char *, - Dyn *); -void Dbg32_syminfo_title(Lm_list *); -void Dbg64_syminfo_title(Lm_list *); - -void Dbg32_syms_ar_checking(Lm_list *, const char *, const char *, - Elf_Arsym *); -void Dbg64_syms_ar_checking(Lm_list *, const char *, const char *, - Elf_Arsym *); -void Dbg32_syms_ar_entry(Lm_list *, Xword, Elf_Arsym *); -void Dbg64_syms_ar_entry(Lm_list *, Xword, Elf_Arsym *); -void Dbg32_syms_ar_force(Lm_list *, const char *, const char *); -void Dbg64_syms_ar_force(Lm_list *, const char *, const char *); -void Dbg32_syms_ar_resolve(Lm_list *, const char *, const char *, - Elf_Arsym *); -void Dbg64_syms_ar_resolve(Lm_list *, const char *, const char *, - Elf_Arsym *); -void Dbg32_syms_ar_skip(Lm_list *, const char *, Elf_Arsym *); -void Dbg64_syms_ar_skip(Lm_list *, const char *, Elf_Arsym *); -void Dbg32_syms_ar_title(Lm_list *, const char *, Boolean); -void Dbg64_syms_ar_title(Lm_list *, const char *, Boolean); -void Dbg32_syms_cap_convert(Ofl_desc *, Word, const char *, Sym *); -void Dbg64_syms_cap_convert(Ofl_desc *, Word, const char *, Sym *); -void Dbg32_syms_cap_local(Ofl_desc *, Word, const char *, Sym *, Sym_desc *); -void Dbg64_syms_cap_local(Ofl_desc *, Word, const char *, Sym *, Sym_desc *); -void Dbg32_syms_cap_lookup(Rt_map *, uint_t, const char *, uint_t, Half, - Syscapset *); -void Dbg64_syms_cap_lookup(Rt_map *, uint_t, const char *, uint_t, Half, - Syscapset *); -void Dbg32_syms_cap_title(Ofl_desc *); -void Dbg64_syms_cap_title(Ofl_desc *); -void Dbg32_syms_copy_reloc(Ofl_desc *, Sym_desc *, Word); -void Dbg64_syms_copy_reloc(Ofl_desc *, Sym_desc *, Word); -void Dbg32_syms_created(Lm_list *, const char *); -void Dbg64_syms_created(Lm_list *, const char *); -void Dbg32_syms_discarded(Lm_list *, Sym_desc *); -void Dbg64_syms_discarded(Lm_list *, Sym_desc *); -void Dbg32_syms_entered(Ofl_desc *, Sym *, Sym_desc *); -void Dbg64_syms_entered(Ofl_desc *, Sym *, Sym_desc *); -void Dbg32_syms_entry(Lm_list *, Elf32_Word, Sym_desc *); -void Dbg64_syms_entry(Lm_list *, Elf64_Word, Sym_desc *); -void Dbg32_syms_global(Lm_list *, Elf32_Word, const char *); -void Dbg64_syms_global(Lm_list *, Elf64_Word, const char *); -void Dbg32_syms_ignore(Ofl_desc *, Sym_desc *); -void Dbg64_syms_ignore(Ofl_desc *, Sym_desc *); -void Dbg32_syms_lazy_rescan(Lm_list *, const char *); -void Dbg64_syms_lazy_rescan(Lm_list *, const char *); -void Dbg32_syms_lookup(Rt_map *, const char *, const char *); -void Dbg64_syms_lookup(Rt_map *, const char *, const char *); -void Dbg32_syms_lookup_aout(Lm_list *, const char *); -void Dbg32_syms_new(Ofl_desc *, Sym *, Sym_desc *); -void Dbg64_syms_new(Ofl_desc *, Sym *, Sym_desc *); -void Dbg32_syms_old(Ofl_desc *, Sym_desc *); -void Dbg64_syms_old(Ofl_desc *, Sym_desc *); -void Dbg32_syms_process(Lm_list *, Ifl_desc *); -void Dbg64_syms_process(Lm_list *, Ifl_desc *); -void Dbg32_syms_reduce(Ofl_desc *, int, Sym_desc *, int, const char *); -void Dbg64_syms_reduce(Ofl_desc *, int, Sym_desc *, int, const char *); -void Dbg32_syms_resolved(Ofl_desc *, Sym_desc *); -void Dbg64_syms_resolved(Ofl_desc *, Sym_desc *); -void Dbg32_syms_resolving(Ofl_desc *, Elf32_Word, const char *, int, int, - Sym *, Sym *, Sym_desc *, Ifl_desc *); -void Dbg64_syms_resolving(Ofl_desc *, Elf64_Word, const char *, int, int, - Sym *, Sym *, Sym_desc *, Ifl_desc *); -void Dbg32_syms_sec_entry(Lm_list *, Elf32_Word, Sg_desc *, Os_desc *); -void Dbg64_syms_sec_entry(Lm_list *, Elf64_Word, Sg_desc *, Os_desc *); -void Dbg32_syms_sec_title(Lm_list *); -void Dbg64_syms_sec_title(Lm_list *); -void Dbg32_syms_spec_title(Lm_list *); -void Dbg64_syms_spec_title(Lm_list *); -void Dbg32_syms_updated(Ofl_desc *, Sym_desc *, const char *); -void Dbg64_syms_updated(Ofl_desc *, Sym_desc *, const char *); -void Dbg32_syms_up_title(Lm_list *); -void Dbg64_syms_up_title(Lm_list *); -void Dbg32_syms_wrap(Lm_list *, Elf32_Word, const char *, const char *); -void Dbg64_syms_wrap(Lm_list *, Elf64_Word, const char *, const char *); - -void Dbg32_util_broadcast(Rt_map *); -void Dbg64_util_broadcast(Rt_map *); -void Dbg32_util_call_array(Rt_map *, void *, int, Elf32_Word); -void Dbg64_util_call_array(Rt_map *, void *, int, Elf64_Word); -void Dbg32_util_call_fini(Rt_map *); -void Dbg64_util_call_fini(Rt_map *); -void Dbg32_util_call_init(Rt_map *, int); -void Dbg64_util_call_init(Rt_map *, int); -void Dbg32_util_call_main(Rt_map *); -void Dbg64_util_call_main(Rt_map *); -void Dbg32_util_collect(Rt_map *, int, int); -void Dbg64_util_collect(Rt_map *, int, int); -void Dbg32_util_dbnotify(Lm_list *, rd_event_e, r_state_e); -void Dbg64_util_dbnotify(Lm_list *, rd_event_e, r_state_e); -void Dbg32_util_edge_in(Lm_list *, Rt_map *, uint_t, Rt_map *, int, int); -void Dbg64_util_edge_in(Lm_list *, Rt_map *, uint_t, Rt_map *, int, int); -void Dbg32_util_edge_out(Rt_map *, Rt_map *); -void Dbg64_util_edge_out(Rt_map *, Rt_map *); -void Dbg32_util_intoolate(Rt_map *); -void Dbg64_util_intoolate(Rt_map *); -void Dbg32_util_lcinterface(Rt_map *, int, char *); -void Dbg64_util_lcinterface(Rt_map *, int, char *); -void Dbg32_util_nl(Lm_list *, int); -void Dbg64_util_nl(Lm_list *, int); -void Dbg32_util_scc_entry(Rt_map *, uint_t); -void Dbg64_util_scc_entry(Rt_map *, uint_t); -void Dbg32_util_scc_title(Lm_list *, int); -void Dbg64_util_scc_title(Lm_list *, int); -void Dbg32_util_str(Lm_list *, const char *); -void Dbg64_util_str(Lm_list *, const char *); -void Dbg32_util_wait(Rt_map *, Rt_map *, int); -void Dbg64_util_wait(Rt_map *, Rt_map *, int); - -void Dbg32_unused_file(Lm_list *, const char *, int, uint_t); -void Dbg64_unused_file(Lm_list *, const char *, int, uint_t); -void Dbg32_unused_lcinterface(Rt_map *, Rt_map *, int); -void Dbg64_unused_lcinterface(Rt_map *, Rt_map *, int); -void Dbg32_unused_path(Lm_list *, const char *, uint_t, uint_t, - const char *); -void Dbg64_unused_path(Lm_list *, const char *, uint_t, uint_t, - const char *); -void Dbg32_unused_sec(Lm_list *, Is_desc *); -void Dbg64_unused_sec(Lm_list *, Is_desc *); -void Dbg32_unused_unref(Rt_map *, const char *); -void Dbg64_unused_unref(Rt_map *, const char *); - -void Dbg32_ver_need_done(Lm_list *); -void Dbg64_ver_need_done(Lm_list *); -void Dbg32_ver_need_entry(Lm_list *, Half, const char *, const char *); -void Dbg64_ver_need_entry(Lm_list *, Half, const char *, const char *); -void Dbg32_ver_need_title(Lm_list *, const char *); -void Dbg64_ver_need_title(Lm_list *, const char *); - -const char *Elf_demangle_name(const char *); - -void Elf_syminfo_entry(Lm_list *, Word, Syminfo *, const char *, const char *); -void Elf_syminfo_title(Lm_list *); -void Elf_ver_def_title(Lm_list *); -void Elf_ver_need_title(Lm_list *, int); -void Elf_ver_line_1(Lm_list *, const char *, const char *, const char *, - const char *); -void Elf_ver_line_2(Lm_list *, const char *, const char *); -void Elf_ver_line_3(Lm_list *, const char *, const char *, const char *); -void Elf_ver_line_4(Lm_list *, const char *); -void Elf_ver_line_5(Lm_list *, const char *, const char *); - -void Elf64_cap_entry(Lm_list *, Elf64_Cap *, int ndx, const char *, size_t, - Elf64_Half); -void Elf32_cap_entry(Lm_list *, Elf32_Cap *, int ndx, const char *, size_t, - Elf32_Half); -void Elf64_cap_title(Lm_list *); -void Elf32_cap_title(Lm_list *); - -void Elf64_dyn_entry(Lm_list *, Elf64_Dyn *, int, const char *, uchar_t, - Elf64_Half); -void Elf32_dyn_entry(Lm_list *, Elf32_Dyn *, int, const char *, uchar_t, - Elf32_Half); -void Elf64_dyn_null_entry(Lm_list *, Elf64_Dyn *, int, int); -void Elf32_dyn_null_entry(Lm_list *, Elf32_Dyn *, int, int); -void Elf64_dyn_title(Lm_list *); -void Elf32_dyn_title(Lm_list *); - -void Elf64_ehdr(Lm_list *, Elf64_Ehdr *, Elf64_Shdr *); -void Elf32_ehdr(Lm_list *, Elf32_Ehdr *, Elf32_Shdr *); - -void Elf64_got_entry(Lm_list *, Elf64_Sword, Elf64_Addr, Elf64_Xword, - Elf64_Half, uchar_t, uchar_t, Elf64_Word, void *, const char *); -void Elf32_got_entry(Lm_list *, Elf32_Sword, Elf32_Addr, Elf32_Word, - Elf32_Half, uchar_t, uchar_t, Elf32_Word, void *, const char *); -void Elf64_got_title(Lm_list *); -void Elf32_got_title(Lm_list *); - -void Elf64_phdr(Lm_list *, uchar_t, Elf64_Half, Elf64_Phdr *); -void Elf32_phdr(Lm_list *, uchar_t, Elf32_Half, Elf32_Phdr *); - -void Elf64_reloc_apply_reg(Lm_list *, int, Elf64_Half, Elf64_Xword, - Elf64_Xword); -void Elf32_reloc_apply_reg(Lm_list *, int, Elf32_Half, Elf32_Word, - Elf32_Word); -void Elf64_reloc_apply_val(Lm_list *, int, Elf64_Xword, Elf64_Xword); -void Elf32_reloc_apply_val(Lm_list *, int, Elf32_Word, Elf32_Word); -void Elf64_reloc_entry_1(Lm_list *, int, const char *, Elf64_Half, Word, void *, - const char *, const char *, const char *); -void Elf32_reloc_entry_1(Lm_list *, int, const char *, Elf32_Half, Word, void *, - const char *, const char *, const char *); -void Elf64_reloc_entry_2(Lm_list *, int, const char *, Word, const char *, - Elf64_Addr, Elf64_Sxword, const char *, const char *, const char *); -void Elf32_reloc_entry_2(Lm_list *, int, const char *, Word, const char *, - Elf32_Addr, Elf32_Sword, const char *, const char *, const char *); -void Elf64_reloc_title(Lm_list *, int, Word); -void Elf32_reloc_title(Lm_list *, int, Word); - -void Elf64_shdr(Lm_list *, uchar_t, Elf64_Half, Elf64_Shdr *); -void Elf32_shdr(Lm_list *, uchar_t, Elf32_Half, Elf32_Shdr *); - -void Elf64_syms_table_entry(Lm_list *, int, const char *, uchar_t, Elf64_Half, - Elf64_Sym *, Elf64_Versym, int, const char *, const char *); -void Elf32_syms_table_entry(Lm_list *, int, const char *, uchar_t, Elf32_Half, - Elf32_Sym *, Elf32_Versym, int, const char *, const char *); -void Elf64_syms_table_title(Lm_list *, int); -void Elf32_syms_table_title(Lm_list *, int); diff --git a/usr/src/cmd/sgs/liblddbg/sparcv9/Makefile b/usr/src/cmd/sgs/liblddbg/sparcv9/Makefile index 0554aaed96..b57167b378 100644 --- a/usr/src/cmd/sgs/liblddbg/sparcv9/Makefile +++ b/usr/src/cmd/sgs/liblddbg/sparcv9/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -32,8 +33,6 @@ ROOTFS_DYNLIB64 = \ CONVLIBDIR = $(CONVLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) - .KEEP_STATE: $(ROOTFS_DYNLIB64) := FILEMODE= 755 diff --git a/usr/src/cmd/sgs/libldmake/Makefile.com b/usr/src/cmd/sgs/libldmake/Makefile.com index 6333a7b795..76a89e0dfb 100644 --- a/usr/src/cmd/sgs/libldmake/Makefile.com +++ b/usr/src/cmd/sgs/libldmake/Makefile.com @@ -23,6 +23,8 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# LIBRARY= libldmake.a VERS= .1 @@ -41,19 +43,11 @@ DYNFLAGS += $(CC_USE_PROTO) CFLAGS += $(C_PICFLAGS) CFLAGS64 += $(C_PICFLAGS64) -LINTFLAGS += -erroff=E_NAME_DECL_NOT_USED_DEF2 \ - -erroff=E_NAME_DEF_NOT_USED2 \ - -erroff=E_NAME_USED_NOT_DEF2 -LINTFLAGS64 += -erroff=E_NAME_DECL_NOT_USED_DEF2 \ - -erroff=E_NAME_DEF_NOT_USED2 \ - -erroff=E_NAME_USED_NOT_DEF2 -LINTSRCS = $(SRCS) - SRCS= $(OBJECTS:%.o=../common/%.c) LDLIBS += -lc CLEANFILES += -CLOBBERFILES += $(DYNLIB) $(LINTLIB) $(LINTOUTS) +CLOBBERFILES += $(DYNLIB) ROOTDYNLIB= $(DYNLIB:%=$(ROOTLIBDIR)/%) ROOTDYNLIB64= $(DYNLIB:%=$(ROOTLIBDIR64)/%) diff --git a/usr/src/cmd/sgs/libldmake/Makefile.targ b/usr/src/cmd/sgs/libldmake/Makefile.targ index de946c6334..72ed530854 100644 --- a/usr/src/cmd/sgs/libldmake/Makefile.targ +++ b/usr/src/cmd/sgs/libldmake/Makefile.targ @@ -22,11 +22,9 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -lint: $(LINTLIB) $(LINTOUT32) $(LINTOUT64) $(SGSLINTOUT) - pics/%.o: ../common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) diff --git a/usr/src/cmd/sgs/libldmake/amd64/Makefile b/usr/src/cmd/sgs/libldmake/amd64/Makefile index b8bf0f9232..c702bfff21 100644 --- a/usr/src/cmd/sgs/libldmake/amd64/Makefile +++ b/usr/src/cmd/sgs/libldmake/amd64/Makefile @@ -23,15 +23,13 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com .KEEP_STATE: -LINTFLAGS64 += $(VAR_LINTFLAGS64) - all: $(DYNLIB) install: all $(ROOTDYNLIB64) diff --git a/usr/src/cmd/sgs/libldmake/sparcv9/Makefile b/usr/src/cmd/sgs/libldmake/sparcv9/Makefile index 5b90c5deb9..18ab13446e 100644 --- a/usr/src/cmd/sgs/libldmake/sparcv9/Makefile +++ b/usr/src/cmd/sgs/libldmake/sparcv9/Makefile @@ -23,15 +23,13 @@ # Copyright 1998-2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com .KEEP_STATE: -LINTFLAGS64 += $(VAR_LINTFLAGS64) - all: $(DYNLIB) install: all $(ROOTDYNLIB64) diff --git a/usr/src/cmd/sgs/libldstab/Makefile.com b/usr/src/cmd/sgs/libldstab/Makefile.com index 93a0fa8b2a..16e3817397 100644 --- a/usr/src/cmd/sgs/libldstab/Makefile.com +++ b/usr/src/cmd/sgs/libldstab/Makefile.com @@ -23,6 +23,8 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# LIBRARY= libldstab.a VERS= .1 @@ -43,17 +45,8 @@ CPPFLAGS += -I$(ELFCAP) LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf -lc DYNFLAGS += $(VERSREF) $(CC_USE_PROTO) -LINTFLAGS += -erroff=E_NAME_DECL_NOT_USED_DEF2 \ - -erroff=E_NAME_DEF_NOT_USED2 \ - -erroff=E_NAME_USED_NOT_DEF2 -LINTFLAGS64 += -erroff=E_NAME_DECL_NOT_USED_DEF2 \ - -erroff=E_NAME_DEF_NOT_USED2 \ - -erroff=E_NAME_USED_NOT_DEF2 - SRCS= $(COMOBJS:%.o=../common/%.c) -LINTSRCS= $(SRCS) -CLEANFILES += $(LINTOUTS) CLOBBERFILES += $(DYNLIB) ROOTDYNLIB= $(DYNLIB:%=$(ROOTLIBDIR)/%) diff --git a/usr/src/cmd/sgs/libldstab/Makefile.targ b/usr/src/cmd/sgs/libldstab/Makefile.targ index c9ba1b7467..490a987356 100644 --- a/usr/src/cmd/sgs/libldstab/Makefile.targ +++ b/usr/src/cmd/sgs/libldstab/Makefile.targ @@ -23,6 +23,7 @@ # Use is subject to license terms. # # Copyright 2016 RackTop Systems. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # pics/%.o: ../common/%.c @@ -33,8 +34,6 @@ pics/%64.o: ../common/%.c $(COMPILE.c) -o $@ -D_ELF64 $< $(POST_PROCESS_O) -lint: $(LINTOUT32) $(SGSLINTOUT) - delete: -$(RM) $(DYNLIB) diff --git a/usr/src/cmd/sgs/libldstab/amd64/Makefile b/usr/src/cmd/sgs/libldstab/amd64/Makefile index f8560e93bf..0d461c46b3 100644 --- a/usr/src/cmd/sgs/libldstab/amd64/Makefile +++ b/usr/src/cmd/sgs/libldstab/amd64/Makefile @@ -20,6 +20,7 @@ # # # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # DUPOBJS= stab64.o @@ -34,12 +35,9 @@ ROOTDYNLIB64= $(DYNLIB:%=$(ROOTLIBDIR)/%) CONVLIBDIR= $(CONVLIBDIR64) ELFLIBDIR= $(ELFLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) - all: $(DYNLIB) install \ package: all $(ROOTDYNLIB64) -lint: $(LINTOUT64) include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/libldstab/sparc/Makefile b/usr/src/cmd/sgs/libldstab/sparc/Makefile index 9c4889da43..3d4d2d8b79 100644 --- a/usr/src/cmd/sgs/libldstab/sparc/Makefile +++ b/usr/src/cmd/sgs/libldstab/sparc/Makefile @@ -20,6 +20,7 @@ # # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # DUPOBJS= stab64.o @@ -30,7 +31,6 @@ include ../Makefile.com all: $(DYNLIB) install: all $(ROOTDYNLIB) -lint: $(LINTOUT64) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/libldstab/sparcv9/Makefile b/usr/src/cmd/sgs/libldstab/sparcv9/Makefile index e0841a6ee6..93fef3421f 100644 --- a/usr/src/cmd/sgs/libldstab/sparcv9/Makefile +++ b/usr/src/cmd/sgs/libldstab/sparcv9/Makefile @@ -20,6 +20,7 @@ # # # Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # DUPOBJS= stab64.o @@ -34,12 +35,9 @@ ROOTDYNLIB64= $(DYNLIB:%=$(ROOTLIBDIR)/%) CONVLIBDIR= $(CONVLIBDIR64) ELFLIBDIR= $(ELFLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) - all: $(DYNLIB) install \ package: all $(ROOTDYNLIB64) -lint: $(LINTOUT64) include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/librtld/Makefile.com b/usr/src/cmd/sgs/librtld/Makefile.com index f196ac328a..3c397c933c 100644 --- a/usr/src/cmd/sgs/librtld/Makefile.com +++ b/usr/src/cmd/sgs/librtld/Makefile.com @@ -23,6 +23,8 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# LIBRARY= librtld.a VERS= .1 @@ -50,9 +52,6 @@ CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-uninitialized -LINTFLAGS += -u -erroff=E_NAME_DECL_NOT_USED_DEF2 -LINTFLAGS64 += -u -erroff=E_NAME_DECL_NOT_USED_DEF2 - BLTDEFS= msg.h BLTDATA= msg.c BLTMESG= $(SGSMSGDIR)/librtld @@ -64,11 +63,10 @@ SGSMSGALL= $(SGSMSGCOM) SGSMSGTARG= $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n librtld_msg -SRCS= ../common/llib-lrtld -LINTSRCS= $(MACHOBJS:%.o=%.c) $(COMOBJS:%.o=../common/%.c) \ +MSGSRCS= $(MACHOBJS:%.o=%.c) $(COMOBJS:%.o=../common/%.c) \ $(BLTDATA) -CLEANFILES += $(BLTFILES) $(LINTOUTS) -CLOBBERFILES += $(DYNLIB) $(LINTLIB) $(LIBLINKS) +CLEANFILES += $(BLTFILES) +CLOBBERFILES += $(DYNLIB) $(LIBLINKS) ROOTFS_DYNLIB= $(DYNLIB:%=$(ROOTFS_LIBDIR)/%) diff --git a/usr/src/cmd/sgs/librtld/Makefile.targ b/usr/src/cmd/sgs/librtld/Makefile.targ index 30e03221a5..7747934999 100644 --- a/usr/src/cmd/sgs/librtld/Makefile.targ +++ b/usr/src/cmd/sgs/librtld/Makefile.targ @@ -23,6 +23,7 @@ # Use is subject to license terms. # # Copyright 2016 RackTop Systems. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # pics/%.o: ../common/%.c @@ -58,8 +59,8 @@ include $(SRC)/cmd/sgs/Makefile.targ catalog: $(BLTMESG) -chkmsg: $(LINTSRCS) - sh $(CHKMSG) $(CHKMSGFLAGS) $(LINTSRCS) +chkmsg: $(MSGSRCS) + sh $(CHKMSG) $(CHKMSGFLAGS) $(MSGSRCS) $(BLTDEFS) + \ $(BLTDATA) + \ diff --git a/usr/src/cmd/sgs/librtld/amd64/Makefile b/usr/src/cmd/sgs/librtld/amd64/Makefile index b642bc3270..ad8c67f0db 100644 --- a/usr/src/cmd/sgs/librtld/amd64/Makefile +++ b/usr/src/cmd/sgs/librtld/amd64/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include $(SRC)/cmd/sgs/librtld/Makefile.com @@ -32,14 +33,10 @@ CPPFLAGS += -I../../../../uts/intel/amd64/krtld ROOTFS_DYNLIB64 = $(DYNLIB:%=$(ROOTFS_LIBDIR64)/%) $(ROOTFS_DYNLIB64) := FILEMODE=755 -LINTFLAGS64 += $(VAR_LINTFLAGS64) - all: $(DYNLIB) $(LIBLINKS) install: all $(ROOTFS_DYNLIB64) -lint: $(LINTLIB) $(LINTOUT64) $(SGSLINTOUT) - CPPFLAGS += -D_ELF64 diff --git a/usr/src/cmd/sgs/librtld/common/llib-lrtld b/usr/src/cmd/sgs/librtld/common/llib-lrtld deleted file mode 100644 index 23c19d48d1..0000000000 --- a/usr/src/cmd/sgs/librtld/common/llib-lrtld +++ /dev/null @@ -1,34 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -/* - * Copyright (c) 2000 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include "rtld.h" - -int rt_dldump(Rt_map *, const char *, int, Addr); diff --git a/usr/src/cmd/sgs/librtld/i386/Makefile b/usr/src/cmd/sgs/librtld/i386/Makefile index 546a8504fe..54e5e30586 100644 --- a/usr/src/cmd/sgs/librtld/i386/Makefile +++ b/usr/src/cmd/sgs/librtld/i386/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include $(SRC)/cmd/sgs/librtld/Makefile.com @@ -33,6 +34,4 @@ all: $(DYNLIB) $(LIBLINKS) install: all $(ROOTFS_DYNLIB) -lint: $(LINTLIB) $(LINTOUT32) $(SGSLINTOUT) - include $(SRC)/cmd/sgs/librtld/Makefile.targ diff --git a/usr/src/cmd/sgs/librtld/sparc/Makefile b/usr/src/cmd/sgs/librtld/sparc/Makefile index 33efa5334e..ac07f8b8c0 100644 --- a/usr/src/cmd/sgs/librtld/sparc/Makefile +++ b/usr/src/cmd/sgs/librtld/sparc/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include $(SRC)/cmd/sgs/librtld/Makefile.com @@ -33,6 +34,4 @@ all: $(DYNLIB) $(LIBLINKS) install: all $(ROOTFS_DYNLIB) -lint: $(LINTLIB) $(LINTOUT32) $(SGSLINTOUT) - include $(SRC)/cmd/sgs/librtld/Makefile.targ diff --git a/usr/src/cmd/sgs/librtld/sparcv9/Makefile b/usr/src/cmd/sgs/librtld/sparcv9/Makefile index 0fdca1ad1f..00a9c3ca48 100644 --- a/usr/src/cmd/sgs/librtld/sparcv9/Makefile +++ b/usr/src/cmd/sgs/librtld/sparcv9/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include $(SRC)/cmd/sgs/librtld/Makefile.com @@ -32,14 +33,10 @@ CPPFLAGS += -I../../../../uts/sparc/krtld ROOTFS_DYNLIB64 = $(DYNLIB:%=$(ROOTFS_LIBDIR64)/%) $(ROOTFS_DYNLIB64) := FILEMODE=755 -LINTFLAGS64 += $(VAR_LINTFLAGS64) - all: $(DYNLIB) $(LIBLINKS) install: all $(ROOTFS_DYNLIB64) -lint: $(LINTLIB) $(LINTOUT64) $(SGSLINTOUT) - CPPFLAGS += -D_ELF64 diff --git a/usr/src/cmd/sgs/librtld_db/Makefile.com b/usr/src/cmd/sgs/librtld_db/Makefile.com index 955f3e21d8..46f35529b2 100644 --- a/usr/src/cmd/sgs/librtld_db/Makefile.com +++ b/usr/src/cmd/sgs/librtld_db/Makefile.com @@ -20,6 +20,7 @@ # # # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # LIBRARY= librtld_db.a @@ -39,9 +40,6 @@ CPPFLAGS += -I$(SRCBASE)/lib/libc/inc DYNFLAGS += $(VERSREF) LDLIBS += $(CONVLIBDIR) $(CONV_LIB) -lc -LINTFLAGS += -u -erroff=E_NAME_DECL_NOT_USED_DEF2 -LINTFLAGS64 += -u -erroff=E_NAME_DECL_NOT_USED_DEF2 - CERRWARN += -_gcc=-Wno-uninitialized BLTDEFS= msg.h @@ -56,18 +54,15 @@ SGSMSGTARG= $(SGSMSGCOM) SGSMSGALL= $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -SRCS= ../common/llib-lrtld_db -LINTSRCS= $(COMOBJS:%.o=../common/%.c) $(PLTSRCS) $(BLTDATA) +MSGSRCS= $(COMOBJS:%.o=../common/%.c) $(PLTSRCS) $(BLTDATA) -CLEANFILES += $(BLTFILES) $(LINTOUTS) -CLOBBERFILES += $(DYNLIB) $(LINTLIB) +CLEANFILES += $(BLTFILES) +CLOBBERFILES += $(DYNLIB) ROOTFS_DYNLIB= $(DYNLIB:%=$(ROOTFS_LIBDIR)/%) -ROOTFS_LINTLIB= $(LINTLIB:%=$(ROOTFS_LIBDIR)/%) ROOTFS_LINKS= $(ROOTFS_LIBDIR)/$(LIBLINKS) ROOTFS_DYNLIB64= $(DYNLIB:%=$(ROOTFS_LIBDIR64)/%) -ROOTFS_LINTLIB64= $(LINTLIB:%=$(ROOTFS_LIBDIR64)/%) ROOTFS_LINKS64= $(ROOTFS_LIBDIR64)/$(LIBLINKS) $(ROOTFS_DYNLIB) := FILEMODE= 755 diff --git a/usr/src/cmd/sgs/librtld_db/Makefile.targ b/usr/src/cmd/sgs/librtld_db/Makefile.targ index 6a0c50d153..ca9d16cb03 100644 --- a/usr/src/cmd/sgs/librtld_db/Makefile.targ +++ b/usr/src/cmd/sgs/librtld_db/Makefile.targ @@ -20,6 +20,7 @@ # # # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # pics/%.o: ../common/%.c @@ -36,9 +37,6 @@ pics/%64.o: ../common/%.c $(COMPILE.c) -D_ELF64 $(PICFLAGS) -o $@ $< $(POST_PROCESS_O) -$(ROOTFS_LIBDIR)/$(LINTLIBSRC): ../common/$(LINTLIBSRC) - $(INS.file) ../common/$(LINTLIBSRC) - delete: -$(RM) $(DYNLIB) @@ -49,8 +47,8 @@ include $(SRC)/cmd/sgs/Makefile.targ catalog: -chkmsg: $(LINTSRCS) - sh $(CHKMSG) $(CHKMSGFLAGS) $(LINTSRCS) +chkmsg: $(MSGSRCS) + sh $(CHKMSG) $(CHKMSGFLAGS) $(MSGSRCS) $(BLTDEFS) + \ $(BLTDATA): $(SGSMSGTARG) diff --git a/usr/src/cmd/sgs/librtld_db/amd64/Makefile b/usr/src/cmd/sgs/librtld_db/amd64/Makefile index 21fbeff150..705c6ef07a 100644 --- a/usr/src/cmd/sgs/librtld_db/amd64/Makefile +++ b/usr/src/cmd/sgs/librtld_db/amd64/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # COMOBJS64 = rd_elf64.o @@ -31,23 +32,19 @@ include ../Makefile.com SGSMSGTARG += $(SGSMSGINTEL) -LINTFLAGS64 += $(VAR_LINTFLAGS64) CPPFLAGS += -D_SYSCALL32 CONVLIBDIR = $(CONVLIBDIR64) .KEEP_STATE: -all: $(DYNLIB) $(LINTLIB) +all: $(DYNLIB) -install: all $(ROOTFS_DYNLIB64) $(ROOTFS_LINKS64) \ - $(ROOTFS_LIBDIR64)/$(LINTLIB) +install: all $(ROOTFS_DYNLIB64) $(ROOTFS_LINKS64) pics/plt32_resolution.o: ../i386/plt32_resolution.c $(COMPILE.c) -D_ELF32 $(PICFLAGS) -o $@ \ ../i386/plt32_resolution.c $(POST_PROCESS_O) -lint: $(LINTLIB) $(LINTOUT32) $(LINTOUT64) $(SGSLINTOUT) - include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/librtld_db/common/llib-lrtld_db b/usr/src/cmd/sgs/librtld_db/common/llib-lrtld_db deleted file mode 100644 index 15bf89cbec..0000000000 --- a/usr/src/cmd/sgs/librtld_db/common/llib-lrtld_db +++ /dev/null @@ -1,49 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -/* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <rtld_db.h> - - -void rd_delete(rd_agent_t *); -char * rd_errstr(rd_err_e rderr); -rd_err_e rd_event_addr(rd_agent_t *, rd_event_e, rd_notify_t *); -rd_err_e rd_event_enable(rd_agent_t *, int); -rd_err_e rd_event_getmsg(rd_agent_t *, rd_event_msg_t *); -rd_err_e rd_init(int); -rd_err_e rd_ctl(int, void *); -rd_err_e rd_loadobj_iter(rd_agent_t *, rl_iter_f *, - void *); -void rd_log(const int); -rd_agent_t * rd_new(struct ps_prochandle *); -rd_err_e rd_objpad_enable(struct rd_agent *, size_t); -rd_err_e rd_plt_resolution(rd_agent_t *, psaddr_t, lwpid_t, - psaddr_t, rd_plt_info_t *); -rd_err_e rd_get_dyns(rd_agent_t *, psaddr_t, void **, size_t *); -rd_err_e rd_reset(struct rd_agent *); diff --git a/usr/src/cmd/sgs/librtld_db/demo/Makefile b/usr/src/cmd/sgs/librtld_db/demo/Makefile index 3bacfe5125..abb486b6b7 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/Makefile +++ b/usr/src/cmd/sgs/librtld_db/demo/Makefile @@ -19,6 +19,8 @@ # CDDL HEADER END # # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include $(SRC)/Makefile.master @@ -90,7 +92,7 @@ CLEANFILES= *.demo */*.demo .KEEP_STATE: .PARALLEL: $(ROOTDEMOFILES) -all catalog chkmsg lint: +all catalog chkmsg: install: $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) diff --git a/usr/src/cmd/sgs/librtld_db/demo/Makefile.com b/usr/src/cmd/sgs/librtld_db/demo/Makefile.com index 0269de8a45..5b5b663b9e 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/Makefile.com +++ b/usr/src/cmd/sgs/librtld_db/demo/Makefile.com @@ -19,11 +19,13 @@ # CDDL HEADER END # # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= rdb # DEMO DELETE START -include ../../../../Makefile.cmd +include ../../../../Makefile.cmd # DEMO DELETE END MACH:sh= uname -p @@ -56,16 +58,6 @@ LDLIBS += -lrtld_db -lelf -ll -ly CLEANFILES += $(BLTSRC) $(BLTHDR) simp libsub.so.1 # DEMO DELETE START -# The following lint error suppression definitions are to remove lex errors -# we have no control over. -LINTERRS = -erroff=E_NAME_DEF_NOT_USED2 \ - -erroff=E_FUNC_RET_ALWAYS_IGNOR2 \ - -erroff=E_FUNC_RET_MAYBE_IGNORED2 \ - -erroff=E_BLOCK_DECL_UNUSED \ - -erroff=E_EQUALITY_NOT_ASSIGNMENT -LINTFLAGS += $(LDLIBS) -L../../$(MACH) $(LINTERRS) -LINTFLAGS64 += $(LDLIBS) -L../../$(MACH) $(LINTERRS) -CLEANFILES += $(LINTOUT) CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-label @@ -73,7 +65,7 @@ CERRWARN += -_gcc=-Wno-unused-variable # DEMO DELETE END test-sparc= test-sparc-regs -test-i386= +test-i386= TESTS= test-maps test-breaks test-steps test-plt_skip \ test-object-padding $(test-$(MACH)) diff --git a/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ b/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ index 308cf4b4fb..4d2a3b0303 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ +++ b/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ @@ -19,6 +19,8 @@ # CDDL HEADER END # # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# $(OBJDIR)/%.o: %.c $(COMPILE.c) $< -o $@ @@ -94,8 +96,5 @@ FRC: # DEMO DELETE START -$(LINTOUT): $(SRCS) - $(LINT.c) $(SRCS) > lint.out 2>&1 - include $(SRC)/cmd/sgs/Makefile.targ # DEMO DELETE END diff --git a/usr/src/cmd/sgs/librtld_db/demo/amd64/Makefile b/usr/src/cmd/sgs/librtld_db/demo/amd64/Makefile index 2fc47c2480..7cabf2ea7b 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/amd64/Makefile +++ b/usr/src/cmd/sgs/librtld_db/demo/amd64/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -48,8 +49,6 @@ test: $(TESTS) DEMOCFLAGS= install: all $(ROOTONLDBINPROG64) - -lint: $(LINTOUT) # DEMO DELETE END include ../Makefile.targ diff --git a/usr/src/cmd/sgs/librtld_db/demo/i386/Makefile b/usr/src/cmd/sgs/librtld_db/demo/i386/Makefile index d74a4ab742..da1bcc7f0e 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/i386/Makefile +++ b/usr/src/cmd/sgs/librtld_db/demo/i386/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -33,8 +34,6 @@ test: $(TESTS) # DEMO DELETE START install: all $(ROOTONLDBINPROG) - -lint: $(LINTOUT) # DEMO DELETE END include ../Makefile.targ diff --git a/usr/src/cmd/sgs/librtld_db/demo/sparc/Makefile b/usr/src/cmd/sgs/librtld_db/demo/sparc/Makefile index d74a4ab742..da1bcc7f0e 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/sparc/Makefile +++ b/usr/src/cmd/sgs/librtld_db/demo/sparc/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -33,8 +34,6 @@ test: $(TESTS) # DEMO DELETE START install: all $(ROOTONLDBINPROG) - -lint: $(LINTOUT) # DEMO DELETE END include ../Makefile.targ diff --git a/usr/src/cmd/sgs/librtld_db/demo/sparcv9/Makefile b/usr/src/cmd/sgs/librtld_db/demo/sparcv9/Makefile index d189c38978..bfb094260f 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/sparcv9/Makefile +++ b/usr/src/cmd/sgs/librtld_db/demo/sparcv9/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -48,8 +49,6 @@ test: $(TESTS) DEMOCFLAGS= install: all $(ROOTONLDBINPROG64) - -lint: $(LINTOUT) # DEMO DELETE END include ../Makefile.targ diff --git a/usr/src/cmd/sgs/librtld_db/i386/Makefile b/usr/src/cmd/sgs/librtld_db/i386/Makefile index 86efe4257f..ff610a1129 100644 --- a/usr/src/cmd/sgs/librtld_db/i386/Makefile +++ b/usr/src/cmd/sgs/librtld_db/i386/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # PLTOBJS = plt32_resolution.o @@ -35,11 +35,8 @@ SGSMSGTARG += $(SGSMSGINTEL) .KEEP_STATE: -all: $(DYNLIB) $(LINTLIB) +all: $(DYNLIB) -install: all $(ROOTFS_DYNLIB) $(ROOTFS_LINKS) \ - $(ROOTFS_LIBDIR)/$(LINTLIB) $(ROOTFS_LIBDIR)/$(LINTLIBSRC) - -lint: $(LINTLIB) $(LINTOUT32) $(SGSLINTOUT) +install: all $(ROOTFS_DYNLIB) $(ROOTFS_LINKS) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/librtld_db/sparc/Makefile b/usr/src/cmd/sgs/librtld_db/sparc/Makefile index a9d2dde2a3..36c1b54df5 100644 --- a/usr/src/cmd/sgs/librtld_db/sparc/Makefile +++ b/usr/src/cmd/sgs/librtld_db/sparc/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # PLTOBJS = plt32_resolution.o @@ -33,11 +33,8 @@ include ../Makefile.com .KEEP_STATE: -all: $(DYNLIB) $(LINTLIB) +all: $(DYNLIB) -install: all $(ROOTFS_DYNLIB) $(ROOTFS_LINKS) \ - $(ROOTFS_LIBDIR)/$(LINTLIB) $(ROOTFS_LIBDIR)/$(LINTLIBSRC) - -lint: $(LINTLIB) $(LINTOUT32) $(SGSLINTOUT) +install: all $(ROOTFS_DYNLIB) $(ROOTFS_LINKS) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/librtld_db/sparcv9/Makefile b/usr/src/cmd/sgs/librtld_db/sparcv9/Makefile index cb2fb3b6d1..29be0d82b3 100644 --- a/usr/src/cmd/sgs/librtld_db/sparcv9/Makefile +++ b/usr/src/cmd/sgs/librtld_db/sparcv9/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # COMOBJS64 = rd_elf64.o @@ -31,23 +32,19 @@ include ../Makefile.com SGSMSGTARG += $(SGSMSGSPARCV9) -LINTFLAGS64 += $(VAR_LINTFLAGS64) CPPFLAGS += -D_SYSCALL32 CONVLIBDIR = $(CONVLIBDIR64) .KEEP_STATE: -all: $(DYNLIB) $(LINTLIB) +all: $(DYNLIB) -install: all $(ROOTFS_DYNLIB64) $(ROOTFS_LINKS64) \ - $(ROOTFS_LIBDIR64)/$(LINTLIB) +install: all $(ROOTFS_DYNLIB64) $(ROOTFS_LINKS64) pics/plt32_resolution.o: ../sparc/plt32_resolution.c $(COMPILE.c) -D_ELF32 $(PICFLAGS) -o $@ \ ../sparc/plt32_resolution.c $(POST_PROCESS_O) -lint: $(LINTLIB) $(LINTOUT32) $(LINTOUT64) $(SGSLINTOUT) - include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/link_audit/Makefile b/usr/src/cmd/sgs/link_audit/Makefile index 7239f056fd..6001b17733 100644 --- a/usr/src/cmd/sgs/link_audit/Makefile +++ b/usr/src/cmd/sgs/link_audit/Makefile @@ -21,6 +21,8 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# include ../../../Makefile.master @@ -67,13 +69,12 @@ install:= TARGET= install package:= TARGET= package clean:= TARGET= clean clobber:= TARGET= clobber -lint:= TARGET= lint .PARALLEL: $(ROOTDEMOFILES) .KEEP_STATE: -all clean clobber lint : \ +all clean clobber: \ $(SUBDIRS) package install : \ diff --git a/usr/src/cmd/sgs/link_audit/Makefile.com b/usr/src/cmd/sgs/link_audit/Makefile.com index b5de5f5be8..d02c71dc4f 100644 --- a/usr/src/cmd/sgs/link_audit/Makefile.com +++ b/usr/src/cmd/sgs/link_audit/Makefile.com @@ -21,6 +21,7 @@ # # Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../../../../lib/Makefile.lib @@ -49,7 +50,7 @@ ONLIBS= $(SYMBINDREP) $(PERFLIB) $(BINDLIB) USRSCRIPTS= sotruss whocalls CCSLIBS= $(TRUSSLIB) $(WHOLIB) - + PICDIR= pics OBJDIR= objs @@ -93,10 +94,7 @@ CPPFLAGS += -D_REENTRANT LDFLAGS += $(CC_USE_PROTO) DYNFLAGS += $(VERSREF) -LINTFLAGS += -uaxs $(LDLIBS) -LINTFLAGS64 += -uaxs $(LDLIBS) - -CLEANFILES += $(LINTOUT) $(OBJDIR)/* $(PICDIR)/* +CLEANFILES += $(OBJDIR)/* $(PICDIR)/* CLOBBERFILES += $(ONSCRIPTS) $(ONPROGS) $(ONLIBS) $(CCSLIBS) $(USRSCRIPTS) ROOTONLDLIB= $(ROOT)/opt/SUNWonld/lib diff --git a/usr/src/cmd/sgs/link_audit/Makefile.targ b/usr/src/cmd/sgs/link_audit/Makefile.targ index 42dff453be..cb6c0443c3 100644 --- a/usr/src/cmd/sgs/link_audit/Makefile.targ +++ b/usr/src/cmd/sgs/link_audit/Makefile.targ @@ -23,6 +23,7 @@ # Use is subject to license terms. # # Copyright 2015 RackTop Systems. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # %: ../common/%.ksh @@ -94,32 +95,4 @@ $(ROOTCCSLIB): $(ROOTCCSLIB64): $(INS.dir) -LINT_HDR= perl ../../tools/lint_hdr.pl - -lint: - $(LINT_HDR) link_audit > $(LINTOUT) - $(LINT_HDR) -s truss.so.1 >> $(LINTOUT) - $(LINT.c) ../common/truss.c \ - ../common/env.c 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s symbindrep.so.1 >> $(LINTOUT) - $(LINT.c) ../common/symbindrep.c \ - ../common/env.c 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s perfcnt.so.1 >> $(LINTOUT) - $(LINT.c) ../common/perfcnt.c \ - ../common/hash.c \ - ../common/env.c 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s who.so.1 >> $(LINTOUT) - $(LINT.c) ../common/who.c \ - ../common/env.c 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s dumpbind >> $(LINTOUT) - $(LINT.c) ../common/dumpbind.c 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s bindings.so.1 >> $(LINTOUT) - $(LINT.c) ../common/bindings.c \ - ../common/env.c 2>&1 | tee -a $(LINTOUT) - include ../../../../lib/Makefile.targ diff --git a/usr/src/cmd/sgs/link_audit/amd64/Makefile b/usr/src/cmd/sgs/link_audit/amd64/Makefile index 2a7a9950c4..078a97e8f8 100644 --- a/usr/src/cmd/sgs/link_audit/amd64/Makefile +++ b/usr/src/cmd/sgs/link_audit/amd64/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -31,13 +31,9 @@ include ../Makefile.com CONVLIBDIR = $(CONVLIBDIR64) ELFLIBDIR = $(ELFLIBDIR64) -lint := CONV_LIB = $(CONV_LIB64) - $(ONLIBS) \ $(CCSLIBS) := CFLAGS64 += $(C_PICFLAGS64) $(NO_ASM_WARN) -LINTFLAGS64 += $(VAR_LINTFLAGS64) - .KEEP_STATE: all: $(PICDIR) .WAIT $(CCSLIBS) $(CCSSCRIPTS) \ diff --git a/usr/src/cmd/sgs/link_audit/i386/Makefile b/usr/src/cmd/sgs/link_audit/i386/Makefile index 107de46013..1e5c56bce7 100644 --- a/usr/src/cmd/sgs/link_audit/i386/Makefile +++ b/usr/src/cmd/sgs/link_audit/i386/Makefile @@ -23,13 +23,11 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com -lint := CONV_LIB = $(CONV_LIB32) - $(ONLIBS) \ $(CCSLIBS) := CFLAGS += $(C_PICFLAGS) $(NO_ASM_WARN) diff --git a/usr/src/cmd/sgs/link_audit/sparc/Makefile b/usr/src/cmd/sgs/link_audit/sparc/Makefile index 107de46013..1e5c56bce7 100644 --- a/usr/src/cmd/sgs/link_audit/sparc/Makefile +++ b/usr/src/cmd/sgs/link_audit/sparc/Makefile @@ -23,13 +23,11 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com -lint := CONV_LIB = $(CONV_LIB32) - $(ONLIBS) \ $(CCSLIBS) := CFLAGS += $(C_PICFLAGS) $(NO_ASM_WARN) diff --git a/usr/src/cmd/sgs/link_audit/sparcv9/Makefile b/usr/src/cmd/sgs/link_audit/sparcv9/Makefile index 2a7a9950c4..078a97e8f8 100644 --- a/usr/src/cmd/sgs/link_audit/sparcv9/Makefile +++ b/usr/src/cmd/sgs/link_audit/sparcv9/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -31,13 +31,9 @@ include ../Makefile.com CONVLIBDIR = $(CONVLIBDIR64) ELFLIBDIR = $(ELFLIBDIR64) -lint := CONV_LIB = $(CONV_LIB64) - $(ONLIBS) \ $(CCSLIBS) := CFLAGS64 += $(C_PICFLAGS64) $(NO_ASM_WARN) -LINTFLAGS64 += $(VAR_LINTFLAGS64) - .KEEP_STATE: all: $(PICDIR) .WAIT $(CCSLIBS) $(CCSSCRIPTS) \ diff --git a/usr/src/cmd/sgs/lorder/Makefile b/usr/src/cmd/sgs/lorder/Makefile index f50cab7252..e239506614 100644 --- a/usr/src/cmd/sgs/lorder/Makefile +++ b/usr/src/cmd/sgs/lorder/Makefile @@ -22,16 +22,14 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" -# -# cmd/sgs/lorder/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # PROG= lorder SRCS= $(PROG:%=%.sh) -include $(SRC)/cmd/Makefile.cmd +include $(SRC)/cmd/Makefile.cmd include $(SRC)/cmd/sgs/Makefile.com .KEEP_STATE: @@ -42,6 +40,4 @@ install: all $(VAR_SGSBINPROG) $(VAR_SGSCCSLINK) clean: -lint: - include ../../Makefile.targ diff --git a/usr/src/cmd/sgs/m4/Makefile b/usr/src/cmd/sgs/m4/Makefile index 20ee889f2f..f0e6bb040a 100644 --- a/usr/src/cmd/sgs/m4/Makefile +++ b/usr/src/cmd/sgs/m4/Makefile @@ -19,13 +19,10 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1995 by Sun Microsystems, Inc. # All Rights Reserved. # -# cmd/sgs/m4/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../../../Makefile.master @@ -38,7 +35,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint # for messaging catalog # @@ -47,11 +43,11 @@ POFILE= m4.po .KEEP_STATE: -all clean clobber install lint: $(SUBDIRS) +all clean clobber install: $(SUBDIRS) catalog: $(POFILE) -$(POFILE): +$(POFILE): $(RM) $@ $(XGETTEXT) $(XGETFLAGS) $(CSRC) sed "/^domain/d" < messages.po > $@ diff --git a/usr/src/cmd/sgs/m4/i386/Makefile b/usr/src/cmd/sgs/m4/i386/Makefile index a3e69b92bb..1fe2b9b882 100644 --- a/usr/src/cmd/sgs/m4/i386/Makefile +++ b/usr/src/cmd/sgs/m4/i386/Makefile @@ -22,11 +22,13 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= m4 XPG4PROG= m4 -include ../../../Makefile.cmd +include ../../../Makefile.cmd include ../../../sgs/Makefile.var COBJS= m4.o m4ext.o m4macs.o @@ -56,8 +58,7 @@ CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-uninitialized -LINTFLAGS += $(LDLIBS) -CLEANFILES += $(LINTOUT) $(BLTSRCS) +CLEANFILES += $(BLTSRCS) m4objs.xpg4/%.o := CPPFLAGS += -DXPG4 @@ -88,16 +89,4 @@ install: all $(VAR_SGSBINPROG) $(ROOTXPG4PROG) $(VAR_SGSCCSLINK) clean: $(RM) $(ALLOBJS) $(CLEANFILES) -lint: $(LINTOUT) - -LINT_HDR= perl ../../tools/lint_hdr.pl - -$(LINTOUT): $(SRCS) - $(LINT_HDR) $(PROG) > $(LINTOUT) - $(LINT_HDR) -s m4 >> $(LINTOUT) - $(LINT.c) $(YSRCS) 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s "XPG m4" >> $(LINTOUT) - $(LINT.c) $(XPG4SRCS) 2>&1 | tee -a $(LINTOUT) - include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/m4/sparc/Makefile b/usr/src/cmd/sgs/m4/sparc/Makefile index dea00a256f..4581269a08 100644 --- a/usr/src/cmd/sgs/m4/sparc/Makefile +++ b/usr/src/cmd/sgs/m4/sparc/Makefile @@ -22,13 +22,13 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/m4/sparc/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # PROG= m4 XPG4PROG= m4 -include ../../../Makefile.cmd +include ../../../Makefile.cmd include ../../../sgs/Makefile.var COBJS= m4.o m4ext.o m4macs.o @@ -57,8 +57,7 @@ CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-uninitialized CSTD= $(CSTD_GNU99) -LINTFLAGS += $(LDLIBS) -CLEANFILES += $(LINTOUT) $(BLTSRCS) +CLEANFILES += $(BLTSRCS) m4objs.xpg4/%.o := CPPFLAGS += -DXPG4 @@ -88,16 +87,4 @@ install: all $(VAR_SGSBINPROG) $(ROOTXPG4PROG) $(VAR_SGSCCSLINK) clean: $(RM) $(ALLOBJS) $(CLEANFILES) -lint: $(LINTOUT) - -LINT_HDR= perl ../../tools/lint_hdr.pl - -$(LINTOUT): $(SRCS) - $(LINT_HDR) $(PROG) > $(LINTOUT) - $(LINT_HDR) -s m4 >> $(LINTOUT) - $(LINT.c) $(YSRCS) 2>&1 | tee -a $(LINTOUT) - - $(LINT_HDR) -s "XPG m4" >> $(LINTOUT) - $(LINT.c) $(XPG4SRCS) 2>&1 | tee -a $(LINTOUT) - include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/mcs/Makefile.com b/usr/src/cmd/sgs/mcs/Makefile.com index 137286fc6c..6970c04bd0 100644 --- a/usr/src/cmd/sgs/mcs/Makefile.com +++ b/usr/src/cmd/sgs/mcs/Makefile.com @@ -23,6 +23,8 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= mcs STRIPFILE= strip @@ -46,13 +48,9 @@ LLDFLAGS64 = '-R$$ORIGIN/../../../lib/$(MACH64)' LDFLAGS += $(VERSREF) $(LLDFLAGS) LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf -LINTFLAGS += -x -LINTFLAGS64 += -x - CERRWARN += -_gcc=-Wno-uninitialized SRCS = $(COMOBJS:%.o=../common/%.c) \ $(TOOLSOBJS:%.o=$(SGSTOOLS)/common/%.c) -LINTSRCS = $(SRCS) ../common/lintsup.c -CLEANFILES += $(OBJS) $(LINTOUTS) +CLEANFILES += $(OBJS) diff --git a/usr/src/cmd/sgs/mcs/Makefile.targ b/usr/src/cmd/sgs/mcs/Makefile.targ index 7890e5f22e..e35d939011 100644 --- a/usr/src/cmd/sgs/mcs/Makefile.targ +++ b/usr/src/cmd/sgs/mcs/Makefile.targ @@ -23,6 +23,8 @@ # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# ROOTSTRIPFILEPROG= $(STRIPFILE:%=$(ROOTCCSBIN)/%) ROOTSTRIPFILEPROG64= $(STRIPFILE:%=$(ROOTCCSBIN64)/%) @@ -43,8 +45,6 @@ clean: delete: $(RM) $(PROG) -lint: $(LINTOUT32) $(SGSLINTOUT) - $(PROG): $(OBJS) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/sgs/mcs/amd64/Makefile b/usr/src/cmd/sgs/mcs/amd64/Makefile index 5b40ec0893..9b126f24b4 100644 --- a/usr/src/cmd/sgs/mcs/amd64/Makefile +++ b/usr/src/cmd/sgs/mcs/amd64/Makefile @@ -22,7 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -34,8 +34,6 @@ LLDFLAGS= $(LLDFLAGS64) CONVLIBDIR= $(CONVLIBDIR64) ELFLIBDIR= $(ELFLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) - ROOTLINKS= $(VAR_SGSBIN64)/$(STRIPFILE) VAR_SGSBINPROG= $(VAR_SGSBINPROG64) diff --git a/usr/src/cmd/sgs/mcs/common/lintsup.c b/usr/src/cmd/sgs/mcs/common/lintsup.c deleted file mode 100644 index 9b3ee2ee3a..0000000000 --- a/usr/src/cmd/sgs/mcs/common/lintsup.c +++ /dev/null @@ -1,46 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Supplimental Pseudo-code to get lint to consider these symbols used. - */ - -#include "alist.h" - -#pragma error_messages(off, E_STATIC_UNUSED) - -static void -foo() -{ - (void) alist_append(NULL, NULL, 0, 0); - alist_delete_by_offset(NULL, NULL); - (void) alist_insert_by_offset(NULL, NULL, 0, 0, 0); - alist_reset(NULL); - - (void) aplist_delete_value(NULL, NULL); - aplist_reset(NULL); - (void) aplist_test(NULL, NULL, 0); -} diff --git a/usr/src/cmd/sgs/mcs/sparcv9/Makefile b/usr/src/cmd/sgs/mcs/sparcv9/Makefile index 29d44b58f0..da83cb1b5a 100644 --- a/usr/src/cmd/sgs/mcs/sparcv9/Makefile +++ b/usr/src/cmd/sgs/mcs/sparcv9/Makefile @@ -22,7 +22,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -34,8 +34,6 @@ LLDFLAGS= $(LLDFLAGS64) CONVLIBDIR= $(CONVLIBDIR64) ELFLIBDIR= $(ELFLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) - ROOTLINKS= $(VAR_SGSBIN64)/$(STRIPFILE) VAR_SGSBINPROG= $(VAR_SGSBINPROG64) diff --git a/usr/src/cmd/sgs/messages/Makefile.targ b/usr/src/cmd/sgs/messages/Makefile.targ index 766888669b..a2633771ba 100644 --- a/usr/src/cmd/sgs/messages/Makefile.targ +++ b/usr/src/cmd/sgs/messages/Makefile.targ @@ -22,7 +22,8 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/messages/Makefile.targ +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# all: $(POFILE) @@ -36,7 +37,7 @@ $(MSGDOMAIN)/$(POFILE): \ $(RM) $(MSGDOMAIN)/$(POFILE) cp $(POFILE) $(MSGDOMAIN) -delete lint: +delete: clean: $(RM) $(CLEANFILES) diff --git a/usr/src/cmd/sgs/moe/Makefile.com b/usr/src/cmd/sgs/moe/Makefile.com index db2c0c4f0c..a752ef2b90 100644 --- a/usr/src/cmd/sgs/moe/Makefile.com +++ b/usr/src/cmd/sgs/moe/Makefile.com @@ -23,6 +23,8 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= moe @@ -40,9 +42,6 @@ MAPOPT= $(MAPFILE:%=-M%) LDFLAGS += -Wl,$(VERSREF) $(CC_USE_PROTO) $(MAPOPT) LDLIBS += $(CONVLIBDIR) $(CONV_LIB) -LINTFLAGS += -x -LINTFLAGS64 += -x - BLTDEFS= msg.h BLTDATA= msg.c BLTMESG= $(SGSMSGDIR)/moe @@ -55,6 +54,5 @@ SGSMSGALL= $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n moe_msg SRCS= $(COMOBJ:%.o=../common/%.c) $(BLTDATA) -LINTSRCS= $(SRCS) ../common/lintsup.c -CLEANFILES += $(LINTOUTS) $(BLTFILES) +CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/moe/Makefile.targ b/usr/src/cmd/sgs/moe/Makefile.targ index 8b535f8063..8bb3f79da5 100644 --- a/usr/src/cmd/sgs/moe/Makefile.targ +++ b/usr/src/cmd/sgs/moe/Makefile.targ @@ -23,7 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # %.o: ../common/%.c @@ -48,8 +48,6 @@ delete: install \ package: all $(ROOTPROG) -lint: $(LINTOUT32) $(SGSLINTOUT) - include $(SRC)/cmd/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ diff --git a/usr/src/cmd/sgs/moe/amd64/Makefile b/usr/src/cmd/sgs/moe/amd64/Makefile index a81a9f0dbe..e82f40a747 100644 --- a/usr/src/cmd/sgs/moe/amd64/Makefile +++ b/usr/src/cmd/sgs/moe/amd64/Makefile @@ -23,7 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -32,7 +32,6 @@ include ../Makefile.com LLDFLAGS = $(LLDFLAGS64) CONVLIBDIR = $(CONVLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) ROOTPROG= $(ROOTPROG64) diff --git a/usr/src/cmd/sgs/moe/common/lintsup.c b/usr/src/cmd/sgs/moe/common/lintsup.c deleted file mode 100644 index e342139042..0000000000 --- a/usr/src/cmd/sgs/moe/common/lintsup.c +++ /dev/null @@ -1,39 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Supplimental Pseudo-code to get lint to consider these symbols used. - */ - -#include "msg.h" - -#pragma error_messages(off, E_STATIC_UNUSED) - -static void -foo() -{ - (void) _moe_msg((Msg)&__moe_msg[0]); -} diff --git a/usr/src/cmd/sgs/moe/sparcv9/Makefile b/usr/src/cmd/sgs/moe/sparcv9/Makefile index a81a9f0dbe..e82f40a747 100644 --- a/usr/src/cmd/sgs/moe/sparcv9/Makefile +++ b/usr/src/cmd/sgs/moe/sparcv9/Makefile @@ -23,7 +23,7 @@ # Copyright 2004 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -32,7 +32,6 @@ include ../Makefile.com LLDFLAGS = $(LLDFLAGS64) CONVLIBDIR = $(CONVLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) ROOTPROG= $(ROOTPROG64) diff --git a/usr/src/cmd/sgs/nm/Makefile b/usr/src/cmd/sgs/nm/Makefile index 4a608fba94..2421e3cb80 100644 --- a/usr/src/cmd/sgs/nm/Makefile +++ b/usr/src/cmd/sgs/nm/Makefile @@ -19,13 +19,10 @@ # # CDDL HEADER END # -# -#pragma ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1995-1999 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/sgs/nm/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../../../Makefile.master @@ -38,7 +35,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint package := TARGET= package # for messaging catalog @@ -47,7 +43,7 @@ POFILE= nm.po .KEEP_STATE: -all clean clobber install lint package: $(SUBDIRS) +all clean clobber install package: $(SUBDIRS) catalog: $(POFILE) diff --git a/usr/src/cmd/sgs/nm/amd64/Makefile b/usr/src/cmd/sgs/nm/amd64/Makefile index d5957d006d..0b9d1b6992 100644 --- a/usr/src/cmd/sgs/nm/amd64/Makefile +++ b/usr/src/cmd/sgs/nm/amd64/Makefile @@ -23,13 +23,15 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= nm ARFORMAT= PORTAR -include ../../../Makefile.cmd -include ../../Makefile.com +include ../../../Makefile.cmd +include ../../Makefile.com COMOBJS= nm.o @@ -47,10 +49,6 @@ CERRWARN += -_gcc=-Wno-uninitialized SMOFF += precedence,indenting LDLIBS += $(CONVLIBDIR64) $(CONV_LIB) $(ELFLIBDIR) -lelf -LINTFLAGS64 += -x $(LDLIBS) -m64 -LINTSRCS= $(SRCS) -CLEANFILES += $(LINTOUTS) - %.o: ../common/%.c $(COMPILE.c) $< @@ -72,9 +70,6 @@ install: all $(VAR_SGSBINPROG64) $(VAR_SGSCCSLINK64) clean: $(RM) $(OBJS) $(CLEANFILES) -lint: $(LINTOUT64) $(SGSLINTOUT) - - include ../../Makefile.targ include ../../../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/nm/i386/Makefile b/usr/src/cmd/sgs/nm/i386/Makefile index 52920c1515..c7d5bf8b0b 100644 --- a/usr/src/cmd/sgs/nm/i386/Makefile +++ b/usr/src/cmd/sgs/nm/i386/Makefile @@ -22,14 +22,16 @@ # Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= nm XPG4PROG= nm ARFORMAT= PORTAR -include ../../../Makefile.cmd -include ../../Makefile.com +include ../../../Makefile.cmd +include ../../Makefile.com COMOBJS= nm.o @@ -49,9 +51,6 @@ CERRWARN += -_gcc=-Wno-uninitialized SMOFF += precedence,indenting LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf -LINTFLAGS += -x $(LDLIBS) -LINTSRCS= $(SRCS) -CLEANFILES += $(LINTOUTS) objs.xpg4/%.o := CPPFLAGS += -DXPG4 $(DEMOBJS):= DEFLIST = -DELF_OBJ @@ -85,7 +84,5 @@ install: all $(VAR_SGSBINPROG) $(ROOTXPG4PROG) $(VAR_SGSCCSLINK) clean: $(RM) $(OBJS) $(XPG4OBJS) $(CLEANFILES) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../../../Makefile.targ include ../../Makefile.targ diff --git a/usr/src/cmd/sgs/nm/sparc/Makefile b/usr/src/cmd/sgs/nm/sparc/Makefile index 056fa29160..0fa774a310 100644 --- a/usr/src/cmd/sgs/nm/sparc/Makefile +++ b/usr/src/cmd/sgs/nm/sparc/Makefile @@ -22,7 +22,7 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/nm/sparc/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # PROG= nm @@ -30,8 +30,8 @@ XPG4PROG= nm ARFORMAT= PORTAR -include ../../../Makefile.cmd -include ../../Makefile.com +include ../../../Makefile.cmd +include ../../Makefile.com COMOBJS= nm.o @@ -47,9 +47,6 @@ DEFLIST= -DTARGET=SPARC -DSPARC=1 -D$(ARFORMAT) -DELF CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) -I$(ELFCAP) CERRWARN += -_gcc=-Wno-uninitialized LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf -LINTFLAGS= -x $(LDLIBS) -LINTSRCS= $(SRCS) -CLEANFILES += $(LINTOUTS) objs.xpg4/%.o := CPPFLAGS += -DXPG4 @@ -89,7 +86,5 @@ install: all $(VAR_SGSBINPROG) $(ROOTXPG4PROG) $(VAR_SGSCCSLINK) clean: $(RM) $(OBJS) $(XPG4OBJS) $(CLEANFILES) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../../../Makefile.targ include ../../Makefile.targ diff --git a/usr/src/cmd/sgs/nm/sparcv9/Makefile b/usr/src/cmd/sgs/nm/sparcv9/Makefile index 55fb1cd328..58bc8a5aff 100644 --- a/usr/src/cmd/sgs/nm/sparcv9/Makefile +++ b/usr/src/cmd/sgs/nm/sparcv9/Makefile @@ -22,15 +22,15 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/nm/sparcv9/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # PROG= nm ARFORMAT= PORTAR -include ../../../Makefile.cmd -include ../../Makefile.com +include ../../../Makefile.cmd +include ../../Makefile.com COMOBJS= nm.o @@ -45,9 +45,6 @@ DEFLIST= -DTARGET=SPARC -DSPARC=1 -D$(ARFORMAT) -DELF CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) -I$(ELFCAP) CERRWARN += -_gcc=-Wno-uninitialized LDLIBS += $(CONVLIBDIR64) $(CONV_LIB) $(ELFLIBDIR) -lelf -LINTFLAGS64= -x $(LDLIBS) -m64 -LINTSRCS= $(SRCS) -CLEANFILES += $(LINTOUTS) %.o: ../common/%.c @@ -70,8 +67,6 @@ install: all $(VAR_SGSBINPROG64) $(VAR_SGSCCSLINK64) clean: $(RM) $(OBJS) $(CLEANFILES) -lint: $(LINTOUT64) $(SGSLINTOUT) - include ../../Makefile.targ include ../../../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/packages/Makefile b/usr/src/cmd/sgs/packages/Makefile index c66828ad85..cfc6424a61 100644 --- a/usr/src/cmd/sgs/packages/Makefile +++ b/usr/src/cmd/sgs/packages/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include $(SRC)/Makefile.master @@ -40,7 +41,7 @@ LDMAKEDIRS= $(MACHS:%=../libldmake/%) SUBDIRS1= ../libconv \ .WAIT \ - ../libdl \ + ../libdl \ .WAIT \ ../libelf \ .WAIT \ @@ -98,11 +99,11 @@ $(PKGDIRS) := TARGET = package all clean clobber install: FRC @ cd $(MACH); pwd; $(MAKE) $@ -# -# invoke `package' to build this package from scratch. It will -# perform make install in the directories that contains components -# that this package is dependent upon -# +# +# invoke `package' to build this package from scratch. It will +# perform make install in the directories that contains components +# that this package is dependent upon +# package: FRC @/bin/time $(MAKE) package_build 2>&1 | tee $(BUILDLOG) @ echo "===BUILD COMPLETED checking for warnings...===" @@ -150,7 +151,4 @@ package_dep_: FRC @ cd ../link_audit; pwd; $(MAKE) package @ cd ../messages/$(MACH); pwd; $(MAKE) test -lint: FRC - $(MAKE) -f Makefile.lint lint - FRC: diff --git a/usr/src/cmd/sgs/packages/Makefile.com b/usr/src/cmd/sgs/packages/Makefile.com index 0dbf8d540d..376264ef1b 100644 --- a/usr/src/cmd/sgs/packages/Makefile.com +++ b/usr/src/cmd/sgs/packages/Makefile.com @@ -20,23 +20,22 @@ # # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include $(SRC)/Makefile.master -LINTLOG= ../lint.$(MACH).log - PKGARCHIVE= . DATAFILES= copyright prototype_com prototype_$(MACH) postinstall \ preremove depend checkinstall README= SUNWonld-README FILES= $(DATAFILES) pkginfo -PACKAGE= SUNWonld +PACKAGE= SUNWonld ROOTONLD= $(ROOT)/opt/SUNWonld ROOTREADME= $(README:%=$(ROOTONLD)/%) -CLEANFILES= $(FILES) awk_pkginfo ../bld_awk_pkginfo $(LINTLOG) -CLOBBERFILES= $(PACKAGE) $(LINTLOG).bak +CLEANFILES= $(FILES) awk_pkginfo ../bld_awk_pkginfo +CLOBBERFILES= $(PACKAGE) ../%: ../common/%.ksh $(RM) $@ diff --git a/usr/src/cmd/sgs/packages/Makefile.lint b/usr/src/cmd/sgs/packages/Makefile.lint deleted file mode 100644 index 09db2eb0ed..0000000000 --- a/usr/src/cmd/sgs/packages/Makefile.lint +++ /dev/null @@ -1,84 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -# -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. -# -# cmd/sgs/packages/Makefile.lint - -include $(SRC)/Makefile.master - -MACHS:sh= if [ "$MACH" = "sparc" ]; \ - then echo "sparc sparcv9"; \ - elif [ "$MACH" = "i386" ]; \ - then echo "i386 amd64"; \ - else echo "unknown"; \ - fi - -LSUBDIRS1= ../libconv \ - .WAIT \ - ../libdl \ - .WAIT \ - ../libelf \ - .WAIT \ - ../liblddbg \ - ../librtld_db \ - .WAIT \ - ../librtld \ - ../libcrle - -LSUBDIRS2 = ../rtld \ - ../libldstab \ - ../ldprof \ - ../link_audit \ - ../libldmake \ - ../rtld/mdbmod - -LINTLDIRS= ../libld \ - ../elfdump \ - ../elfedit \ - ../elfedit/modules \ - ../elfwrap \ - ../ar \ - ../crle \ - ../dump \ - ../ld \ - ../ldd \ - ../nm \ - ../mcs \ - ../moe \ - ../pvs - -$(LSUBDIRS1) $(LSUBDIRS2) := TARGET = lint -$(LINTLDIRS) := TARGET = lint - - -../%: FRC - @ cd $@; pwd; $(MAKE) $(TARGET) - -.KEEP_STATE_FILE: .make.state.$(MACH) -.KEEP_STATE: -.PARALLEL: $(LSUBDIRS1) $(LINTLDIRS) $(LSUBDIRS2) - -lint: $(LSUBDIRS1) .WAIT $(LINTLDIRS) .WAIT $(LSUBDIRS2) - @ sh ../tools/bld_lint.sh $(LSUBDIRS1) $(LINTLDIRS) $(LSUBDIRS2) - -FRC: diff --git a/usr/src/cmd/sgs/packages/common/SUNWonld-README b/usr/src/cmd/sgs/packages/common/SUNWonld-README index b895773d15..44cf7146e8 100644 --- a/usr/src/cmd/sgs/packages/common/SUNWonld-README +++ b/usr/src/cmd/sgs/packages/common/SUNWonld-README @@ -71,7 +71,7 @@ SUNWonld - link-editors development package. http://sunsoftpatch.eng If it has been obsoleted, the patch will be in: - + /net/on${RELEASE}-patch/on${RELEASE}/patches/${MACH}/obsolete @@ -146,7 +146,7 @@ plus: 4158744 patch 103627-02 causes core when RPATH has blank entry and dlopen/dlclose is used are incorporated in the following patches: - Solaris/SunOS 5.5.1_sparc patch 103627-13 + Solaris/SunOS 5.5.1_sparc patch 103627-13 Solaris/SunOS 5.5.1_x86 patch 103628-12 -------------------------------------------------------------------------------- All the above changes are incorporated in the following patches: @@ -459,7 +459,7 @@ All the above changes are incorporated in the following patches: 4497270 The -zredlocsym option should not eliminate partially initialized local symbols 4496963 dumping an object with crle(1) that uses $ORIGIN can loose its - dependencies + dependencies 4499413 Sun linker orders of magnitude slower than gnu linker 4461760 lazy loading libXm and libXt can fail. 4469031 The partial initialized (local) symbols for intel platform is not @@ -649,7 +649,7 @@ Bugid Risk Synopsis 4765536 crle: symbolic links can confuse alternative object configuration info 4766815 ld -r of object the TLS data fails 4770484 elfdump can not handle stripped archive file -4770494 The ld command gives improper error message handling broken archive +4770494 The ld command gives improper error message handling broken archive 4775738 overwriting output relocation table when 'ld -zignore' is used 4778247 elfdump -e of core files fails 4779976 elfdump dies on bad relocation entries @@ -722,7 +722,7 @@ All the above changes are incorporated in the following patches: -------------------------------------------------------------------------------- All the above changes are incorporated in the following patches: Solaris/SunOS 5.9_sparc patch T112963-09 - Solaris/SunOS 5.9_x86 patch T113986-05 + Solaris/SunOS 5.9_x86 patch T113986-05 Solaris/SunOS 5.8_sparc patch T109147-25 Solaris/SunOS 5.8_x86 patch T109148-25 -------------------------------------------------------------------------------- @@ -806,7 +806,7 @@ Bugid Risk Synopsis 4955802 /usr/ccs/bin/ld dumps core in process_reld() 4964415 elfdump issues wrong relocation error message 4966465 LD_NOAUXFLTR fails when object is both a standard and auxiliary filter -4973865 the link-editor does not scale properly when linking objects with +4973865 the link-editor does not scale properly when linking objects with lots of syms 4975598 SHT_SUNW_ANNOTATE section relocation not resolved 4974828 nss_files nss_compat r_mt tests randomly segfaulting @@ -935,7 +935,7 @@ All the above changes are incorporated in the following patches: 6195521 64-bit moe(1) missed the train 6198358 AMD64: bad eh_frame_hdr data when C and C++ mixed in a.out 6204123 ld.so.1: symbol lookup fails even after lazy loading fallback -6207495 UNIX98/UNIX03 vsx namespace violation DYNL.hdr/misc/dlfcn/T.dlfcn +6207495 UNIX98/UNIX03 vsx namespace violation DYNL.hdr/misc/dlfcn/T.dlfcn 14 Failed 6217285 ctfmerge crashed during full onnv build -------------------------------------------------------------------------------- @@ -1350,7 +1350,7 @@ Bugid Risk Synopsis PSARC/2007/026 ELF symbol sort sections 6518480 ld -melf_i386 doesn't complain (D) 6519951 bfu is just another word for exit today (RPATH -> RUNPATH conversion - bites us) (D) + bites us) (D) 6521504 ld: hardware capabilities processing from relocatables objects needs hardening. 6518322 Some ELF utilities need updating for .SUNW_ldynsym section (D) @@ -1661,3 +1661,4 @@ Bugid Risk Synopsis 7323 ld(1) -zignore can erroneously discard init and fini arrays as unreferenced 7594 ld -zaslr should accept Solaris-compatible values 8616 ld has trouble parsing -z options specified with -Wl +10267 ld and GCC disagree about i386 local dynamic TLS diff --git a/usr/src/cmd/sgs/prof/Makefile b/usr/src/cmd/sgs/prof/Makefile index 73cbdcc45e..fe417a9149 100644 --- a/usr/src/cmd/sgs/prof/Makefile +++ b/usr/src/cmd/sgs/prof/Makefile @@ -19,12 +19,8 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1993 by Sun Microsystems, Inc. -# -# cmd/sgs/prof/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../../../Makefile.master @@ -35,11 +31,10 @@ all:= TARGET= all install:= TARGET= install clean:= TARGET= clean clobber:= TARGET= clobber -lint:= TARGET= lint .KEEP_STATE: -all clean clobber install lint: $(SUBDIRS) +all clean clobber install: $(SUBDIRS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/sgs/prof/Makefile.com b/usr/src/cmd/sgs/prof/Makefile.com index d4d97ed062..8b5a907718 100644 --- a/usr/src/cmd/sgs/prof/Makefile.com +++ b/usr/src/cmd/sgs/prof/Makefile.com @@ -23,11 +23,13 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= prof -include $(SRC)/cmd/Makefile.cmd -include $(SRC)/cmd/sgs/Makefile.com +include $(SRC)/cmd/Makefile.cmd +include $(SRC)/cmd/sgs/Makefile.com COMOBJS= prof.o profv.o lookup.o rdelf.o \ symintOpen.o symintClose.o symintUtil.o symintErr.o symintLoad.o @@ -47,9 +49,6 @@ CERRWARN += -_gcc=-Wno-uninitialized SMATCH=off LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf -LINTSRCS = $(SRCS) -LINTFLAGS += -x -CLEANFILES += $(LINTOUTS) %.o: ../common/%.c $(COMPILE.c) $< diff --git a/usr/src/cmd/sgs/prof/i386/Makefile b/usr/src/cmd/sgs/prof/i386/Makefile index ff45d0d4a5..1dcf373655 100644 --- a/usr/src/cmd/sgs/prof/i386/Makefile +++ b/usr/src/cmd/sgs/prof/i386/Makefile @@ -18,16 +18,13 @@ # # CDDL HEADER END # -# -# ident "%Z%%M% %I% %E% SMI" -# # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/prof/i386/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -include ../Makefile.com +include ../Makefile.com DEFLIST= -DI386 -DELF @@ -37,6 +34,4 @@ all: $(PROG) install: all $(ROOTPROG) $(ROOTCCSBINLINK) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/prof/sparc/Makefile b/usr/src/cmd/sgs/prof/sparc/Makefile index 66d729b45f..de574a247e 100644 --- a/usr/src/cmd/sgs/prof/sparc/Makefile +++ b/usr/src/cmd/sgs/prof/sparc/Makefile @@ -18,16 +18,13 @@ # # CDDL HEADER END # -# -# ident "%Z%%M% %I% %E% SMI" -# # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/prof/sparc/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -include ../Makefile.com +include ../Makefile.com DEFLIST= -DSPARC -DELF @@ -37,6 +34,4 @@ all: $(PROG) install: all $(ROOTPROG) $(ROOTCCSBINLINK) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/pvs/Makefile.com b/usr/src/cmd/sgs/pvs/Makefile.com index 34755fbc99..31239a7d0d 100644 --- a/usr/src/cmd/sgs/pvs/Makefile.com +++ b/usr/src/cmd/sgs/pvs/Makefile.com @@ -24,6 +24,8 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= pvs @@ -46,8 +48,6 @@ LLDFLAGS64 = '-R$$ORIGIN/../../lib/$(MACH64)' LDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPTS) $(LLDFLAGS) LDLIBS += $(LDDBGLIBDIR) $(LDDBG_LIB) $(ELFLIBDIR) -lelf \ $(CONVLIBDIR) $(CONV_LIB) -LINTFLAGS += -x -LINTFLAGS64 += -x # not linted SMATCH=off @@ -66,6 +66,5 @@ SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n pvs_msg SRCS= $(COMOBJ:%.o=../common/%.c) $(BLTDATA) \ $(TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) -LINTSRCS= $(SRCS) ../common/lintsup.c -CLEANFILES += $(LINTOUTS) $(BLTFILES) +CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/pvs/Makefile.targ b/usr/src/cmd/sgs/pvs/Makefile.targ index e7a49190c9..444f1e4bc9 100644 --- a/usr/src/cmd/sgs/pvs/Makefile.targ +++ b/usr/src/cmd/sgs/pvs/Makefile.targ @@ -21,7 +21,9 @@ # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. - +# +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# %.o: ../common/%.c $(COMPILE.c) $< @@ -42,8 +44,6 @@ delete: install \ package: all $(ROOTPROG) -lint: $(LINTOUT32) $(SGSLINTOUT) - $(PROG): $(OBJS) $(MAPFILE) $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(POST_PROCESS) @@ -52,7 +52,7 @@ include $(SRC)/cmd/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ # Derived source and header files (messaging). - + catalog: $(BLTMESG) chkmsg: $(SRCS) diff --git a/usr/src/cmd/sgs/pvs/amd64/Makefile b/usr/src/cmd/sgs/pvs/amd64/Makefile index a0f7624ef0..16e97878bc 100644 --- a/usr/src/cmd/sgs/pvs/amd64/Makefile +++ b/usr/src/cmd/sgs/pvs/amd64/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -34,7 +34,6 @@ LLDFLAGS = $(LLDFLAGS64) CONVLIBDIR = $(CONVLIBDIR64) ELFLIBDIR = $(ELFLIBDIR64) LDDBGLIBDIR = $(LDDBGLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) ROOTPROG = $(ROOTPROG64) diff --git a/usr/src/cmd/sgs/pvs/common/lintsup.c b/usr/src/cmd/sgs/pvs/common/lintsup.c deleted file mode 100644 index be660649ea..0000000000 --- a/usr/src/cmd/sgs/pvs/common/lintsup.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License (the "License"). - * You may not use this file except in compliance with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* - * Copyright 2010 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -/* - * Supplimental Pseudo-code to get lint to consider - * these symbols used. - */ - -#include <debug.h> -#include "msg.h" - -#pragma error_messages(off, E_STATIC_UNUSED) - -static void -foo() -{ - dbg_print(0, _pvs_msg((Msg)&__pvs_msg[0])); - - alist_delete_by_offset(NULL, NULL); - (void) alist_insert_by_offset(NULL, NULL, 0, 0, 0); - alist_reset(NULL); - - (void) aplist_delete_value(NULL, NULL); - aplist_reset(NULL); - (void) aplist_test(NULL, NULL, 0); -} diff --git a/usr/src/cmd/sgs/pvs/sparcv9/Makefile b/usr/src/cmd/sgs/pvs/sparcv9/Makefile index e00e753054..0d2163fefd 100644 --- a/usr/src/cmd/sgs/pvs/sparcv9/Makefile +++ b/usr/src/cmd/sgs/pvs/sparcv9/Makefile @@ -22,7 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -33,7 +33,6 @@ LLDFLAGS = $(LLDFLAGS64) CONVLIBDIR = $(CONVLIBDIR64) ELFLIBDIR = $(ELFLIBDIR64) LDDBGLIBDIR = $(LDDBGLIBDIR64) -LINTFLAGS64 += $(VAR_LINTFLAGS64) ROOTPROG = $(ROOTPROG64) diff --git a/usr/src/cmd/sgs/ranlib/Makefile b/usr/src/cmd/sgs/ranlib/Makefile index fbc5a469fd..8dc52dec44 100644 --- a/usr/src/cmd/sgs/ranlib/Makefile +++ b/usr/src/cmd/sgs/ranlib/Makefile @@ -22,13 +22,14 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -#ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= ranlib SRCS= $(PROG:%=%.sh) -include ../../Makefile.cmd +include ../../Makefile.cmd .KEEP_STATE: @@ -38,6 +39,4 @@ install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: -lint: - include ../../Makefile.targ diff --git a/usr/src/cmd/sgs/rtld.4.x/Makefile b/usr/src/cmd/sgs/rtld.4.x/Makefile index d096d92329..660f5d2697 100644 --- a/usr/src/cmd/sgs/rtld.4.x/Makefile +++ b/usr/src/cmd/sgs/rtld.4.x/Makefile @@ -19,14 +19,9 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1990 by Sun Microsystems, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -# lib/rtld.4.x/Makefile -# -# only installs an already-built a.out ld.so file #include library definitions include ../../../lib/Makefile.lib @@ -48,5 +43,3 @@ install: $(ROOTFILE) clean: clobber: clean - -lint: diff --git a/usr/src/cmd/sgs/rtld/Makefile.com b/usr/src/cmd/sgs/rtld/Makefile.com index 22faa8f960..1bfd593cee 100644 --- a/usr/src/cmd/sgs/rtld/Makefile.com +++ b/usr/src/cmd/sgs/rtld/Makefile.com @@ -21,8 +21,9 @@ # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. -# # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# RTLD= ld.so.1 @@ -142,12 +143,6 @@ SRCS= $(AVLOBJ:%.o=$(VAR_AVLDIR)/%.c) \ $(G_MACHOBJS:%.o=$(SRCBASE)/uts/$(PLAT)/krtld/%.c) \ $(CP_MACHOBJS:%.o=../$(MACH)/%.c) \ $(ASOBJS:%.o=%.s) -LINTSRCS= $(SRCS) ../common/lintsup.c - -LINTFLAGS += -u -Dsun -D_REENTRANT -erroff=E_EMPTY_TRANSLATION_UNIT \ - -erroff=E_NAME_DECL_NOT_USED_DEF2 -LINTFLAGS64 += -u -D_REENTRANT -erroff=E_CAST_INT_TO_SMALL_INT \ - -erroff=E_NAME_DECL_NOT_USED_DEF2 -CLEANFILES += $(LINTOUTS) $(CRTS) $(BLTFILES) +CLEANFILES += $(CRTS) $(BLTFILES) CLOBBERFILES += $(RTLD) diff --git a/usr/src/cmd/sgs/rtld/Makefile.targ b/usr/src/cmd/sgs/rtld/Makefile.targ index 3a104abe03..b028b33add 100644 --- a/usr/src/cmd/sgs/rtld/Makefile.targ +++ b/usr/src/cmd/sgs/rtld/Makefile.targ @@ -23,6 +23,8 @@ # Copyright 2010 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# # Don't generate separate sections for this module pics/debugdata.o := XFFLAG= @@ -74,11 +76,6 @@ $(RTLD): pics $(PICS) $(CRTS) delete: -$(RM) $(RTLD) -lint: $(SGSLINTOUT) - -lint := CPICLIB= -lint := CLIB=-lc - $(ROOTFS_LIBDIR)/%: % $(INS.file) diff --git a/usr/src/cmd/sgs/rtld/amd64/Makefile b/usr/src/cmd/sgs/rtld/amd64/Makefile index b6db892ba6..f01898ec08 100644 --- a/usr/src/cmd/sgs/rtld/amd64/Makefile +++ b/usr/src/cmd/sgs/rtld/amd64/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # BASEPLAT = amd64 @@ -30,7 +31,7 @@ BASEPLAT = amd64 P_COMOBJS= debugdata.o \ analyze.o elf.o external.o globals.o \ - malloc.o paths.o setup.o util.o \ + malloc.o paths.o setup.o util.o \ dlfcns.o config_elf.o locale.o tsort.o \ remove.o move.o tls.o cap.o @@ -42,11 +43,11 @@ P_MACHOBJS= amd64_elf.o _setup.o dlamd64getunwind.o CP_MACHOBJS= -S_MACHOBJS= +S_MACHOBJS= P_ASOBJS= boot.o boot_elf.o caller.o -S_ASOBJS= +S_ASOBJS= CRTSRCS= ../../../../lib/crt/amd64 CRTI= pics/crti.o @@ -68,7 +69,6 @@ ADBGENFLAGS += -mlp64 ADBGENCFLAGS += -erroff=%all ADBSUB= $(ADBSUB64) CPPFLAGS += -D_ELF64 -LINTFLAGS64 += $(VAR_LINTFLAGS64) SONAME= /lib/amd64/ld.so.1 SGSMSGTARG += $(SGSMSGINTEL) $(SGSMSGINTEL64) $(SGSMSG64) @@ -86,8 +86,6 @@ all: $(RTLD) install: all $(ROOTDYNLIB64) -lint: $(LINTOUT64) - adbmacros: adb .WAIT $(ADBSCRIPTS) adbinstall: adbmacros .WAIT $(ROOTADB64) diff --git a/usr/src/cmd/sgs/rtld/common/lintsup.c b/usr/src/cmd/sgs/rtld/common/lintsup.c deleted file mode 100644 index d122c93dcc..0000000000 --- a/usr/src/cmd/sgs/rtld/common/lintsup.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -/* - * Copyright (c) 1998 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * Supplimental definitions for lint that help us avoid - * options like `-x' that filter out things we want to - * know about as well as things we don't. - */ -#include <thread.h> -#include <sys/syscall.h> - -int profile_rtld; -uintptr_t (* p_cg_interp)(int, caddr_t, caddr_t); diff --git a/usr/src/cmd/sgs/rtld/i386/Makefile b/usr/src/cmd/sgs/rtld/i386/Makefile index 40ec3f44af..224faac481 100644 --- a/usr/src/cmd/sgs/rtld/i386/Makefile +++ b/usr/src/cmd/sgs/rtld/i386/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # BASEPLAT = i386 @@ -76,8 +77,6 @@ all: $(RTLD) install: all $(ROOTDYNLIB) -lint: $(LINTOUT32) - adbmacros: adb .WAIT $(ADBSCRIPTS) adbinstall: adbmacros .WAIT $(ROOTADB) diff --git a/usr/src/cmd/sgs/rtld/mdbmod/Makefile.com b/usr/src/cmd/sgs/rtld/mdbmod/Makefile.com index 740a33d3d0..795b627bd7 100644 --- a/usr/src/cmd/sgs/rtld/mdbmod/Makefile.com +++ b/usr/src/cmd/sgs/rtld/mdbmod/Makefile.com @@ -20,6 +20,7 @@ # # # Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # LIBRARY= rtld.a @@ -28,10 +29,10 @@ VERS= .1 COMOBJS= rtld.o BLTOBJ= msg.o -OBJECTS= $(BLTOBJ) $(COMOBJS) +OBJECTS= $(BLTOBJ) $(COMOBJS) # include library definitions -include $(SRC)/lib/Makefile.lib +include $(SRC)/lib/Makefile.lib include $(SRC)/cmd/sgs/Makefile.com SGSMSGALL= rtld.msg @@ -47,20 +48,15 @@ SGSMSGTARG= ../common/rtld.msg SGSMSGALL= ../common/rtld.msg SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -LINTFLAGS += -u -erroff=E_NAME_DECL_NOT_USED_DEF2 -LINTFLAGS64 += -u -erroff=E_NAME_DECL_NOT_USED_DEF2 - CERRWARN += -_gcc=-Wno-uninitialized -LINTSRCS= $(COMOBJS:%.o=../common/%.c) $(BLTDATA) +MSGSRCS= $(COMOBJS:%.o=../common/%.c) $(BLTDATA) FILEMODE= 555 DYNLIB= ld.so -LIBS = $(DYNLIB) $(LINTLIB) - -# definitions for lint +LIBS = $(DYNLIB) CPPFLAGS += -I. -I../common -I../../common -I../../../include \ -I../../../include/$(MACH) \ @@ -76,4 +72,4 @@ ROOTMDBLIB= $(ROOT)/usr/lib/mdb/proc ROOTMDBLIB64= $(ROOTMDBLIB)/$(MACH64) ROOTMDBLIBS= $(ROOTMDBLIB)/$(MTARG)$(DYNLIB) -CLEANFILES += $(LINTOUTS) $(BLTFILES) +CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/rtld/mdbmod/Makefile.targ b/usr/src/cmd/sgs/rtld/mdbmod/Makefile.targ index dbe4afe5ad..70eed23464 100644 --- a/usr/src/cmd/sgs/rtld/mdbmod/Makefile.targ +++ b/usr/src/cmd/sgs/rtld/mdbmod/Makefile.targ @@ -22,7 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # catalog: @@ -34,8 +34,8 @@ pics/%.o: ../common/%.c include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ -chkmsg: $(LINTSRCS) - sh $(CHKMSG) $(CHKMSGFLAGS) $(LINTSRCS) +chkmsg: $(MSGSRCS) + sh $(CHKMSG) $(CHKMSGFLAGS) $(MSGSRCS) $(BLTDEFS) + \ $(BLTDATA) + \ diff --git a/usr/src/cmd/sgs/rtld/mdbmod/amd64/Makefile b/usr/src/cmd/sgs/rtld/mdbmod/amd64/Makefile index 7600730d46..6672d516b6 100644 --- a/usr/src/cmd/sgs/rtld/mdbmod/amd64/Makefile +++ b/usr/src/cmd/sgs/rtld/mdbmod/amd64/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -38,7 +38,5 @@ all: $(BLTDEFS) .WAIT $(DYNLIB) install: all .WAIT $(ROOTMDBLIBS) -lint: $(LINTOUT64) $(SGSLINTOUT) - include ../Makefile.targ include ../../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/rtld/mdbmod/i386/Makefile b/usr/src/cmd/sgs/rtld/mdbmod/i386/Makefile index be30206afe..615651a194 100644 --- a/usr/src/cmd/sgs/rtld/mdbmod/i386/Makefile +++ b/usr/src/cmd/sgs/rtld/mdbmod/i386/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -36,6 +36,4 @@ all: $(BLTDEFS) .WAIT $(DYNLIB) install: all .WAIT $(ROOTMDBLIBS) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/rtld/mdbmod/sparc/Makefile b/usr/src/cmd/sgs/rtld/mdbmod/sparc/Makefile index be30206afe..615651a194 100644 --- a/usr/src/cmd/sgs/rtld/mdbmod/sparc/Makefile +++ b/usr/src/cmd/sgs/rtld/mdbmod/sparc/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -36,6 +36,4 @@ all: $(BLTDEFS) .WAIT $(DYNLIB) install: all .WAIT $(ROOTMDBLIBS) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/rtld/mdbmod/sparcv9/Makefile b/usr/src/cmd/sgs/rtld/mdbmod/sparcv9/Makefile index 43f9c51aa0..e5e9248e88 100644 --- a/usr/src/cmd/sgs/rtld/mdbmod/sparcv9/Makefile +++ b/usr/src/cmd/sgs/rtld/mdbmod/sparcv9/Makefile @@ -23,7 +23,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -38,7 +38,5 @@ all: $(BLTDEFS) .WAIT $(DYNLIB) install: all .WAIT $(ROOTMDBLIBS) -lint: $(LINTOUT64) $(SGSLINTOUT) - include ../Makefile.targ include ../../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/rtld/sparc/Makefile b/usr/src/cmd/sgs/rtld/sparc/Makefile index d3af26fc0b..4c60c5c8d6 100644 --- a/usr/src/cmd/sgs/rtld/sparc/Makefile +++ b/usr/src/cmd/sgs/rtld/sparc/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # # Object lists are organized into primary (most frequently used code) and @@ -69,7 +70,6 @@ include $(SRC)/cmd/sgs/rtld/Makefile.com CPPFLAGS += -I../../../../uts/sparc/krtld -DA_OUT CFLAGS += -xregs=no%appl ASFLAGS += $(AS_PICFLAGS) -LINTFLAGS += -DA_OUT ADBGENCFLAGS += -erroff=%all ADBGENFLAGS += -milp32 ADBSUB= $(ADBSUB32) @@ -83,8 +83,6 @@ all: $(RTLD) install: all $(ROOTDYNLIB) -lint: $(LINTOUT32) - adbmacros: adb .WAIT $(ADBSCRIPTS) adbinstall: adbmacros .WAIT $(ROOTADB) diff --git a/usr/src/cmd/sgs/rtld/sparcv9/Makefile b/usr/src/cmd/sgs/rtld/sparcv9/Makefile index d9863462a7..d351ee66da 100644 --- a/usr/src/cmd/sgs/rtld/sparcv9/Makefile +++ b/usr/src/cmd/sgs/rtld/sparcv9/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # # Object lists are organized into primary (most frequently used code) and @@ -73,7 +74,6 @@ ADBGENFLAGS += -mlp64 ADBGENCFLAGS += -erroff=%all ADBSUB= $(ADBSUB64) CPPFLAGS += -D_ELF64 -LINTFLAGS64 += $(VAR_LINTFLAGS64) SONAME= /lib/sparcv9/ld.so.1 SGSMSGTARG += $(SGSMSGSPARC) $(SGSMSGSPARC64) $(SGSMSG64) @@ -92,8 +92,6 @@ all: $(RTLD) install: all $(ROOTDYNLIB64) -lint: $(LINTOUT64) - adbmacros: adb .WAIT $(ADBSCRIPTS) adbinstall: adbmacros .WAIT $(ROOTADB64) diff --git a/usr/src/cmd/sgs/size/Makefile b/usr/src/cmd/sgs/size/Makefile index b96250d153..b376fcb68c 100644 --- a/usr/src/cmd/sgs/size/Makefile +++ b/usr/src/cmd/sgs/size/Makefile @@ -19,13 +19,10 @@ # # CDDL HEADER END # -# -#pragma ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1998-1999 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/sgs/size/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../../../Makefile.master @@ -36,12 +33,11 @@ all:= TARGET= all install:= TARGET= install clean:= TARGET= clean clobber:= TARGET= clobber -lint:= TARGET= lint package:= TARGET= package .KEEP_STATE: -all clean clobber install lint package: $(SUBDIRS) +all clean clobber install package: $(SUBDIRS) $(MACH) $(MACH64): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/sgs/size/Makefile.com b/usr/src/cmd/sgs/size/Makefile.com index c84525db97..bba1a33384 100644 --- a/usr/src/cmd/sgs/size/Makefile.com +++ b/usr/src/cmd/sgs/size/Makefile.com @@ -23,11 +23,13 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= size -include $(SRC)/cmd/Makefile.cmd -include $(SRC)/cmd/sgs/Makefile.com +include $(SRC)/cmd/Makefile.cmd +include $(SRC)/cmd/sgs/Makefile.com COMOBJS= main.o process.o fcns.o @@ -44,6 +46,4 @@ LDFLAGS += $(LLDFLAGS) LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf -LINTSRCS = $(SRCS) - -CLEANFILES += $(OBJS) $(LINTOUTS) +CLEANFILES += $(OBJS) diff --git a/usr/src/cmd/sgs/size/amd64/Makefile b/usr/src/cmd/sgs/size/amd64/Makefile index f3bc731fb9..7452446d28 100644 --- a/usr/src/cmd/sgs/size/amd64/Makefile +++ b/usr/src/cmd/sgs/size/amd64/Makefile @@ -22,7 +22,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -42,7 +42,5 @@ VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) package \ install: all $(ROOTPROG64) $(ROOTCCSBINLINK64) -lint: $(LINTOUT64) $(SGSLINTOUT) - include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/size/i386/Makefile b/usr/src/cmd/sgs/size/i386/Makefile index 7ec19dfd55..dbf6d06985 100644 --- a/usr/src/cmd/sgs/size/i386/Makefile +++ b/usr/src/cmd/sgs/size/i386/Makefile @@ -4,7 +4,7 @@ # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. -# +# # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions @@ -18,13 +18,10 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/size/i386/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../Makefile.com @@ -36,6 +33,4 @@ DEFLIST= -DI386 -DELF package \ install: all $(ROOTPROG) $(ROOTCCSBINLINK) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/size/sparc/Makefile b/usr/src/cmd/sgs/size/sparc/Makefile index 633e2a4978..9972514380 100644 --- a/usr/src/cmd/sgs/size/sparc/Makefile +++ b/usr/src/cmd/sgs/size/sparc/Makefile @@ -18,16 +18,13 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/size/sparc/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -include ../Makefile.com +include ../Makefile.com DEFLIST= -DSPARC -DELF @@ -36,6 +33,4 @@ DEFLIST= -DSPARC -DELF package \ install: all $(ROOTPROG) $(ROOTCCSBINLINK) -lint: $(LINTOUT32) $(SGSLINTOUT) - include ../Makefile.targ diff --git a/usr/src/cmd/sgs/size/sparcv9/Makefile b/usr/src/cmd/sgs/size/sparcv9/Makefile index 2232f6c414..acd8b8a55f 100644 --- a/usr/src/cmd/sgs/size/sparcv9/Makefile +++ b/usr/src/cmd/sgs/size/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" -# -# cmd/sgs/size/sparcv9/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -include ../Makefile.com +include ../Makefile.com DEFLIST= -DSPARC -DELF @@ -43,7 +41,5 @@ VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) package \ install: all $(ROOTPROG64) $(ROOTCCSBINLINK64) -lint: $(LINTOUT64) $(SGSLINTOUT) - include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/symorder/Makefile b/usr/src/cmd/sgs/symorder/Makefile index a076b7507d..84bcbefbc1 100644 --- a/usr/src/cmd/sgs/symorder/Makefile +++ b/usr/src/cmd/sgs/symorder/Makefile @@ -18,13 +18,11 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# Use is subject to license terms. +# +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -# cmd/sgs/symorder/Makefile PROG= symorder @@ -38,8 +36,6 @@ all: $(PROG) install: all $(ROOTPROG) $(ROOTCCSBINLINK) -clean \ -clobber \ -lint: +clean clobber: include ../../Makefile.targ diff --git a/usr/src/cmd/sgs/tools/Makefile b/usr/src/cmd/sgs/tools/Makefile index 044839c959..eacc1f10a8 100644 --- a/usr/src/cmd/sgs/tools/Makefile +++ b/usr/src/cmd/sgs/tools/Makefile @@ -22,8 +22,6 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# # Makefile to support tools used for linker development. GEXECS are those # tools that the installed for distribution in the SUNWonld package. # @@ -33,8 +31,10 @@ # # o proto: creates a proto directory structure suitable for sgs make # installs (basically a subset of Targetdirs). + +# +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -# cmd/sgs/tools/Makefile include $(SRC)/Makefile.master @@ -57,7 +57,6 @@ all:= TARGET= all install:= TARGET= install clean:= TARGET= clean clobber:= TARGET= clobber -lint:= TARGET= lint .KEEP_STATE: @@ -71,8 +70,6 @@ clean clobber: $(SUBDIRS) delete: -lint: $(SUBDIRS) - %: %.ksh $(RM) $@ cat $< > $@ diff --git a/usr/src/cmd/sgs/tools/Makefile.com b/usr/src/cmd/sgs/tools/Makefile.com index b3180c50d2..91e4cfa27f 100644 --- a/usr/src/cmd/sgs/tools/Makefile.com +++ b/usr/src/cmd/sgs/tools/Makefile.com @@ -19,6 +19,7 @@ # CDDL HEADER END # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # # Copyright 2010 Sun Microsystems, Inc. All rights reserved. @@ -60,8 +61,7 @@ SRCS= $(COMOBJS:%.o=../common/%.c) $(NATOBJS:%.o=../common/%.c) CPPFLAGS += $(VAR_TOOLS_CPPFLAGS) LDFLAGS += $(CC_USE_PROTO) -CLEANFILES += $(LINTOUT) $(SGSMSG_OBJS) -LINTFLAGS= -ax +CLEANFILES += $(SGSMSG_OBJS) ROOTDIR= $(ROOT)/opt/SUNWonld ROOTPROGS= $(PROGS:%=$(ROOTDIR)/bin/%) diff --git a/usr/src/cmd/sgs/tools/Makefile.targ b/usr/src/cmd/sgs/tools/Makefile.targ index 5ae70de358..2bde89ba1b 100644 --- a/usr/src/cmd/sgs/tools/Makefile.targ +++ b/usr/src/cmd/sgs/tools/Makefile.targ @@ -24,7 +24,8 @@ # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # - +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# $(ROOTDIR)/bin/%: % $(INS.file) @@ -65,9 +66,3 @@ clobber: clean clean: $(RM) $(OBJECTS) $(CLEANFILES) - -lint: - @ echo "piglatin.c:" >> $(LINTOUT) - $(LINT.c) ../common/piglatin.c -lc >> $(LINTOUT) 2>&1 - @ echo "sgsmsg" >> $(LINTOUT) - $(LINT.c) $(SGSMSG_SRCS) -lc >> $(LINTOUT) 2>&1 diff --git a/usr/src/cmd/sgs/tools/lint_hdr.pl b/usr/src/cmd/sgs/tools/lint_hdr.pl deleted file mode 100644 index f08b65af66..0000000000 --- a/usr/src/cmd/sgs/tools/lint_hdr.pl +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/perl - -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -#ident "%Z%%M% %I% %E% SMI" - - -# -# Generate a header for lint output for subdirectories of -# usr/src/cmd/sgs, of the form: -# -# lint_hdr [-s] target_file [elfclass] -# -# where: -# target - Name of main target (library or program name) -# elfclass - If present, 32 or 64, giving the ELFCLASS of -# the code being linted. -# -# The resulting header looks like the following: -# -# [elfclass - ]target [sgssubdir] -# ---------------------------------------------------- -# -# If the elfclass is omitted, then the header does not include -# it. If the target matches 'dirname sgssubdir', then sgssubdir -# is displayed without the target and without the square brackets. -# -# The -s option specifies that this is a sub-header, used when -# multiple lints are done within a single target. If -s is specified, -# the sgssubdir is not shown (presumably it was already shown in an earlier -# call to link_hdr), and a shorter dashed line is used: -# -# [elfclass - ]target -# ======================== -# - -use warnings; -use strict; -use Cwd; - -use vars qw($script $usage $dir $argc $target $elfclass); -use vars qw($sub); - -$script = 'lint_hdr'; -$usage = "usage: $script target [elfclass]\n"; - -$sub = 0; -die $usage if (scalar(@ARGV) == 0); -while ($_ = $ARGV[0],/^-/) { - ARG: { - if (/^-s$/) { - $sub = 1; - last ARG; - } - - # If it gets here, it's an unknown option - die $usage; - } - shift; -} - -$argc = scalar(@ARGV); -die $usage if (($argc < 1) || ($argc > 2)); -$target = $ARGV[0]; -$elfclass = ($argc == 2) ? "Elf$ARGV[1] - " : ''; - -if ($sub) { - print "\n$elfclass$target\n========================\n"; - exit 0; -} - -# Clip the path up through ..sgs/, leaving the path from sgs to current dir -$dir = getcwd(); -$dir = "$1" if $dir =~ /\/sgs\/(.*)$/; - -# Normally, we format the target and directory like this: -# target [dir] -# However, if this is the special case where $dir is equal to -# prog/mach -# and prog matches our target name, then just show dir without brackets. -if (($dir =~ /^([^\/]+)\/[^\/]+$/) && ($1 eq $target)) { - $target = ''; -} else { - $dir = " [$dir]"; -} - -print "\n$elfclass$target$dir\n"; -print "------------------------------------------------------------\n"; - -exit 0; diff --git a/usr/src/cmd/sgs/tools/man/Makefile b/usr/src/cmd/sgs/tools/man/Makefile index bba2832027..3aca0b0af4 100644 --- a/usr/src/cmd/sgs/tools/man/Makefile +++ b/usr/src/cmd/sgs/tools/man/Makefile @@ -19,20 +19,18 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# Note, these man pages are not part of the product. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# MAN1l= chkmsg.1l \ sgsmsg.1l MANS= $(MAN1l) -include ../../../../Makefile.master +include ../../../../Makefile.master ROOTDIR= $(ROOT)/opt/SUNWonld/man ROOT1lMAN= $(MAN1l:%=$(ROOTDIR)/man1l/%) @@ -49,4 +47,4 @@ install: all $(ROOTMANS) $(ROOTDIR)/man1l/%: % $(INS.file) -clobber clean lint: +clobber clean: diff --git a/usr/src/cmd/sgs/tsort/Makefile b/usr/src/cmd/sgs/tsort/Makefile index 21c7e9dc01..d596257947 100644 --- a/usr/src/cmd/sgs/tsort/Makefile +++ b/usr/src/cmd/sgs/tsort/Makefile @@ -19,13 +19,10 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1995 by Sun Microsystems, Inc. # All rights reserved. # -# cmd/sgs/tsort/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../../../Makefile.master @@ -38,7 +35,6 @@ all := TARGET= all install := TARGET= install clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint # for messaging catalog # @@ -46,11 +42,11 @@ POFILE= tsort.po .KEEP_STATE: -all clean clobber install lint: $(SUBDIRS) +all clean clobber install: $(SUBDIRS) catalog: $(POFILE) -$(POFILE): +$(POFILE): $(RM) $@ $(XGETTEXT) $(XGETFLAGS) $(CSRC) sed "/^domain/d" < messages.po > $@ diff --git a/usr/src/cmd/sgs/tsort/i386/Makefile b/usr/src/cmd/sgs/tsort/i386/Makefile index 0df033fb0e..4db8b66615 100644 --- a/usr/src/cmd/sgs/tsort/i386/Makefile +++ b/usr/src/cmd/sgs/tsort/i386/Makefile @@ -22,10 +22,12 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= tsort -include ../../../Makefile.cmd +include ../../../Makefile.cmd OBJS= Err.o erraction.o errafter.o errbefore.o errexit.o \ errprefix.o errsource.o errstrtok.o errtag.o errtext.o \ @@ -40,8 +42,6 @@ CSTD= $(CSTD_GNU99) CERRWARN += -_gcc=-Wno-parentheses -CLEANFILES += $(LINTOUT) - %.o: ../common/%.c $(COMPILE.c) $< @@ -58,10 +58,4 @@ install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) -lint: $(LINTOUT) - -$(LINTOUT): $(SRCS) - perl ../../tools/lint_hdr.pl $(PROG) > $(LINTOUT) - $(LINT.c) $(SRCS) 2>&1 | tee -a $(LINTOUT) - include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/tsort/sparc/Makefile b/usr/src/cmd/sgs/tsort/sparc/Makefile index 6a5e794bda..1f6cbe9ab1 100644 --- a/usr/src/cmd/sgs/tsort/sparc/Makefile +++ b/usr/src/cmd/sgs/tsort/sparc/Makefile @@ -22,12 +22,12 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# cmd/sgs/tsort/sparc/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # PROG= tsort -include ../../../Makefile.cmd +include ../../../Makefile.cmd OBJS= Err.o erraction.o errafter.o errbefore.o errexit.o \ errprefix.o errsource.o errstrtok.o errtag.o errtext.o \ @@ -41,8 +41,6 @@ CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-parentheses CSTD= $(CSTD_GNU99) -CLEANFILES += $(LINTOUT) - %.o: ../common/%.c $(COMPILE.c) $< @@ -59,10 +57,4 @@ install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) -lint: $(LINTOUT) - -$(LINTOUT): $(SRCS) - perl ../../tools/lint_hdr.pl $(PROG) > $(LINTOUT) - $(LINT.c) $(SRCS) 2>&1 | tee -a $(LINTOUT) - include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/unifdef/Makefile b/usr/src/cmd/sgs/unifdef/Makefile index 29e07d4f76..fe417a9149 100644 --- a/usr/src/cmd/sgs/unifdef/Makefile +++ b/usr/src/cmd/sgs/unifdef/Makefile @@ -19,12 +19,8 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1993 by Sun Microsystems, Inc. -# -# cmd/sgs/unifdef/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # include ../../../Makefile.master @@ -35,11 +31,10 @@ all:= TARGET= all install:= TARGET= install clean:= TARGET= clean clobber:= TARGET= clobber -lint:= TARGET= lint .KEEP_STATE: -all clean clobber install lint: $(SUBDIRS) +all clean clobber install: $(SUBDIRS) $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) diff --git a/usr/src/cmd/sgs/unifdef/i386/Makefile b/usr/src/cmd/sgs/unifdef/i386/Makefile index 45fd3c3bea..1194f8124c 100644 --- a/usr/src/cmd/sgs/unifdef/i386/Makefile +++ b/usr/src/cmd/sgs/unifdef/i386/Makefile @@ -20,12 +20,14 @@ # # # Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. +# Use is subject to license terms. +# +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # PROG= unifdef -include ../../../Makefile.cmd +include ../../../Makefile.cmd OBJS= unifdef.o @@ -35,9 +37,6 @@ DEFLIST= -DELF_OBJ -DELF CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) CFLAGS += $(CCVERBOSE) CSTD= $(CSTD_GNU99) -LINTFLAGS += $(LDLIBS) - -CLEANFILES += $(LINTOUT) CERRWARN += -_gcc=-Wno-char-subscripts CERRWARN += -_gcc=-Wno-parentheses @@ -58,10 +57,4 @@ install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) -lint: $(LINTOUT) - -$(LINTOUT): $(SRCS) - perl ../../tools/lint_hdr.pl $(PROG) > $(LINTOUT) - $(LINT.c) $(SRCS) 2>&1 | tee -a $(LINTOUT) - include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/unifdef/sparc/Makefile b/usr/src/cmd/sgs/unifdef/sparc/Makefile index 297bfe27a5..a527083e8e 100644 --- a/usr/src/cmd/sgs/unifdef/sparc/Makefile +++ b/usr/src/cmd/sgs/unifdef/sparc/Makefile @@ -22,10 +22,12 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= unifdef -include ../../../Makefile.cmd +include ../../../Makefile.cmd OBJS= unifdef.o @@ -37,9 +39,6 @@ CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-char-subscripts CERRWARN += -_gcc=-Wno-parentheses CSTD= $(CSTD_GNU99) -LINTFLAGS += $(LDLIBS) - -CLEANFILES += $(LINTOUT) %.o: ../common/%.c $(COMPILE.c) $< @@ -57,10 +56,4 @@ install: all $(ROOTPROG) $(ROOTCCSBINLINK) clean: $(RM) $(OBJS) $(CLEANFILES) -lint: $(LINTOUT) - -$(LINTOUT): $(SRCS) - perl ../../tools/lint_hdr.pl $(PROG) > $(LINTOUT) - $(LINT.c) $(SRCS) 2>&1 | tee -a $(LINTOUT) - include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/yacc/Makefile b/usr/src/cmd/sgs/yacc/Makefile index d1e67e732e..348fedbf5e 100644 --- a/usr/src/cmd/sgs/yacc/Makefile +++ b/usr/src/cmd/sgs/yacc/Makefile @@ -19,14 +19,10 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1995,1997 by Sun Microsystems, Inc. # All Rights Reserved. # -# cmd/sgs/yacc/Makefile -# +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. include ../../../Makefile.master @@ -41,7 +37,6 @@ install := TARGET= install install_lib := TARGET= install_lib clean := TARGET= clean clobber := TARGET= clobber -lint := TARGET= lint # for messaging catalog # @@ -50,11 +45,11 @@ POFILE= yacc.po .KEEP_STATE: -all clean clobber install install_lib lint: $(SUBDIRS) +all clean clobber install install_lib: $(SUBDIRS) catalog: $(POFILE) -$(POFILE): +$(POFILE): $(RM) $@ $(XGETTEXT) $(XGETFLAGS) $(CSRC) sed "/^domain/d" < messages.po > $@ diff --git a/usr/src/cmd/sgs/yacc/Makefile.com b/usr/src/cmd/sgs/yacc/Makefile.com index dca8fa416d..a68a388a87 100644 --- a/usr/src/cmd/sgs/yacc/Makefile.com +++ b/usr/src/cmd/sgs/yacc/Makefile.com @@ -24,6 +24,8 @@ # Use is subject to license terms. # # Copyright (c) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# PROG= yacc @@ -48,27 +50,19 @@ COMSRCS= $(COMOBJS:%.o=../common/%.c) LIBSRCS= $(OBJECTS:%.o=../common/%.c) SRCS= $(COMSRCS) $(LIBSRCS) -LIBS = $(DYNLIB) $(LINTLIB) - -# Append to LINTFLAGS and LINTFLAGS64 from lib/Makefile.lib -LINTFLAGS += -erroff=E_NAME_MULTIPLY_DEF2 -LINTFLAGS64 += -erroff=E_NAME_MULTIPLY_DEF2 +LIBS = $(DYNLIB) # Tune ZDEFS to ignore undefined symbols for building the yacc shared library # since these symbols (mainly yyparse) are to be resolved elsewhere. # $(DYNLIB):= ZDEFS = $(ZNODEFS) $(DYNLIBCCC):= ZDEFS = $(ZNODEFS) -LINTSRCS= ../common/llib-l$(LIBNAME) -$(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC) INCLIST= -I../../include -I../../include/$(MACH) CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) $(PROG):= LDLIBS = $(LDLIBS.cmd) BUILD.AR= $(AR) $(ARFLAGS) $@ `$(LORDER) $(OBJS) | $(TSORT)` -LINTPOUT= lint.out - CSTD= $(CSTD_GNU99) CFLAGS += $(CCVERBOSE) CFLAGS64 += $(CCVERBOSE) @@ -82,15 +76,9 @@ $(ROOTPROG):= FILEMODE = 0555 ROOTYACCPAR= $(YACCPAR:%=$(ROOTSHLIBCCS)/%) -ROOTLINTDIR= $(ROOTLIBDIR) -ROOTLINT= $(LINTSRCS:../common/%=$(ROOTLINTDIR)/%) - DYNLINKLIBDIR= $(ROOTLIBDIR) DYNLINKLIB= $(LIBLINKS:%=$(DYNLINKLIBDIR)/%) LDLIBS += -lc -CLEANFILES += $(LINTPOUT) CLOBBERFILES += $(LIBS) $(LIBRARY) - -lint: lintcheck diff --git a/usr/src/cmd/sgs/yacc/Makefile.targ b/usr/src/cmd/sgs/yacc/Makefile.targ index 59a89218d7..baa615514c 100644 --- a/usr/src/cmd/sgs/yacc/Makefile.targ +++ b/usr/src/cmd/sgs/yacc/Makefile.targ @@ -23,6 +23,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # $(PROG): objs .WAIT $(POBJS) @@ -75,18 +76,8 @@ objs/%.o pics/%.o: ../common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -# install rule for lint library target -$(ROOTLINTDIR)/%: ../common/% - $(INS.file) - $(DYNLINKLIBDIR)/%: %$(VERS) $(INS.liblink) clean: $(RM) $(POBJS) $(OBJS) $(PICS) $(CLEANFILES) - -$(LINTLIB): $$(SRCS) - $(LINT.c) -o $(LIBNAME) $(SRCS) > $(LINTOUT) 2>&1 - -lintcheck: $$(SRCS) - $(LINT.c) $(LINTCHECKFLAGS) $(SRCS) $(LDLIBS) diff --git a/usr/src/cmd/sgs/yacc/common/llib-ly b/usr/src/cmd/sgs/yacc/common/llib-ly deleted file mode 100644 index 3c4ad1fdc9..0000000000 --- a/usr/src/cmd/sgs/yacc/common/llib-ly +++ /dev/null @@ -1,31 +0,0 @@ -/* - * CDDL HEADER START - * - * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. - * - * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENSOLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ - -/* Copyright (c) 1989 AT&T */ -/* All Rights Reserved */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* LINTLIBRARY */ -/* PROTOLIB1 */ - -extern int yyerror(char *); diff --git a/usr/src/cmd/sgs/yacc/i386/Makefile b/usr/src/cmd/sgs/yacc/i386/Makefile index dde531bc69..5ca3d8bd7d 100644 --- a/usr/src/cmd/sgs/yacc/i386/Makefile +++ b/usr/src/cmd/sgs/yacc/i386/Makefile @@ -22,13 +22,12 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -# cmd/sgs/yacc/i386/Makefile DEFLIST= -DELF -include ../../../Makefile.cmd +include ../../../Makefile.cmd include ../Makefile.com .KEEP_STATE: @@ -41,7 +40,7 @@ install: all $(ROOTPROG) $(ROOTYACCPAR) $(ROOTCCSBINLINK) $(RM) $(ROOTCCSBIN)/yaccpar $(SYMLINK) ../../share/lib/ccs/yaccpar $(ROOTCCSBIN)/yaccpar -install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTLINT) +install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) include ../Makefile.targ include ../../../Makefile.targ diff --git a/usr/src/cmd/sgs/yacc/sparc/Makefile b/usr/src/cmd/sgs/yacc/sparc/Makefile index 86713f6617..65d76b6f21 100644 --- a/usr/src/cmd/sgs/yacc/sparc/Makefile +++ b/usr/src/cmd/sgs/yacc/sparc/Makefile @@ -22,14 +22,12 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# -# cmd/sgs/yacc/sparc/Makefile +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # DEFLIST= -DELF -include ../../../Makefile.cmd +include ../../../Makefile.cmd include ../Makefile.com .KEEP_STATE: @@ -40,7 +38,7 @@ all_lib: $(LIBS) install: all $(ROOTPROG) $(ROOTYACCPAR) $(ROOTCCSBINLINK) -install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(ROOTLINT) +install_lib: all_lib $(ROOTLIBS) $(ROOTLINKS) $(DYNLINKLIB) $(RM) $(ROOTCCSBIN)/yaccpar $(SYMLINK) ../../share/lib/ccs/yaccpar $(ROOTCCSBIN)/yaccpar diff --git a/usr/src/cmd/smbsrv/smbd/Makefile b/usr/src/cmd/smbsrv/smbd/Makefile index c744f73ec6..a33dac8294 100644 --- a/usr/src/cmd/smbsrv/smbd/Makefile +++ b/usr/src/cmd/smbsrv/smbd/Makefile @@ -21,6 +21,7 @@ # # Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2014 Nexenta Systems, Inc. All rights reserved. +# Copyright (c) 2018, Joyent, Inc. # @@ -69,6 +70,9 @@ $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG # Should not have to do this, but the Kerberos includes are a mess. CPPFLAGS += -I $(ROOT)/usr/include/kerberosv5 +# needs work +SMOFF += all_func_returns,deref_check + CSTD = $(CSTD_GNU99) C99LMODE = -Xc99=%all diff --git a/usr/src/cmd/sort/Makefile.com b/usr/src/cmd/sort/Makefile.com index ef195b2ce1..75affc95a3 100644 --- a/usr/src/cmd/sort/Makefile.com +++ b/usr/src/cmd/sort/Makefile.com @@ -75,7 +75,7 @@ CLEANFILES = $(OBJS) $(XPG4OBJS) $(LNTS) include ../../Makefile.cmd SED = sed -DCFILE = $(PROG).dc +DCFILE = $(PROG).dc SPACEFLAG = SPACEFLAG64 = @@ -94,10 +94,10 @@ SMATCH=off $(XPG4) := CFLAGS += -DXPG4 -debug := SORT_DEBUG = -g -DDEBUG $(ILDOFF) +debug := SORT_DEBUG = $(CCGDEBUG) -DDEBUG $(ILDOFF) debug := COPTFLAG = debug := COPTFLAG64 = -stats := SORT_DEBUG = -g -DSTATS -DDEBUG $(ILDOFF) +stats := SORT_DEBUG = $(CCGDEBUG) -DSTATS -DDEBUG $(ILDOFF) stats := COPTFLAG = stats := COPTFLAG64 = diff --git a/usr/src/cmd/stmfproxy/stmfproxy/Makefile b/usr/src/cmd/stmfproxy/stmfproxy/Makefile index 73d75ce1df..f3626f2112 100644 --- a/usr/src/cmd/stmfproxy/stmfproxy/Makefile +++ b/usr/src/cmd/stmfproxy/stmfproxy/Makefile @@ -57,11 +57,6 @@ CCVERBOSE = LDLIBS += -lnsl -lstmf -lstmfproxy CPPFLAGS += -I. -I$(COMMONBASE)/cmdparse -# Uncomment the following to help with debugging -#CFLAGS += -g -#i386_COPTFLAG= -#i386_CCOPTFLAG= - .KEEP_STATE: $(PROG): $(OBJS) diff --git a/usr/src/cmd/svc/svccfg/Makefile b/usr/src/cmd/svc/svccfg/Makefile index fc42a8b0c3..0e50a1a293 100644 --- a/usr/src/cmd/svc/svccfg/Makefile +++ b/usr/src/cmd/svc/svccfg/Makefile @@ -47,7 +47,7 @@ MYOBJS = $(SRCS:%.c=%.o) \ notify_params.o OBJS = $(MYOBJS) -POFILES = $(SRCS:%.c=%.po) \ +POFILES = $(SRCS:%.c=%.po) \ svccfg_grammar.po \ svccfg_lex.po \ ../common/manifest_find.po \ @@ -97,8 +97,6 @@ LIBSCF = $(SRC)/lib/libscf LIBTECLA = $(SRC)/lib/libtecla # just for the header LIBUUTIL = $(SRC)/lib/libuutil -debug := COPTFLAG = -g - lint := LINTFLAGS = -mux lint := SVCCFG_EXTRA_LIBS = -lscf -ll -luutil -lumem -lmd5 -lnvpair diff --git a/usr/src/cmd/tnf/prex/Makefile.com b/usr/src/cmd/tnf/prex/Makefile.com index 871583d0aa..90303b6aa7 100644 --- a/usr/src/cmd/tnf/prex/Makefile.com +++ b/usr/src/cmd/tnf/prex/Makefile.com @@ -62,8 +62,6 @@ YFLAGS= -d LFLAGS= -v # FOR normal makefile, uncomment the next line LDLIBS += -lgen -ltnfctl -lelf -lc -# Uncomment the following line for a debug build -# COPTFLAG = -g -DDEBUG CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-unused-label @@ -112,7 +110,7 @@ $(POFILE): $(POFILES) clean: $(RM) $(OBJS) $(CLEANFILES) -lint: $(OBJS) +lint: $(OBJS) $(LINT.c) $(SRCS) include ../../../Makefile.targ diff --git a/usr/src/cmd/zlook/Makefile.com b/usr/src/cmd/zlook/Makefile.com index 06627ad814..fe96088124 100644 --- a/usr/src/cmd/zlook/Makefile.com +++ b/usr/src/cmd/zlook/Makefile.com @@ -30,8 +30,8 @@ include ../../Makefile.cmd CSTD= $(CSTD_GNU99) C99LMODE= -Xc99=%all -CFLAGS += -g $(CCVERBOSE) -CFLAGS64 += -g $(CCVERBOSE) +CFLAGS += $(CCGDEBUG) $(CCVERBOSE) +CFLAGS64 += $(CCGDEBUG) $(CCVERBOSE) CPPFLAGS += -D_LARGEFILE64_SOURCE=1 -D_REENTRANT $(INCS) CERRWARN += -_gcc=-Wno-uninitialized diff --git a/usr/src/common/ficl/tools.c b/usr/src/common/ficl/tools.c index da1d69cdc4..11f17505cc 100644 --- a/usr/src/common/ficl/tools.c +++ b/usr/src/common/ficl/tools.c @@ -54,6 +54,7 @@ * Specify breakpoint default action */ +#include <stdbool.h> #include "ficl.h" extern void exit(int); @@ -103,7 +104,7 @@ ficlVmSetBreak(ficlVm *vm, ficlBreakpoint *pBP) * d e b u g P r o m p t */ static void -ficlDebugPrompt(ficlVm *vm, int debug) +ficlDebugPrompt(bool debug) { if (debug) setenv("prompt", "dbg> ", 1); @@ -385,7 +386,7 @@ ficlPrimitiveStepBreak(ficlVm *vm) ficlString command; ficlWord *word; ficlWord *pOnStep; - int debug = 1; + bool debug = true; if (!vm->restart) { FICL_VM_ASSERT(vm, vm->callback.system->breakpoint.address); @@ -419,11 +420,11 @@ ficlPrimitiveStepBreak(ficlVm *vm) else { sprintf(vm->pad, "next: %s\n", word->name); if (strcmp(word->name, "interpret") == 0) - debug = 0; + debug = false; } ficlVmTextOut(vm, vm->pad); - ficlDebugPrompt(vm, debug); + ficlDebugPrompt(debug); } else { vm->restart = 0; } @@ -457,7 +458,7 @@ ficlPrimitiveStepBreak(ficlVm *vm) } case 'q': - ficlDebugPrompt(vm, 0); + ficlDebugPrompt(false); ficlVmThrow(vm, FICL_VM_STATUS_ABORT); break; case 'x': { @@ -482,7 +483,7 @@ ficlPrimitiveStepBreak(ficlVm *vm) ficlVmTextOut(vm, "\n"); } if (returnValue == FICL_VM_STATUS_ERROR_EXIT) - ficlDebugPrompt(vm, 0); + ficlDebugPrompt(false); ficlVmThrow(vm, returnValue); break; @@ -497,12 +498,12 @@ ficlPrimitiveStepBreak(ficlVm *vm) "q -- Quit (stop debugging and abort)\n" "x -- eXecute the rest of the line " "as Ficl words\n"); - ficlDebugPrompt(vm, 1); + ficlDebugPrompt(true); ficlVmThrow(vm, FICL_VM_STATUS_RESTART); break; } - ficlDebugPrompt(vm, 0); + ficlDebugPrompt(false); } /* diff --git a/usr/src/lib/libc/sparc/Makefile.com b/usr/src/lib/libc/sparc/Makefile.com index 0bdbdd1bb7..042eb2ecf8 100644 --- a/usr/src/lib/libc/sparc/Makefile.com +++ b/usr/src/lib/libc/sparc/Makefile.com @@ -1409,7 +1409,7 @@ $(ASSYMDEP_OBJS:%=pics/%): assym.h # assym.h build rules -assym.h := CFLAGS += -g +assym.h := CFLAGS += $(CCGDEBUG) GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c diff --git a/usr/src/lib/libc/sparcv9/Makefile.com b/usr/src/lib/libc/sparcv9/Makefile.com index 2a5e14b625..42c49d340c 100644 --- a/usr/src/lib/libc/sparcv9/Makefile.com +++ b/usr/src/lib/libc/sparcv9/Makefile.com @@ -1323,7 +1323,7 @@ $(ASSYMDEP_OBJS:%=pics/%): assym.h # assym.h build rules -assym.h := CFLAGS64 += -g +assym.h := CFLAGS64 += $(CCGDEBUG) GENASSYM_C = $(LIBCDIR)/$(MACH)/genassym.c diff --git a/usr/src/lib/libexacct/Makefile.com b/usr/src/lib/libexacct/Makefile.com index bc3332a971..0be4ef3c27 100644 --- a/usr/src/lib/libexacct/Makefile.com +++ b/usr/src/lib/libexacct/Makefile.com @@ -35,18 +35,18 @@ SRCS= $(COMMON_OBJS:%.o=../../../common/exacct/%.c) \ $(LIB_OBJS:%.o=../common/%.c) LIBS = $(DYNLIB) $(LINTLIB) -LDLIBS += -lc +LDLIBS += -lc SRCDIR = ../common $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) -CFLAGS += $(CCVERBOSE) +CFLAGS += $(CCVERBOSE) CERRWARN += -_gcc=-Wno-uninitialized CPPFLAGS += -D_FILE_OFFSET_BITS=64 debug := CPPFLAGS += -DLIBEXACCT_DEBUG -debug := COPTFLAG = -g -debug := COPTFLAG64 = -g +debug := COPTFLAG = $(CCGDEBUG) +debug := COPTFLAG64 = $(CCGDEBUG) .KEEP_STATE: diff --git a/usr/src/lib/libsmbfs/Makefile.com b/usr/src/lib/libsmbfs/Makefile.com index 872e8222a5..160494aff1 100644 --- a/usr/src/lib/libsmbfs/Makefile.com +++ b/usr/src/lib/libsmbfs/Makefile.com @@ -114,12 +114,6 @@ CPPFLAGS += -D__EXTENSIONS__ -D_REENTRANT -DMIA \ # Debugging ${NOT_RELEASE_BUILD} CPPFLAGS += -DDEBUG -# uncomment these for dbx debugging -#COPTFLAG = -g -#CTF_FLAGS = -#CTFCONVERT_O= -#CTFMERGE_LIB= - # Filter out the less important lint. # See lgrep.awk LGREP = $(AWK) -f $(SRCDIR)/lgrep.awk diff --git a/usr/src/lib/libtnfctl/Makefile.com b/usr/src/lib/libtnfctl/Makefile.com index e3e14c3304..bbc56e5257 100644 --- a/usr/src/lib/libtnfctl/Makefile.com +++ b/usr/src/lib/libtnfctl/Makefile.com @@ -66,13 +66,11 @@ HDRS= tnfctl.h ROOTHDRDIR= $(ROOT)/usr/include/tnf ROOTHDRS= $(HDRS:%=$(ROOTHDRDIR)/%) CHECKHDRS= $(HDRS:%.h=%.check) -$(ROOTHDRS) := FILEMODE = 0644 +$(ROOTHDRS) := FILEMODE = 0644 CHECKHDRS = $(HDRS:%.h=%.check) LDLIBS += -lc -lelf -# Uncomment the following line for a debug build -# COPTFLAG = -g -DDEBUG $(CCVERBOSE) CPPFLAGS += -I$(SRC)/lib/libtnfprobe -D_REENTRANT -I$(SRC)/cmd/sgs/include LINTFLAGS += -y diff --git a/usr/src/lib/libzpool/Makefile.com b/usr/src/lib/libzpool/Makefile.com index 51475a4051..57a171f483 100644 --- a/usr/src/lib/libzpool/Makefile.com +++ b/usr/src/lib/libzpool/Makefile.com @@ -66,8 +66,8 @@ $(LIBS): ../common/zfs.h CSTD= $(CSTD_GNU99) C99LMODE= -Xc99=%all -CFLAGS += -g $(CCVERBOSE) $(CNOGLOBAL) -CFLAGS64 += -g $(CCVERBOSE) $(CNOGLOBAL) +CFLAGS += $(CCGDEBUG) $(CCVERBOSE) $(CNOGLOBAL) +CFLAGS64 += $(CCGDEBUG) $(CCVERBOSE) $(CNOGLOBAL) LDLIBS += -lcmdutils -lumem -lavl -lnvpair -lz -lc -lsysevent -lmd \ -lfakekernel CPPFLAGS.first = -I$(SRC)/lib/libfakekernel/common diff --git a/usr/src/lib/pyzfs/Makefile.com b/usr/src/lib/pyzfs/Makefile.com index fd6218e2c4..a7ebf4fe41 100644 --- a/usr/src/lib/pyzfs/Makefile.com +++ b/usr/src/lib/pyzfs/Makefile.com @@ -21,6 +21,7 @@ # # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2018 OmniOS Community Edition (OmniOSce) Association. +# Copyright (c) 2018, Joyent, Inc. # LIBRARY = ioctl.a @@ -53,6 +54,9 @@ CPPFLAGS += \ CPPFLAGS += -I../../../uts/common/fs/zfs CPPFLAGS += -I../../../common/zfs +# needs work +SMOFF += all_func_returns + .KEEP_STATE: all: diff --git a/usr/src/lib/smbsrv/libfksmbsrv/Makefile.com b/usr/src/lib/smbsrv/libfksmbsrv/Makefile.com index 074e316b28..ce8ce63fe3 100644 --- a/usr/src/lib/smbsrv/libfksmbsrv/Makefile.com +++ b/usr/src/lib/smbsrv/libfksmbsrv/Makefile.com @@ -187,9 +187,9 @@ include ../../../Makefile.lib include ../../Makefile.lib # Force SOURCEDEBUG -CSOURCEDEBUGFLAGS = -g -CCSOURCEDEBUGFLAGS = -g -STRIP_STABS = : +CSOURCEDEBUGFLAGS = $(CCGDEBUG) +CCSOURCEDEBUGFLAGS = $(CCGDEBUG) +STRIP_STABS = : # Note: need our sys includes _before_ ENVCPPFLAGS, proto etc. diff --git a/usr/src/lib/udapl/libdat/Makefile.com b/usr/src/lib/udapl/libdat/Makefile.com index 254241680d..8694c77788 100644 --- a/usr/src/lib/udapl/libdat/Makefile.com +++ b/usr/src/lib/udapl/libdat/Makefile.com @@ -23,8 +23,8 @@ # Use is subject to license terms. # -LIBRARY= libdat.a -VERS= .1 +LIBRARY= libdat.a +VERS= .1 OBJECTS = \ dat_dictionary.o \ @@ -36,16 +36,16 @@ OBJECTS = \ dat_api.o \ udat.o \ udat_api.o \ - udat_sr_parser.o + udat_sr_parser.o include ../../../Makefile.lib -LIBS = $(DYNLIB) $(LINTLIB) +LIBS = $(DYNLIB) $(LINTLIB) LDLIBS += -lc SRCDIR = ../common -CPPFLAGS += -I../include +CPPFLAGS += -I../include CFLAGS += $(CCVERBOSE) LINTFLAGS += -DDEBUG LINTFLAGS64 += -DDEBUG @@ -54,8 +54,6 @@ $(LINTLIB):= SRCS = $(SRCDIR)/$(LINTSRC) CERRWARN += -_gcc=-Wno-type-limits $(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG -debug := COPTFLAG = -g -debug := COPTFLAG64 = -g .KEEP_STATE: diff --git a/usr/src/lib/udapl/udapl_tavor/Makefile.com b/usr/src/lib/udapl/udapl_tavor/Makefile.com index 4671bea78d..a2b1711a4c 100644 --- a/usr/src/lib/udapl/udapl_tavor/Makefile.com +++ b/usr/src/lib/udapl/udapl_tavor/Makefile.com @@ -24,8 +24,8 @@ # # Copyright (c) 2018, Joyent, Inc. -LIBRARY= udapl_tavor.a -VERS= .1 +LIBRARY= udapl_tavor.a +VERS= .1 LOCOBJS = \ dapl_cno_create.o \ @@ -157,8 +157,6 @@ CERRWARN += -_gcc=-Wno-switch SMATCH=off $(NOT_RELEASE_BUILD)CPPFLAGS += -DDAPL_DBG -debug := COPTFLAG = -g -debug := COPTFLAG64 = -g .KEEP_STATE: diff --git a/usr/src/pkg/manifests/developer-library-lint.mf b/usr/src/pkg/manifests/developer-library-lint.mf index 8a2480ee39..2e28c20008 100644 --- a/usr/src/pkg/manifests/developer-library-lint.mf +++ b/usr/src/pkg/manifests/developer-library-lint.mf @@ -23,6 +23,7 @@ # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. # Copyright 2012 OmniTI Computer Consulting, Inc. All rights reserved. # Copyright 2014 Nexenta Systems, Inc. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # set name=pkg.fmri value=pkg:/developer/library/lint@$(PKGVERS) @@ -56,12 +57,10 @@ file path=lib/$(ARCH64)/llib-lcurses.ln file path=lib/$(ARCH64)/llib-ldevice.ln file path=lib/$(ARCH64)/llib-ldevid.ln file path=lib/$(ARCH64)/llib-ldevinfo.ln -file path=lib/$(ARCH64)/llib-ldl.ln file path=lib/$(ARCH64)/llib-ldladm.ln file path=lib/$(ARCH64)/llib-ldlpi.ln file path=lib/$(ARCH64)/llib-ldoor.ln file path=lib/$(ARCH64)/llib-lefi.ln -file path=lib/$(ARCH64)/llib-lelf.ln $(i386_ONLY)file path=lib/$(ARCH64)/llib-lfdisk.ln file path=lib/$(ARCH64)/llib-lgen.ln file path=lib/$(ARCH64)/llib-lintl.ln @@ -80,7 +79,6 @@ file path=lib/$(ARCH64)/llib-lrcm.ln file path=lib/$(ARCH64)/llib-lresolv.ln file path=lib/$(ARCH64)/llib-lrpcsvc.ln file path=lib/$(ARCH64)/llib-lrt.ln -file path=lib/$(ARCH64)/llib-lrtld_db.ln file path=lib/$(ARCH64)/llib-lscf.ln file path=lib/$(ARCH64)/llib-lsec.ln file path=lib/$(ARCH64)/llib-lsecdb.ln @@ -121,8 +119,6 @@ file path=lib/llib-ldevid file path=lib/llib-ldevid.ln file path=lib/llib-ldevinfo file path=lib/llib-ldevinfo.ln -file path=lib/llib-ldl -file path=lib/llib-ldl.ln file path=lib/llib-ldladm file path=lib/llib-ldladm.ln file path=lib/llib-ldlpi @@ -131,8 +127,6 @@ file path=lib/llib-ldoor file path=lib/llib-ldoor.ln file path=lib/llib-lefi file path=lib/llib-lefi.ln -file path=lib/llib-lelf -file path=lib/llib-lelf.ln $(i386_ONLY)file path=lib/llib-lfdisk $(i386_ONLY)file path=lib/llib-lfdisk.ln file path=lib/llib-lgen @@ -171,8 +165,6 @@ file path=lib/llib-lrpcsvc file path=lib/llib-lrpcsvc.ln file path=lib/llib-lrt file path=lib/llib-lrt.ln -file path=lib/llib-lrtld_db -file path=lib/llib-lrtld_db.ln file path=lib/llib-lscf file path=lib/llib-lscf.ln file path=lib/llib-lsec @@ -346,8 +338,6 @@ link path=usr/ccs/lib/$(ARCH64)/llib-lform.ln \ target=../../../lib/$(ARCH64)/llib-lform.ln link path=usr/ccs/lib/$(ARCH64)/llib-lgen.ln \ target=../../../../lib/$(ARCH64)/llib-lgen.ln -link path=usr/ccs/lib/$(ARCH64)/llib-ll.ln \ - target=../../../lib/$(ARCH64)/llib-ll.ln link path=usr/ccs/lib/$(ARCH64)/llib-lmenu.ln \ target=../../../lib/$(ARCH64)/llib-lmenu.ln link path=usr/ccs/lib/$(ARCH64)/llib-lpanel.ln \ @@ -356,8 +346,6 @@ link path=usr/ccs/lib/$(ARCH64)/llib-ltermcap.ln \ target=../../../../lib/$(ARCH64)/llib-ltermcap.ln link path=usr/ccs/lib/$(ARCH64)/llib-ltermlib.ln \ target=../../../../lib/$(ARCH64)/llib-lcurses.ln -link path=usr/ccs/lib/$(ARCH64)/llib-ly.ln \ - target=../../../lib/$(ARCH64)/llib-ly.ln link path=usr/ccs/lib/llib-lcurses target=../../../lib/llib-lcurses link path=usr/ccs/lib/llib-lcurses.ln target=../../../lib/llib-lcurses.ln link path=usr/ccs/lib/llib-lform target=../../lib/llib-lform @@ -394,14 +382,10 @@ link path=usr/lib/$(ARCH64)/llib-ldevid.ln \ target=../../../lib/$(ARCH64)/llib-ldevid.ln link path=usr/lib/$(ARCH64)/llib-ldevinfo.ln \ target=../../../lib/$(ARCH64)/llib-ldevinfo.ln -link path=usr/lib/$(ARCH64)/llib-ldl.ln \ - target=../../../lib/$(ARCH64)/llib-ldl.ln link path=usr/lib/$(ARCH64)/llib-ldoor.ln \ target=../../../lib/$(ARCH64)/llib-ldoor.ln link path=usr/lib/$(ARCH64)/llib-lefi.ln \ target=../../../lib/$(ARCH64)/llib-lefi.ln -link path=usr/lib/$(ARCH64)/llib-lelf.ln \ - target=../../../lib/$(ARCH64)/llib-lelf.ln $(i386_ONLY)link path=usr/lib/$(ARCH64)/llib-lfdisk.ln \ target=../../../lib/$(ARCH64)/llib-lfdisk.ln link path=usr/lib/$(ARCH64)/llib-lgen.ln \ @@ -428,8 +412,6 @@ link path=usr/lib/$(ARCH64)/llib-lrpcsvc.ln \ target=../../../lib/$(ARCH64)/llib-lrpcsvc.ln link path=usr/lib/$(ARCH64)/llib-lrt.ln \ target=../../../lib/$(ARCH64)/llib-lrt.ln -link path=usr/lib/$(ARCH64)/llib-lrtld_db.ln \ - target=../../../lib/$(ARCH64)/llib-lrtld_db.ln link path=usr/lib/$(ARCH64)/llib-lscf.ln \ target=../../../lib/$(ARCH64)/llib-lscf.ln link path=usr/lib/$(ARCH64)/llib-lsec.ln \ @@ -482,14 +464,10 @@ link path=usr/lib/llib-ldevid target=../../lib/llib-ldevid link path=usr/lib/llib-ldevid.ln target=../../lib/llib-ldevid.ln link path=usr/lib/llib-ldevinfo target=../../lib/llib-ldevinfo link path=usr/lib/llib-ldevinfo.ln target=../../lib/llib-ldevinfo.ln -link path=usr/lib/llib-ldl target=../../lib/llib-ldl -link path=usr/lib/llib-ldl.ln target=../../lib/llib-ldl.ln link path=usr/lib/llib-ldoor target=../../lib/llib-ldoor link path=usr/lib/llib-ldoor.ln target=../../lib/llib-ldoor.ln link path=usr/lib/llib-lefi target=../../lib/llib-lefi link path=usr/lib/llib-lefi.ln target=../../lib/llib-lefi.ln -link path=usr/lib/llib-lelf target=../../lib/llib-lelf -link path=usr/lib/llib-lelf.ln target=../../lib/llib-lelf.ln $(i386_ONLY)link path=usr/lib/llib-lfdisk target=../../lib/llib-lfdisk $(i386_ONLY)link path=usr/lib/llib-lfdisk.ln target=../../lib/llib-lfdisk.ln link path=usr/lib/llib-lgen target=../../lib/llib-lgen @@ -516,8 +494,6 @@ link path=usr/lib/llib-lrpcsvc target=../../lib/llib-lrpcsvc link path=usr/lib/llib-lrpcsvc.ln target=../../lib/llib-lrpcsvc.ln link path=usr/lib/llib-lrt target=../../lib/llib-lrt link path=usr/lib/llib-lrt.ln target=../../lib/llib-lrt.ln -link path=usr/lib/llib-lrtld_db target=../../lib/llib-lrtld_db -link path=usr/lib/llib-lrtld_db.ln target=../../lib/llib-lrtld_db.ln link path=usr/lib/llib-lscf target=../../lib/llib-lscf link path=usr/lib/llib-lscf.ln target=../../lib/llib-lscf.ln link path=usr/lib/llib-lsec target=../../lib/llib-lsec diff --git a/usr/src/pkg/manifests/developer-object-file.mf b/usr/src/pkg/manifests/developer-object-file.mf index cfd7e34fa0..5519e67d93 100644 --- a/usr/src/pkg/manifests/developer-object-file.mf +++ b/usr/src/pkg/manifests/developer-object-file.mf @@ -21,6 +21,7 @@ # # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # set name=pkg.fmri value=pkg:/developer/object-file@$(PKGVERS) @@ -71,8 +72,6 @@ file path=usr/bin/symorder mode=0555 file path=usr/bin/tsort mode=0555 file path=usr/bin/unifdef mode=0555 file path=usr/bin/yacc mode=0555 -file path=usr/lib/$(ARCH64)/llib-ll.ln -file path=usr/lib/$(ARCH64)/llib-ly.ln file path=usr/lib/elfedit/$(ARCH64)/cap.so file path=usr/lib/elfedit/$(ARCH64)/dyn.so file path=usr/lib/elfedit/$(ARCH64)/ehdr.so @@ -89,10 +88,6 @@ file path=usr/lib/elfedit/shdr.so file path=usr/lib/elfedit/str.so file path=usr/lib/elfedit/sym.so file path=usr/lib/elfedit/syminfo.so -file path=usr/lib/llib-ll -file path=usr/lib/llib-ll.ln -file path=usr/lib/llib-ly -file path=usr/lib/llib-ly.ln file path=usr/share/lib/ccs/gprof.callg.blurb mode=0444 file path=usr/share/lib/ccs/gprof.flat.blurb mode=0444 file path=usr/share/lib/ccs/nceucform @@ -155,8 +150,6 @@ link path=usr/ccs/bin/tsort target=../../bin/tsort link path=usr/ccs/bin/unifdef target=../../bin/unifdef link path=usr/ccs/bin/yacc target=../../bin/yacc link path=usr/ccs/bin/yaccpar target=../../share/lib/ccs/yaccpar -link path=usr/ccs/lib/llib-ll.ln target=../../lib/llib-ll.ln -link path=usr/ccs/lib/llib-ly.ln target=../../lib/llib-ly.ln link path=usr/lib/elfedit/32 target=. link path=usr/lib/elfedit/64 target=$(ARCH64) depend fmri=developer/macro/cpp type=require diff --git a/usr/src/pkg/manifests/system-test-utiltest.mf b/usr/src/pkg/manifests/system-test-utiltest.mf index 7039522558..7e55893474 100644 --- a/usr/src/pkg/manifests/system-test-utiltest.mf +++ b/usr/src/pkg/manifests/system-test-utiltest.mf @@ -1237,8 +1237,6 @@ file path=opt/util-tests/tests/dis/i386/tst.fence.s mode=0444 file path=opt/util-tests/tests/dis/i386/tst.msr.out mode=0444 file path=opt/util-tests/tests/dis/i386/tst.msr.s mode=0444 file path=opt/util-tests/tests/dis/i386/tst.mwait.out mode=0444 -file path=opt/util-tests/tests/dis/i386/tst.mwait.out mode=0444 -file path=opt/util-tests/tests/dis/i386/tst.mwait.s mode=0444 file path=opt/util-tests/tests/dis/i386/tst.mwait.s mode=0444 file path=opt/util-tests/tests/dis/i386/tst.random.out mode=0444 file path=opt/util-tests/tests/dis/i386/tst.random.s mode=0444 diff --git a/usr/src/tools/cw/Makefile b/usr/src/tools/cw/Makefile index e5100189d2..00099cb2e5 100644 --- a/usr/src/tools/cw/Makefile +++ b/usr/src/tools/cw/Makefile @@ -49,6 +49,7 @@ $(__GNUC)LDLIBS += -lc $(__GNUC)LDFLAGS= $(MAPFILE.NES:%=-Wl,-M%) $(ROOTONBLDMAN1ONBLDFILES) := FILEMODE= 644 +CSTD= $(CSTD_GNU99) # Assume we don't have the install.bin available yet INS.file= $(RM) $@; $(CP) $< $(@D); $(CHMOD) $(FILEMODE) $@ diff --git a/usr/src/tools/cw/cw.1onbld b/usr/src/tools/cw/cw.1onbld index da3f224cd2..62800bb727 100644 --- a/usr/src/tools/cw/cw.1onbld +++ b/usr/src/tools/cw/cw.1onbld @@ -137,11 +137,10 @@ will invoke each shadow compiler, with the outputs modified (as well as any translation for compiler style) as follows: .Bl -enum .It -If neither of -.Fl c , -.Fl S -appears in the argument list (that is, linking is attempted or only the -pre-processor is invoked), the shadow compilers will not be invoked. +If +.Nm cw +is invoked to link-edit without compilation (the input files are all objects), +the shadow compiler is not invoked. .It If the .Fl o Ar filename diff --git a/usr/src/tools/cw/cw.c b/usr/src/tools/cw/cw.c index 7806b50626..3113c79511 100644 --- a/usr/src/tools/cw/cw.c +++ b/usr/src/tools/cw/cw.c @@ -39,7 +39,7 @@ */ /* If you modify this file, you must increment CW_VERSION */ -#define CW_VERSION "3.0" +#define CW_VERSION "4.0" /* * -# Verbose mode @@ -217,7 +217,6 @@ * -xCC ignore * -xchip=<c> table * -xcode=<c> table - * -xdebugformat=<format> ignore (always use dwarf-2 for gcc) * -xcrossfile[=<n>] ignore * -xe error * -xF error @@ -262,6 +261,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <dirent.h> #include <sys/param.h> #include <sys/stat.h> @@ -311,7 +311,7 @@ typedef struct cw_ictx { int i_oldargc; char **i_oldargv; pid_t i_pid; - char i_discard[MAXPATHLEN]; + char *i_tmpdir; char *i_stderr; } cw_ictx_t; @@ -556,6 +556,65 @@ xlate(struct aelist *h, const char *xarg, const char **table) } } +/* + * The compiler wants the output file to end in appropriate extension. If + * we're generating a name from whole cloth (path == NULL), we assume that + * extension to be .o, otherwise we match the extension of the caller. + */ +static char * +discard_file_name(cw_ictx_t *ctx, const char *path) +{ + char *ret, *ext; + char tmpl[] = "cwXXXXXX"; + + if (path == NULL) { + ext = ".o"; + } else { + ext = strrchr(path, '.'); + } + + /* + * We need absolute control over where the temporary file goes, since + * we rely on it for cleanup so tempnam(3C) and tmpnam(3C) are + * inappropriate (they use TMPDIR, preferentially). + * + * mkstemp(3C) doesn't actually help us, since the temporary file + * isn't used by us, only its name. + */ + if (mktemp(tmpl) == NULL) + nomem(); + + (void) asprintf(&ret, "%s/%s%s", ctx->i_tmpdir, tmpl, + (ext != NULL) ? ext : ""); + + if (ret == NULL) + nomem(); + + return (ret); +} + +static boolean_t +is_source_file(const char *path) +{ + char *ext = strrchr(path, '.'); + + if ((ext == NULL) || ((ext + 1) == '\0')) + return (B_FALSE); + + ext += 1; + + if ((strcasecmp(ext, "c") == 0) || + (strcmp(ext, "cc") == 0) || + (strcmp(ext, "i") == 0) || + (strcasecmp(ext, "s") == 0) || + (strcmp(ext, "cpp") == 0)) { + return (B_TRUE); + } + + return (B_FALSE); +} + + static void do_gcc(cw_ictx_t *ctx) { @@ -565,7 +624,7 @@ do_gcc(cw_ictx_t *ctx) cw_op_t op = CW_O_LINK; char *model = NULL; char *nameflag; - int mflag = 0; + int mflag = 0; if (ctx->i_flags & CW_F_PROG) { newae(ctx->i_ae, "--version"); @@ -621,10 +680,7 @@ do_gcc(cw_ictx_t *ctx) strcmp(arg + arglen - 3, ".il") == 0) continue; - if (!in_output && arglen > 2 && - arg[arglen - 2] == '.' && - (arg[arglen - 1] == 'S' || arg[arglen - 1] == 's' || - arg[arglen - 1] == 'c' || arg[arglen - 1] == 'i')) + if (!in_output && is_source_file(arg)) c_files++; /* @@ -633,10 +689,11 @@ do_gcc(cw_ictx_t *ctx) * output is always discarded for the secondary * compiler. */ - if ((ctx->i_flags & CW_F_SHADOW) && in_output) - newae(ctx->i_ae, ctx->i_discard); - else + if ((ctx->i_flags & CW_F_SHADOW) && in_output) { + newae(ctx->i_ae, discard_file_name(ctx, arg)); + } else { newae(ctx->i_ae, arg); + } in_output = 0; continue; } @@ -704,9 +761,6 @@ do_gcc(cw_ictx_t *ctx) } error(arg); break; - case 'g': - newae(ctx->i_ae, "-gdwarf-2"); - break; case 'E': if (arglen == 1) { newae(ctx->i_ae, "-xc"); @@ -734,6 +788,7 @@ do_gcc(cw_ictx_t *ctx) error(arg); break; case 'A': + case 'g': case 'h': case 'I': case 'i': @@ -752,7 +807,7 @@ do_gcc(cw_ictx_t *ctx) newae(ctx->i_ae, arg); } else if (ctx->i_flags & CW_F_SHADOW) { newae(ctx->i_ae, "-o"); - newae(ctx->i_ae, ctx->i_discard); + newae(ctx->i_ae, discard_file_name(ctx, arg)); } else { newae(ctx->i_ae, arg); } @@ -1047,11 +1102,6 @@ do_gcc(cw_ictx_t *ctx) break; error(arg); break; - case 'd': - if (strncmp(arg, "-xdebugformat=", 14) == 0) - break; - error(arg); - break; case 'F': /* * Compile for mapfile reordering, or unused @@ -1190,8 +1240,16 @@ do_gcc(cw_ictx_t *ctx) free(nameflag); - if (c_files > 1 && (ctx->i_flags & CW_F_SHADOW) && - op != CW_O_PREPROCESS) { + /* + * When compiling multiple source files in a single invocation some + * compilers output objects into the current directory with + * predictable and conventional names. + * + * We prevent any attempt to compile multiple files at once so that + * any such objects created by a shadow can't escape into a later + * link-edit. + */ + if (c_files > 1 && op != CW_O_PREPROCESS) { errx(2, "multiple source files are " "allowed only with -E or -P"); } @@ -1259,9 +1317,12 @@ do_gcc(cw_ictx_t *ctx) exit(2); } - if ((op == CW_O_LINK || op == CW_O_PREPROCESS) && - (ctx->i_flags & CW_F_SHADOW)) - exit(0); + if (ctx->i_flags & CW_F_SHADOW) { + if (op == CW_O_PREPROCESS) + exit(0); + else if (op == CW_O_LINK && c_files == 0) + exit(0); + } if (model != NULL) newae(ctx->i_ae, model); @@ -1269,7 +1330,7 @@ do_gcc(cw_ictx_t *ctx) newae(ctx->i_ae, "-lc"); if (!seen_o && (ctx->i_flags & CW_F_SHADOW)) { newae(ctx->i_ae, "-o"); - newae(ctx->i_ae, ctx->i_discard); + newae(ctx->i_ae, discard_file_name(ctx, NULL)); } } @@ -1302,7 +1363,7 @@ do_smatch(cw_ictx_t *ctx) static void do_cc(cw_ictx_t *ctx) { - int in_output = 0, seen_o = 0; + int in_output = 0, seen_o = 0, c_files = 0; cw_op_t op = CW_O_LINK; char *nameflag; @@ -1323,11 +1384,14 @@ do_cc(cw_ictx_t *ctx) } if (*arg != '-') { + if (!in_output && is_source_file(arg)) + c_files++; + if (in_output == 0 || !(ctx->i_flags & CW_F_SHADOW)) { newae(ctx->i_ae, arg); } else { in_output = 0; - newae(ctx->i_ae, ctx->i_discard); + newae(ctx->i_ae, discard_file_name(ctx, arg)); } continue; } @@ -1351,7 +1415,7 @@ do_cc(cw_ictx_t *ctx) newae(ctx->i_ae, arg); } else if (ctx->i_flags & CW_F_SHADOW) { newae(ctx->i_ae, "-o"); - newae(ctx->i_ae, ctx->i_discard); + newae(ctx->i_ae, discard_file_name(ctx, arg)); } else { newae(ctx->i_ae, arg); } @@ -1374,13 +1438,22 @@ do_cc(cw_ictx_t *ctx) free(nameflag); - if ((op == CW_O_LINK || op == CW_O_PREPROCESS) && - (ctx->i_flags & CW_F_SHADOW)) - exit(0); + /* See the comment on this same code in do_gcc() */ + if (c_files > 1 && op != CW_O_PREPROCESS) { + errx(2, "multiple source files are " + "allowed only with -E or -P"); + } + + if (ctx->i_flags & CW_F_SHADOW) { + if (op == CW_O_PREPROCESS) + exit(0); + else if (op == CW_O_LINK && c_files == 0) + exit(0); + } if (!seen_o && (ctx->i_flags & CW_F_SHADOW)) { newae(ctx->i_ae, "-o"); - newae(ctx->i_ae, ctx->i_discard); + newae(ctx->i_ae, discard_file_name(ctx, NULL)); } } @@ -1491,8 +1564,6 @@ reap(cw_ictx_t *ctx) } } while (!WIFEXITED(status) && !WIFSIGNALED(status)); - (void) unlink(ctx->i_discard); - if (stat(ctx->i_stderr, &s) < 0) { warn("stat failed on child cleanup"); return (-1); @@ -1522,21 +1593,7 @@ reap(cw_ictx_t *ctx) static int exec_ctx(cw_ictx_t *ctx, int block) { - char *file; - - /* - * To avoid offending cc's sensibilities, the name of its output - * file must end in '.o'. - */ - if ((file = tempnam(NULL, ".cw")) == NULL) { - nomem(); - return (-1); - } - (void) strlcpy(ctx->i_discard, file, MAXPATHLEN); - (void) strlcat(ctx->i_discard, ".o", MAXPATHLEN); - free(file); - - if ((ctx->i_stderr = tempnam(NULL, ".cw")) == NULL) { + if ((ctx->i_stderr = tempnam(ctx->i_tmpdir, "cw")) == NULL) { nomem(); return (-1); } @@ -1607,6 +1664,49 @@ parse_compiler(const char *spec, cw_compiler_t *compiler) errx(1, "Excess tokens in compiler: %s", spec); } +static void +cleanup(cw_ictx_t *ctx) +{ + DIR *dirp; + struct dirent *dp; + char buf[MAXPATHLEN]; + + if ((dirp = opendir(ctx->i_tmpdir)) == NULL) { + if (errno != ENOENT) { + err(1, "couldn't open temp directory: %s", + ctx->i_tmpdir); + } else { + return; + } + } + + errno = 0; + while ((dp = readdir(dirp)) != NULL) { + (void) snprintf(buf, MAXPATHLEN, "%s/%s", ctx->i_tmpdir, + dp->d_name); + + if (strcmp(dp->d_name, ".") == 0 || + strcmp(dp->d_name, "..") == 0) { + continue; + } + + if (unlink(buf) == -1) + err(1, "failed to unlink temp file: %s", dp->d_name); + errno = 0; + } + + if (errno != 0) { + err(1, "failed to read temporary directory: %s", + ctx->i_tmpdir); + } + + (void) closedir(dirp); + if (rmdir(ctx->i_tmpdir) != 0) { + err(1, "failed to unlink temporary directory: %s", + ctx->i_tmpdir); + } +} + int main(int argc, char **argv) { @@ -1621,6 +1721,7 @@ main(int argc, char **argv) boolean_t Cflg = B_FALSE; boolean_t cflg = B_FALSE; boolean_t nflg = B_FALSE; + char *tmpdir; cw_ictx_t *main_ctx; @@ -1708,6 +1809,16 @@ main(int argc, char **argv) do_serial = 1; } + tmpdir = getenv("TMPDIR"); + if (tmpdir == NULL) + tmpdir = "/tmp"; + + if (asprintf(&main_ctx->i_tmpdir, "%s/cw.XXXXXX", tmpdir) == -1) + nomem(); + + if ((main_ctx->i_tmpdir = mkdtemp(main_ctx->i_tmpdir)) == NULL) + errx(1, "failed to create temporary directory"); + ret |= exec_ctx(main_ctx, do_serial); for (int i = 0; i < nshadows; i++) { @@ -1717,7 +1828,7 @@ main(int argc, char **argv) if ((shadow_ctx = newictx()) == NULL) nomem(); - memcpy(shadow_ctx, main_ctx, sizeof (cw_ictx_t)); + (void) memcpy(shadow_ctx, main_ctx, sizeof (cw_ictx_t)); shadow_ctx->i_flags |= CW_F_SHADOW; shadow_ctx->i_compiler = &shadows[i]; @@ -1739,5 +1850,6 @@ main(int argc, char **argv) } } + cleanup(main_ctx); return (ret); } diff --git a/usr/src/uts/common/fs/fem.c b/usr/src/uts/common/fs/fem.c index 5f524def30..50633859ce 100644 --- a/usr/src/uts/common/fs/fem.c +++ b/usr/src/uts/common/fs/fem.c @@ -192,7 +192,7 @@ static struct fs_operation_def fem_guard_ops[] = { { VFSNAME_##name, offsetof(fsem_t, fsemop_##member), NULL, fsem_err } static fs_operation_trans_def_t fsem_opdef[] = { - _FSEMOPDEF(MOUNT, mount), + _FSEMOPDEF(MOUNT, mount), _FSEMOPDEF(UNMOUNT, unmount), _FSEMOPDEF(ROOT, root), _FSEMOPDEF(STATVFS, statvfs), @@ -208,7 +208,7 @@ static fs_operation_trans_def_t fsem_opdef[] = { { VFSNAME_##name, (femop_t *)fsem_err } static struct fs_operation_def fsem_guard_ops[] = { - _FSEMGUARD(MOUNT, mount), + _FSEMGUARD(MOUNT, mount), _FSEMGUARD(UNMOUNT, unmount), _FSEMGUARD(ROOT, root), _FSEMGUARD(STATVFS, statvfs), @@ -993,7 +993,7 @@ vhead_open(vnode_t **vpp, int mode, cred_t *cr, caller_context_t *ct) static int vhead_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1020,7 +1020,7 @@ vhead_close(vnode_t *vp, int flag, int count, offset_t offset, cred_t *cr, static int vhead_read(vnode_t *vp, uio_t *uiop, int ioflag, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1047,7 +1047,7 @@ vhead_read(vnode_t *vp, uio_t *uiop, int ioflag, cred_t *cr, static int vhead_write(vnode_t *vp, uio_t *uiop, int ioflag, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1074,7 +1074,7 @@ vhead_write(vnode_t *vp, uio_t *uiop, int ioflag, cred_t *cr, static int vhead_ioctl(vnode_t *vp, int cmd, intptr_t arg, int flag, cred_t *cr, - int *rvalp, caller_context_t *ct) + int *rvalp, caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1101,7 +1101,7 @@ vhead_ioctl(vnode_t *vp, int cmd, intptr_t arg, int flag, cred_t *cr, static int vhead_setfl(vnode_t *vp, int oflags, int nflags, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1128,7 +1128,7 @@ vhead_setfl(vnode_t *vp, int oflags, int nflags, cred_t *cr, static int vhead_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1156,7 +1156,7 @@ vhead_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr, static int vhead_setattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1184,7 +1184,7 @@ vhead_setattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr, static int vhead_access(vnode_t *vp, int mode, int flags, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1212,8 +1212,8 @@ vhead_access(vnode_t *vp, int mode, int flags, cred_t *cr, static int vhead_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, pathname_t *pnp, - int flags, vnode_t *rdir, cred_t *cr, caller_context_t *ct, - int *direntflags, pathname_t *realpnp) + int flags, vnode_t *rdir, cred_t *cr, caller_context_t *ct, + int *direntflags, pathname_t *realpnp) { femarg_t farg; struct fem_list *femsp; @@ -1243,8 +1243,8 @@ vhead_lookup(vnode_t *dvp, char *nm, vnode_t **vpp, pathname_t *pnp, static int vhead_create(vnode_t *dvp, char *name, vattr_t *vap, vcexcl_t excl, - int mode, vnode_t **vpp, cred_t *cr, int flag, caller_context_t *ct, - vsecattr_t *vsecp) + int mode, vnode_t **vpp, cred_t *cr, int flag, caller_context_t *ct, + vsecattr_t *vsecp) { femarg_t farg; struct fem_list *femsp; @@ -1274,7 +1274,7 @@ vhead_create(vnode_t *dvp, char *name, vattr_t *vap, vcexcl_t excl, static int vhead_remove(vnode_t *dvp, char *nm, cred_t *cr, caller_context_t *ct, - int flags) + int flags) { femarg_t farg; struct fem_list *femsp; @@ -1302,7 +1302,7 @@ vhead_remove(vnode_t *dvp, char *nm, cred_t *cr, caller_context_t *ct, static int vhead_link(vnode_t *tdvp, vnode_t *svp, char *tnm, cred_t *cr, - caller_context_t *ct, int flags) + caller_context_t *ct, int flags) { femarg_t farg; struct fem_list *femsp; @@ -1329,7 +1329,7 @@ vhead_link(vnode_t *tdvp, vnode_t *svp, char *tnm, cred_t *cr, static int vhead_rename(vnode_t *sdvp, char *snm, vnode_t *tdvp, char *tnm, - cred_t *cr, caller_context_t *ct, int flags) + cred_t *cr, caller_context_t *ct, int flags) { femarg_t farg; struct fem_list *femsp; @@ -1357,7 +1357,7 @@ vhead_rename(vnode_t *sdvp, char *snm, vnode_t *tdvp, char *tnm, static int vhead_mkdir(vnode_t *dvp, char *dirname, vattr_t *vap, vnode_t **vpp, - cred_t *cr, caller_context_t *ct, int flags, vsecattr_t *vsecp) + cred_t *cr, caller_context_t *ct, int flags, vsecattr_t *vsecp) { femarg_t farg; struct fem_list *femsp; @@ -1384,7 +1384,7 @@ vhead_mkdir(vnode_t *dvp, char *dirname, vattr_t *vap, vnode_t **vpp, static int vhead_rmdir(vnode_t *dvp, char *nm, vnode_t *cdir, cred_t *cr, - caller_context_t *ct, int flags) + caller_context_t *ct, int flags) { femarg_t farg; struct fem_list *femsp; @@ -1411,7 +1411,7 @@ vhead_rmdir(vnode_t *dvp, char *nm, vnode_t *cdir, cred_t *cr, static int vhead_readdir(vnode_t *vp, uio_t *uiop, cred_t *cr, int *eofp, - caller_context_t *ct, int flags) + caller_context_t *ct, int flags) { femarg_t farg; struct fem_list *femsp; @@ -1439,7 +1439,7 @@ vhead_readdir(vnode_t *vp, uio_t *uiop, cred_t *cr, int *eofp, static int vhead_symlink(vnode_t *dvp, char *linkname, vattr_t *vap, char *target, - cred_t *cr, caller_context_t *ct, int flags) + cred_t *cr, caller_context_t *ct, int flags) { femarg_t farg; struct fem_list *femsp; @@ -1518,7 +1518,7 @@ vhead_fsync(vnode_t *vp, int syncflag, cred_t *cr, caller_context_t *ct) return (errc); } -static void +static int vhead_inactive(vnode_t *vp, cred_t *cr, caller_context_t *ct) { femarg_t farg; @@ -1541,6 +1541,7 @@ vhead_inactive(vnode_t *vp, cred_t *cr, caller_context_t *ct) (*func)(arg0, cr, ct); fem_release(femsp); } + return (0); } static int @@ -1596,7 +1597,7 @@ vhead_rwlock(vnode_t *vp, int write_lock, caller_context_t *ct) return (errc); } -static void +static int vhead_rwunlock(vnode_t *vp, int write_lock, caller_context_t *ct) { femarg_t farg; @@ -1619,6 +1620,7 @@ vhead_rwunlock(vnode_t *vp, int write_lock, caller_context_t *ct) (*func)(arg0, write_lock, ct); fem_release(femsp); } + return (0); } static int @@ -1675,8 +1677,8 @@ vhead_cmp(vnode_t *vp1, vnode_t *vp2, caller_context_t *ct) static int vhead_frlock(vnode_t *vp, int cmd, struct flock64 *bfp, int flag, - offset_t offset, struct flk_callback *flk_cbp, cred_t *cr, - caller_context_t *ct) + offset_t offset, struct flk_callback *flk_cbp, cred_t *cr, + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1704,7 +1706,7 @@ vhead_frlock(vnode_t *vp, int cmd, struct flock64 *bfp, int flag, static int vhead_space(vnode_t *vp, int cmd, struct flock64 *bfp, int flag, - offset_t offset, cred_t *cr, caller_context_t *ct) + offset_t offset, cred_t *cr, caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1758,8 +1760,8 @@ vhead_realvp(vnode_t *vp, vnode_t **vpp, caller_context_t *ct) static int vhead_getpage(vnode_t *vp, offset_t off, size_t len, uint_t *protp, - struct page **plarr, size_t plsz, struct seg *seg, caddr_t addr, - enum seg_rw rw, cred_t *cr, caller_context_t *ct) + struct page **plarr, size_t plsz, struct seg *seg, caddr_t addr, + enum seg_rw rw, cred_t *cr, caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1789,7 +1791,7 @@ vhead_getpage(vnode_t *vp, offset_t off, size_t len, uint_t *protp, static int vhead_putpage(vnode_t *vp, offset_t off, size_t len, int flags, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1817,8 +1819,8 @@ vhead_putpage(vnode_t *vp, offset_t off, size_t len, int flags, cred_t *cr, static int vhead_map(vnode_t *vp, offset_t off, struct as *as, caddr_t *addrp, - size_t len, uchar_t prot, uchar_t maxprot, uint_t flags, - cred_t *cr, caller_context_t *ct) + size_t len, uchar_t prot, uchar_t maxprot, uint_t flags, + cred_t *cr, caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1847,8 +1849,8 @@ vhead_map(vnode_t *vp, offset_t off, struct as *as, caddr_t *addrp, static int vhead_addmap(vnode_t *vp, offset_t off, struct as *as, caddr_t addr, - size_t len, uchar_t prot, uchar_t maxprot, uint_t flags, - cred_t *cr, caller_context_t *ct) + size_t len, uchar_t prot, uchar_t maxprot, uint_t flags, + cred_t *cr, caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1878,8 +1880,8 @@ vhead_addmap(vnode_t *vp, offset_t off, struct as *as, caddr_t addr, static int vhead_delmap(vnode_t *vp, offset_t off, struct as *as, caddr_t addr, - size_t len, uint_t prot, uint_t maxprot, uint_t flags, cred_t *cr, - caller_context_t *ct) + size_t len, uint_t prot, uint_t maxprot, uint_t flags, cred_t *cr, + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1909,7 +1911,7 @@ vhead_delmap(vnode_t *vp, offset_t off, struct as *as, caddr_t addr, static int vhead_poll(vnode_t *vp, short events, int anyyet, short *reventsp, - struct pollhead **phpp, caller_context_t *ct) + struct pollhead **phpp, caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1963,7 +1965,7 @@ vhead_dump(vnode_t *vp, caddr_t addr, offset_t lbdn, offset_t dblks, static int vhead_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -1991,7 +1993,7 @@ vhead_pathconf(vnode_t *vp, int cmd, ulong_t *valp, cred_t *cr, static int vhead_pageio(vnode_t *vp, struct page *pp, u_offset_t io_off, - size_t io_len, int flags, cred_t *cr, caller_context_t *ct) + size_t io_len, int flags, cred_t *cr, caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -2044,9 +2046,9 @@ vhead_dumpctl(vnode_t *vp, int action, offset_t *blkp, caller_context_t *ct) return (errc); } -static void +static int vhead_dispose(vnode_t *vp, struct page *pp, int flag, int dn, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -2068,11 +2070,12 @@ vhead_dispose(vnode_t *vp, struct page *pp, int flag, int dn, cred_t *cr, (*func)(arg0, pp, flag, dn, cr, ct); fem_release(femsp); } + return (0); } static int vhead_setsecattr(vnode_t *vp, vsecattr_t *vsap, int flag, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -2100,7 +2103,7 @@ vhead_setsecattr(vnode_t *vp, vsecattr_t *vsap, int flag, cred_t *cr, static int vhead_getsecattr(vnode_t *vp, vsecattr_t *vsap, int flag, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -2128,7 +2131,7 @@ vhead_getsecattr(vnode_t *vp, vsecattr_t *vsap, int flag, cred_t *cr, static int vhead_shrlock(vnode_t *vp, int cmd, struct shrlock *shr, int flag, - cred_t *cr, caller_context_t *ct) + cred_t *cr, caller_context_t *ct) { femarg_t farg; struct fem_list *femsp; @@ -2430,7 +2433,7 @@ fshead_mountroot(vfs_t *vfsp, enum whymountroot reason) return (errc); } -static void +static int fshead_freevfs(vfs_t *vfsp) { fsemarg_t farg; @@ -2454,6 +2457,7 @@ fshead_freevfs(vfs_t *vfsp) (*func)(arg0); fem_release(femsp); } + return (0); } static int @@ -2641,7 +2645,7 @@ vnext_open(femarg_t *vf, int mode, cred_t *cr, caller_context_t *ct) int vnext_close(femarg_t *vf, int flag, int count, offset_t offset, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -2656,7 +2660,7 @@ vnext_close(femarg_t *vf, int flag, int count, offset_t offset, cred_t *cr, int vnext_read(femarg_t *vf, uio_t *uiop, int ioflag, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -2671,7 +2675,7 @@ vnext_read(femarg_t *vf, uio_t *uiop, int ioflag, cred_t *cr, int vnext_write(femarg_t *vf, uio_t *uiop, int ioflag, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -2686,7 +2690,7 @@ vnext_write(femarg_t *vf, uio_t *uiop, int ioflag, cred_t *cr, int vnext_ioctl(femarg_t *vf, int cmd, intptr_t arg, int flag, cred_t *cr, - int *rvalp, caller_context_t *ct) + int *rvalp, caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -2701,7 +2705,7 @@ vnext_ioctl(femarg_t *vf, int cmd, intptr_t arg, int flag, cred_t *cr, int vnext_setfl(femarg_t *vf, int oflags, int nflags, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -2716,7 +2720,7 @@ vnext_setfl(femarg_t *vf, int oflags, int nflags, cred_t *cr, int vnext_getattr(femarg_t *vf, vattr_t *vap, int flags, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -2731,7 +2735,7 @@ vnext_getattr(femarg_t *vf, vattr_t *vap, int flags, cred_t *cr, int vnext_setattr(femarg_t *vf, vattr_t *vap, int flags, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -2746,7 +2750,7 @@ vnext_setattr(femarg_t *vf, vattr_t *vap, int flags, cred_t *cr, int vnext_access(femarg_t *vf, int mode, int flags, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -2761,8 +2765,8 @@ vnext_access(femarg_t *vf, int mode, int flags, cred_t *cr, int vnext_lookup(femarg_t *vf, char *nm, vnode_t **vpp, pathname_t *pnp, - int flags, vnode_t *rdir, cred_t *cr, caller_context_t *ct, - int *direntflags, pathname_t *realpnp) + int flags, vnode_t *rdir, cred_t *cr, caller_context_t *ct, + int *direntflags, pathname_t *realpnp) { int (*func)() = NULL; void *arg0 = NULL; @@ -2778,8 +2782,8 @@ vnext_lookup(femarg_t *vf, char *nm, vnode_t **vpp, pathname_t *pnp, int vnext_create(femarg_t *vf, char *name, vattr_t *vap, vcexcl_t excl, - int mode, vnode_t **vpp, cred_t *cr, int flag, caller_context_t *ct, - vsecattr_t *vsecp) + int mode, vnode_t **vpp, cred_t *cr, int flag, caller_context_t *ct, + vsecattr_t *vsecp) { int (*func)() = NULL; void *arg0 = NULL; @@ -2795,7 +2799,7 @@ vnext_create(femarg_t *vf, char *name, vattr_t *vap, vcexcl_t excl, int vnext_remove(femarg_t *vf, char *nm, cred_t *cr, caller_context_t *ct, - int flags) + int flags) { int (*func)() = NULL; void *arg0 = NULL; @@ -2810,7 +2814,7 @@ vnext_remove(femarg_t *vf, char *nm, cred_t *cr, caller_context_t *ct, int vnext_link(femarg_t *vf, vnode_t *svp, char *tnm, cred_t *cr, - caller_context_t *ct, int flags) + caller_context_t *ct, int flags) { int (*func)() = NULL; void *arg0 = NULL; @@ -2825,7 +2829,7 @@ vnext_link(femarg_t *vf, vnode_t *svp, char *tnm, cred_t *cr, int vnext_rename(femarg_t *vf, char *snm, vnode_t *tdvp, char *tnm, cred_t *cr, - caller_context_t *ct, int flags) + caller_context_t *ct, int flags) { int (*func)() = NULL; void *arg0 = NULL; @@ -2840,7 +2844,7 @@ vnext_rename(femarg_t *vf, char *snm, vnode_t *tdvp, char *tnm, cred_t *cr, int vnext_mkdir(femarg_t *vf, char *dirname, vattr_t *vap, vnode_t **vpp, - cred_t *cr, caller_context_t *ct, int flags, vsecattr_t *vsecp) + cred_t *cr, caller_context_t *ct, int flags, vsecattr_t *vsecp) { int (*func)() = NULL; void *arg0 = NULL; @@ -2855,7 +2859,7 @@ vnext_mkdir(femarg_t *vf, char *dirname, vattr_t *vap, vnode_t **vpp, int vnext_rmdir(femarg_t *vf, char *nm, vnode_t *cdir, cred_t *cr, - caller_context_t *ct, int flags) + caller_context_t *ct, int flags) { int (*func)() = NULL; void *arg0 = NULL; @@ -2870,7 +2874,7 @@ vnext_rmdir(femarg_t *vf, char *nm, vnode_t *cdir, cred_t *cr, int vnext_readdir(femarg_t *vf, uio_t *uiop, cred_t *cr, int *eofp, - caller_context_t *ct, int flags) + caller_context_t *ct, int flags) { int (*func)() = NULL; void *arg0 = NULL; @@ -2885,7 +2889,7 @@ vnext_readdir(femarg_t *vf, uio_t *uiop, cred_t *cr, int *eofp, int vnext_symlink(femarg_t *vf, char *linkname, vattr_t *vap, char *target, - cred_t *cr, caller_context_t *ct, int flags) + cred_t *cr, caller_context_t *ct, int flags) { int (*func)() = NULL; void *arg0 = NULL; @@ -3012,8 +3016,8 @@ vnext_cmp(femarg_t *vf, vnode_t *vp2, caller_context_t *ct) int vnext_frlock(femarg_t *vf, int cmd, struct flock64 *bfp, int flag, - offset_t offset, struct flk_callback *flk_cbp, cred_t *cr, - caller_context_t *ct) + offset_t offset, struct flk_callback *flk_cbp, cred_t *cr, + caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3028,7 +3032,7 @@ vnext_frlock(femarg_t *vf, int cmd, struct flock64 *bfp, int flag, int vnext_space(femarg_t *vf, int cmd, struct flock64 *bfp, int flag, - offset_t offset, cred_t *cr, caller_context_t *ct) + offset_t offset, cred_t *cr, caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3057,8 +3061,8 @@ vnext_realvp(femarg_t *vf, vnode_t **vpp, caller_context_t *ct) int vnext_getpage(femarg_t *vf, offset_t off, size_t len, uint_t *protp, - struct page **plarr, size_t plsz, struct seg *seg, caddr_t addr, - enum seg_rw rw, cred_t *cr, caller_context_t *ct) + struct page **plarr, size_t plsz, struct seg *seg, caddr_t addr, + enum seg_rw rw, cred_t *cr, caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3074,7 +3078,7 @@ vnext_getpage(femarg_t *vf, offset_t off, size_t len, uint_t *protp, int vnext_putpage(femarg_t *vf, offset_t off, size_t len, int flags, - cred_t *cr, caller_context_t *ct) + cred_t *cr, caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3089,8 +3093,8 @@ vnext_putpage(femarg_t *vf, offset_t off, size_t len, int flags, int vnext_map(femarg_t *vf, offset_t off, struct as *as, caddr_t *addrp, - size_t len, uchar_t prot, uchar_t maxprot, uint_t flags, - cred_t *cr, caller_context_t *ct) + size_t len, uchar_t prot, uchar_t maxprot, uint_t flags, + cred_t *cr, caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3106,8 +3110,8 @@ vnext_map(femarg_t *vf, offset_t off, struct as *as, caddr_t *addrp, int vnext_addmap(femarg_t *vf, offset_t off, struct as *as, caddr_t addr, - size_t len, uchar_t prot, uchar_t maxprot, uint_t flags, - cred_t *cr, caller_context_t *ct) + size_t len, uchar_t prot, uchar_t maxprot, uint_t flags, + cred_t *cr, caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3123,8 +3127,8 @@ vnext_addmap(femarg_t *vf, offset_t off, struct as *as, caddr_t addr, int vnext_delmap(femarg_t *vf, offset_t off, struct as *as, caddr_t addr, - size_t len, uint_t prot, uint_t maxprot, uint_t flags, - cred_t *cr, caller_context_t *ct) + size_t len, uint_t prot, uint_t maxprot, uint_t flags, + cred_t *cr, caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3140,7 +3144,7 @@ vnext_delmap(femarg_t *vf, offset_t off, struct as *as, caddr_t addr, int vnext_poll(femarg_t *vf, short events, int anyyet, short *reventsp, - struct pollhead **phpp, caller_context_t *ct) + struct pollhead **phpp, caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3155,7 +3159,7 @@ vnext_poll(femarg_t *vf, short events, int anyyet, short *reventsp, int vnext_dump(femarg_t *vf, caddr_t addr, offset_t lbdn, offset_t dblks, - caller_context_t *ct) + caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3170,7 +3174,7 @@ vnext_dump(femarg_t *vf, caddr_t addr, offset_t lbdn, offset_t dblks, int vnext_pathconf(femarg_t *vf, int cmd, ulong_t *valp, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3185,7 +3189,7 @@ vnext_pathconf(femarg_t *vf, int cmd, ulong_t *valp, cred_t *cr, int vnext_pageio(femarg_t *vf, struct page *pp, u_offset_t io_off, - size_t io_len, int flags, cred_t *cr, caller_context_t *ct) + size_t io_len, int flags, cred_t *cr, caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3214,7 +3218,7 @@ vnext_dumpctl(femarg_t *vf, int action, offset_t *blkp, caller_context_t *ct) void vnext_dispose(femarg_t *vf, struct page *pp, int flag, int dn, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { void (*func)() = NULL; void *arg0 = NULL; @@ -3229,7 +3233,7 @@ vnext_dispose(femarg_t *vf, struct page *pp, int flag, int dn, cred_t *cr, int vnext_setsecattr(femarg_t *vf, vsecattr_t *vsap, int flag, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3244,7 +3248,7 @@ vnext_setsecattr(femarg_t *vf, vsecattr_t *vsap, int flag, cred_t *cr, int vnext_getsecattr(femarg_t *vf, vsecattr_t *vsap, int flag, cred_t *cr, - caller_context_t *ct) + caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3259,7 +3263,7 @@ vnext_getsecattr(femarg_t *vf, vsecattr_t *vsap, int flag, cred_t *cr, int vnext_shrlock(femarg_t *vf, int cmd, struct shrlock *shr, int flag, - cred_t *cr, caller_context_t *ct) + cred_t *cr, caller_context_t *ct) { int (*func)() = NULL; void *arg0 = NULL; @@ -3544,11 +3548,11 @@ fem_dup_list(struct fem_list *orig, struct fem_list *clone) static int fem_push_node( - struct fem_head **hp, - void **baseops, - int type, - struct fem_node *nnode, - femhow_t how) + struct fem_head **hp, + void **baseops, + int type, + struct fem_node *nnode, + femhow_t how) { struct fem_head *hd; struct fem_list *list; @@ -3821,10 +3825,10 @@ fem_remove_node(struct fem_head *fh, void **baseops, void *opset, void *datap) */ static int fem_walk_list( - struct fem_list *sp, - int (*f)(struct fem_node *, void *, void *), - void *mon, - void *arg) + struct fem_list *sp, + int (*f)(struct fem_node *, void *, void *), + void *mon, + void *arg) { int i; @@ -3876,12 +3880,12 @@ fem_create(char *name, const struct fs_operation_def *templ, int fem_install( - vnode_t *vp, /* Vnode on which monitor is being installed */ - fem_t *mon, /* Monitor operations being installed */ - void *arg, /* Opaque data used by monitor */ - femhow_t how, /* Installation control */ - void (*arg_hold)(void *), /* Hold routine for "arg" */ - void (*arg_rele)(void *)) /* Release routine for "arg" */ + vnode_t *vp, /* Vnode on which monitor is being installed */ + fem_t *mon, /* Monitor operations being installed */ + void *arg, /* Opaque data used by monitor */ + femhow_t how, /* Installation control */ + void (*arg_hold)(void *), /* Hold routine for "arg" */ + void (*arg_rele)(void *)) /* Release routine for "arg" */ { int error; struct fem_node nnode; @@ -4025,12 +4029,12 @@ fsem_is_installed(struct vfs *v, fsem_t *mon, void *arg) int fsem_install( - struct vfs *vfsp, /* VFS on which monitor is being installed */ - fsem_t *mon, /* Monitor operations being installed */ - void *arg, /* Opaque data used by monitor */ - femhow_t how, /* Installation control */ - void (*arg_hold)(void *), /* Hold routine for "arg" */ - void (*arg_rele)(void *)) /* Release routine for "arg" */ + struct vfs *vfsp, /* VFS on which monitor is being installed */ + fsem_t *mon, /* Monitor operations being installed */ + void *arg, /* Opaque data used by monitor */ + femhow_t how, /* Installation control */ + void (*arg_hold)(void *), /* Hold routine for "arg" */ + void (*arg_rele)(void *)) /* Release routine for "arg" */ { int error; struct fem_node nnode; diff --git a/usr/src/uts/common/os/cyclic.c b/usr/src/uts/common/os/cyclic.c index 45e13ebeab..316dffc326 100644 --- a/usr/src/uts/common/os/cyclic.c +++ b/usr/src/uts/common/os/cyclic.c @@ -2385,7 +2385,7 @@ cyclic_unconfigure(cpu_t *c) } static int -cyclic_cpu_setup(cpu_setup_t what, int id) +cyclic_cpu_setup(cpu_setup_t what, int id, void *arg __unused) { /* * We are guaranteed that there is still/already an entry in the @@ -3217,7 +3217,7 @@ cyclic_mp_init() } } while ((c = c->cpu_next) != cpu_list); - register_cpu_setup_func((cpu_setup_func_t *)cyclic_cpu_setup, NULL); + register_cpu_setup_func(cyclic_cpu_setup, NULL); mutex_exit(&cpu_lock); } diff --git a/usr/src/uts/common/os/kcpc.c b/usr/src/uts/common/os/kcpc.c index af44c16356..977d243400 100644 --- a/usr/src/uts/common/os/kcpc.c +++ b/usr/src/uts/common/os/kcpc.c @@ -2420,10 +2420,12 @@ kcpc_set_create(kcpc_request_t *reqs, int nreqs, int set_flags, int kmem_flags) * to be preserved, so it is set to NULL. */ static void -kcpc_cpustop_func(boolean_t preserve_context) +kcpc_cpustop_func(uintptr_t arg1, uintptr_t arg2 __unused) { + boolean_t preserve_context; kpreempt_disable(); + preserve_context = (boolean_t)arg1; /* * Someone already stopped this context before us, so there is nothing * to do. @@ -2453,17 +2455,17 @@ kcpc_cpustop_func(boolean_t preserve_context) void kcpc_cpu_stop(cpu_t *cp, boolean_t preserve_context) { - cpu_call(cp, (cpu_call_func_t)kcpc_cpustop_func, - preserve_context, 0); + cpu_call(cp, kcpc_cpustop_func, preserve_context, 0); } /* * Program the context on the current CPU */ static void -kcpc_remoteprogram_func(kcpc_ctx_t *ctx, uintptr_t arg) +kcpc_remoteprogram_func(uintptr_t arg1, uintptr_t arg2) { - boolean_t for_thread = (boolean_t)arg; + kcpc_ctx_t *ctx = (kcpc_ctx_t *)arg1; + boolean_t for_thread = (boolean_t)arg2; ASSERT(ctx != NULL); @@ -2478,7 +2480,7 @@ kcpc_remoteprogram_func(kcpc_ctx_t *ctx, uintptr_t arg) void kcpc_cpu_program(cpu_t *cp, kcpc_ctx_t *ctx) { - cpu_call(cp, (cpu_call_func_t)kcpc_remoteprogram_func, (uintptr_t)ctx, + cpu_call(cp, kcpc_remoteprogram_func, (uintptr_t)ctx, (uintptr_t)B_FALSE); } diff --git a/usr/src/uts/common/pcmcia/cs/cs_stubs.c b/usr/src/uts/common/pcmcia/cs/cs_stubs.c index 1f6dc19492..9bf02d2a2e 100644 --- a/usr/src/uts/common/pcmcia/cs/cs_stubs.c +++ b/usr/src/uts/common/pcmcia/cs/cs_stubs.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * This is the PCMCIA Card Services kernel stubs module. It provides * the various PCMCIA kernel framework entry points. @@ -77,10 +75,10 @@ int cs_stubs_debug = 0; static csfunction_t *cardservices = NULL; static int do_cs_call = 0; -static int cs_no_carservices(void); +static int cs_no_carservices(int32_t, ...); #define CardServices (do_cs_call ? (*cardservices) : \ - ((csfunction_t *)cs_no_carservices)) + (cs_no_carservices)) #ifdef USE_CS_STUBS_MODULE @@ -154,7 +152,7 @@ csx_register_cardservices(cs_register_cardservices_t *rcs) case CS_ENTRY_DEREGISTER: do_cs_call = 0; - cardservices = (csfunction_t *)cs_no_carservices; + cardservices = cs_no_carservices; #ifdef CS_STUBS_DEBUG if (cs_stubs_debug > 2) cmn_err(CE_CONT, @@ -1216,7 +1214,7 @@ csx_SetHandleOffset(acc_handle_t handle, uint32_t offset) } static int -cs_no_carservices() +cs_no_carservices(int32_t arg __unused, ...) { #ifdef CS_STUBS_DEBUG if (cs_stubs_debug > 3) diff --git a/usr/src/uts/common/pcmcia/nexus/pcmcia.c b/usr/src/uts/common/pcmcia/nexus/pcmcia.c index 2256289fa4..3cffb78316 100644 --- a/usr/src/uts/common/pcmcia/nexus/pcmcia.c +++ b/usr/src/uts/common/pcmcia/nexus/pcmcia.c @@ -384,7 +384,7 @@ pcmcia_attach(dev_info_t *dip, anp_t *adapter) mutex_enter(&pcmcia_enum_lock); mutex_enter(&pcmcia_global_lock); if (pcmcia_num_adapters == 0) { - pcmcia_cis_parser = (f_tt *)CISParser; + pcmcia_cis_parser = (f_tt *)(uintptr_t)CISParser; cis_parser = (void *(*)(int, ...)) CISParser; pcmcia_cs_event = (f_tt *)cs_event; cs_socket_services = SocketServices; @@ -1744,7 +1744,7 @@ pcmcia_set_em_handler(int (*handler)(), caddr_t events, int elen, if (mif == NULL) return (ENOSPC); - mif->mif_function = (void (*)())handler; + mif->mif_function = (void (*)())(uintptr_t)handler; bcopy(events, mif->mif_events, elen); mif->mif_id = id; mutex_enter(&pcmcia_global_lock); @@ -3815,7 +3815,7 @@ SSSetIRQHandler(set_irq_handler_t *handler) retval = ddi_add_intr(dip, 0, handler->iblk_cookie, handler->idev_cookie, - (uint32_t(*)(caddr_t)) handler->handler, + (uint32_t(*)(caddr_t))(uintptr_t) handler->handler, handler->arg1); if (retval == DDI_SUCCESS) { @@ -4530,18 +4530,18 @@ is_subtractv(dev_info_t *dip) /* * pcmcia_pci_alloc() - * allocate mem or I/O resource from the ancestor of the cardbus bridge. - * First start from the parent node. If the parent is a subtractive - * decode bridge and it does not have the requested resource, go up the - * device tree to find the resource. + * allocate mem or I/O resource from the ancestor of the cardbus bridge. + * First start from the parent node. If the parent is a subtractive + * decode bridge and it does not have the requested resource, go up the + * device tree to find the resource. * - * dip the parent node of the cardbus bridge + * dip the parent node of the cardbus bridge * - * res_dip returns a pointer to the node from which the - * resource is obtained. *res_dip could point to - * the parent or a higher level ancestor. *res_dip - * should be saved by the caller and later passed - * to pcmcia_ra_free(); + * res_dip returns a pointer to the node from which the + * resource is obtained. *res_dip could point to + * the parent or a higher level ancestor. *res_dip + * should be saved by the caller and later passed + * to pcmcia_ra_free(); */ int pcmcia_pci_alloc(dev_info_t *dip, ndi_ra_request_t *req, ra_return_t *ret, @@ -5292,7 +5292,7 @@ pcmcia_intr_enable_isr(dev_info_t *dip, dev_info_t *rdip, handler.socket = sockp->ls_socket; handler.irq = irq; - handler.handler = (f_tt *)hdlp->ih_cb_func; + handler.handler = (f_tt *)(uintptr_t)hdlp->ih_cb_func; handler.arg1 = hdlp->ih_cb_arg1; handler.arg2 = hdlp->ih_cb_arg2; handler.handler_id = (uint32_t)(uintptr_t)rdip; diff --git a/usr/src/uts/i86pc/boot/boot_console.c b/usr/src/uts/i86pc/boot/boot_console.c index b1f1a31b3b..c1348ac40c 100644 --- a/usr/src/uts/i86pc/boot/boot_console.c +++ b/usr/src/uts/i86pc/boot/boot_console.c @@ -61,7 +61,7 @@ extern int bcons_ischar_xen(void); #endif /* __xpv */ fb_info_t fb_info; -static int cons_color = CONS_COLOR; +static bcons_dev_t bcons_dev; /* Device callbacks */ static int console = CONS_SCREEN_TEXT; static int diag = CONS_INVALID; static int tty_num = 0; @@ -72,6 +72,30 @@ static struct boot_env { size_t be_size; /* size of the environment, including nul */ } boot_env; +/* + * Simple console terminal emulator for early boot. + * We need this to support kmdb, all other console output is supposed + * to be simple text output. + */ +typedef enum btem_state_type { + A_STATE_START, + A_STATE_ESC, + A_STATE_CSI, + A_STATE_CSI_QMARK, + A_STATE_CSI_EQUAL +} btem_state_type_t; + +#define BTEM_MAXPARAMS 5 +typedef struct btem_state { + btem_state_type_t btem_state; + boolean_t btem_gotparam; + int btem_curparam; + int btem_paramval; + int btem_params[BTEM_MAXPARAMS]; +} btem_state_t; + +static btem_state_t boot_tem; + static int serial_ischar(void); static int serial_getchar(void); static void serial_putchar(int); @@ -97,51 +121,6 @@ console_hypervisor_dev_type(int *tnum) } #endif /* __xpv */ -/* Put the character C on the screen. */ -static void -screen_putchar(int c) -{ - int row, col; - - vga_getpos(&row, &col); - switch (c) { - case '\t': - col += 8 - (col % 8); - if (col == VGA_TEXT_COLS) - col = 79; - vga_setpos(row, col); - break; - - case '\r': - vga_setpos(row, 0); - break; - - case '\b': - if (col > 0) - vga_setpos(row, col - 1); - break; - - case '\n': - if (row < VGA_TEXT_ROWS - 1) - vga_setpos(row + 1, col); - else - vga_scroll(cons_color); - break; - - default: - vga_drawc(c, cons_color); - if (col < VGA_TEXT_COLS -1) - vga_setpos(row, col + 1); - else if (row < VGA_TEXT_ROWS - 1) - vga_setpos(row + 1, 0); - else { - vga_setpos(row, 0); - vga_scroll(cons_color); - } - break; - } -} - static int port; static void @@ -590,16 +569,15 @@ bcons_init_env(struct xboot_info *xbi) int boot_fb(struct xboot_info *xbi, int console) { - if (xbi_fb_init(xbi) == B_FALSE) + if (xbi_fb_init(xbi, &bcons_dev) == B_FALSE) return (console); /* FB address is not set, fall back to serial terminal. */ - if (fb_info.paddr == 0) { + if (fb_info.paddr == 0) return (CONS_TTY); - } - fb_info.terminal.x = 80; - fb_info.terminal.y = 34; + fb_info.terminal.x = VGA_TEXT_COLS; + fb_info.terminal.y = VGA_TEXT_ROWS; boot_fb_init(CONS_FRAMEBUFFER); if (console == CONS_SCREEN_TEXT) @@ -639,47 +617,6 @@ atoi(const char *p) return (neg ? n : -n); } -static int -set_vga_color(void) -{ - int color; - uint8_t tmp; -/* BEGIN CSTYLED */ -/* Bk Rd Gr Br Bl Mg Cy Wh */ - uint8_t dim_xlate[] = { 1, 5, 3, 7, 2, 6, 4, 8 }; - uint8_t brt_xlate[] = { 9, 13, 11, 15, 10, 14, 12, 0 }; - uint8_t solaris_color_to_pc_color[16] = { - 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 - }; -/* END CSTYLED */ - - /* - * Now we have two principal cases, black on white and white on black. - * And we have possible inverse to switch them, and we want to - * follow the tem logic to set VGA TEXT color. FB will take care - * of itself in boot_fb.c - */ - if (fb_info.inverse == B_TRUE || - fb_info.inverse_screen == B_TRUE) { - tmp = dim_xlate[fb_info.fg_color]; - color = solaris_color_to_pc_color[tmp] << 4; - tmp = brt_xlate[fb_info.bg_color]; - color |= solaris_color_to_pc_color[tmp]; - return (color); - } - - /* use bright white for background */ - if (fb_info.bg_color == 7) - tmp = brt_xlate[fb_info.bg_color]; - else - tmp = dim_xlate[fb_info.bg_color]; - - color = solaris_color_to_pc_color[tmp] << 4; - tmp = dim_xlate[fb_info.fg_color]; - color |= solaris_color_to_pc_color[tmp]; - return (color); -} - static void bcons_init_fb(void) { @@ -744,8 +681,6 @@ bcons_init_fb(void) fb_info.cursor.pos.x = intval; } #endif - - cons_color = set_vga_color(); } /* @@ -910,7 +845,7 @@ bcons_init(struct xboot_info *xbi) kb_init(); break; case CONS_SCREEN_TEXT: - boot_vga_init(cons_color); + boot_vga_init(&bcons_dev); /* Fall through */ default: kb_init(); @@ -1099,6 +1034,182 @@ serial_ischar(void) } static void +btem_control(btem_state_t *btem, int c) +{ + int y, rows, cols; + + rows = fb_info.cursor.pos.y; + cols = fb_info.cursor.pos.x; + + btem->btem_state = A_STATE_START; + switch (c) { + case A_BS: + bcons_dev.bd_setpos(rows, cols - 1); + break; + + case A_HT: + cols += 8 - (cols % 8); + if (cols >= fb_info.terminal.x) + cols = fb_info.terminal.x - 1; + bcons_dev.bd_setpos(rows, cols); + break; + + case A_CR: + bcons_dev.bd_setpos(rows, 0); + break; + + case A_FF: + for (y = 0; y < fb_info.terminal.y; y++) { + bcons_dev.bd_setpos(y, 0); + bcons_dev.bd_eraseline(); + } + bcons_dev.bd_setpos(0, 0); + break; + + case A_ESC: + btem->btem_state = A_STATE_ESC; + break; + + default: + bcons_dev.bd_putchar(c); + break; + } +} + +/* + * if parameters [0..count - 1] are not set, set them to the value + * of newparam. + */ +static void +btem_setparam(btem_state_t *btem, int count, int newparam) +{ + int i; + + for (i = 0; i < count; i++) { + if (btem->btem_params[i] == -1) + btem->btem_params[i] = newparam; + } +} + +static void +btem_chkparam(btem_state_t *btem, int c) +{ + int rows, cols; + + rows = fb_info.cursor.pos.y; + cols = fb_info.cursor.pos.x; + switch (c) { + case '@': /* insert char */ + btem_setparam(btem, 1, 1); + bcons_dev.bd_shift(btem->btem_params[0]); + break; + + case 'A': /* cursor up */ + btem_setparam(btem, 1, 1); + bcons_dev.bd_setpos(rows - btem->btem_params[0], cols); + break; + + case 'B': /* cursor down */ + btem_setparam(btem, 1, 1); + bcons_dev.bd_setpos(rows + btem->btem_params[0], cols); + break; + + case 'C': /* cursor right */ + btem_setparam(btem, 1, 1); + bcons_dev.bd_setpos(rows, cols + btem->btem_params[0]); + break; + + case 'D': /* cursor left */ + btem_setparam(btem, 1, 1); + bcons_dev.bd_setpos(rows, cols - btem->btem_params[0]); + break; + + case 'K': + bcons_dev.bd_eraseline(); + break; + default: + /* bcons_dev.bd_putchar(c); */ + break; + } + btem->btem_state = A_STATE_START; +} + +static void +btem_getparams(btem_state_t *btem, int c) +{ + if (isdigit(c)) { + btem->btem_paramval = btem->btem_paramval * 10 + c - '0'; + btem->btem_gotparam = B_TRUE; + return; + } + + if (btem->btem_curparam < BTEM_MAXPARAMS) { + if (btem->btem_gotparam == B_TRUE) { + btem->btem_params[btem->btem_curparam] = + btem->btem_paramval; + } + btem->btem_curparam++; + } + + if (c == ';') { + /* Restart parameter search */ + btem->btem_gotparam = B_FALSE; + btem->btem_paramval = 0; + } else { + btem_chkparam(btem, c); + } +} + +/* Simple boot terminal parser. */ +static void +btem_parse(btem_state_t *btem, int c) +{ + int i; + + /* Normal state? */ + if (btem->btem_state == A_STATE_START) { + if (c == A_CSI || c < ' ') + btem_control(btem, c); + else + bcons_dev.bd_putchar(c); + return; + } + + /* In <ESC> sequence */ + if (btem->btem_state != A_STATE_ESC) { + btem_getparams(btem, c); + return; + } + + /* Previous char was <ESC> */ + switch (c) { + case '[': + btem->btem_curparam = 0; + btem->btem_paramval = 0; + btem->btem_gotparam = B_FALSE; + /* clear the parameters */ + for (i = 0; i < BTEM_MAXPARAMS; i++) + btem->btem_params[i] = -1; + btem->btem_state = A_STATE_CSI; + return; + + case 'Q': /* <ESC>Q */ + case 'C': /* <ESC>C */ + btem->btem_state = A_STATE_START; + return; + + default: + btem->btem_state = A_STATE_START; + break; + } + + if (c < ' ') + btem_control(btem, c); + else + bcons_dev.bd_putchar(c); +} + +static void _doputchar(int device, int c) { switch (device) { @@ -1106,10 +1217,10 @@ _doputchar(int device, int c) serial_putchar(c); return; case CONS_SCREEN_TEXT: - screen_putchar(c); - return; case CONS_FRAMEBUFFER: - boot_fb_putchar(c); + bcons_dev.bd_cursor(B_FALSE); + btem_parse(&boot_tem, c); + bcons_dev.bd_cursor(B_TRUE); return; case CONS_SCREEN_GRAPHICS: #if !defined(_BOOT) @@ -1124,8 +1235,6 @@ _doputchar(int device, int c) void bcons_putchar(int c) { - static int bhcharpos = 0; - #if defined(__xpv) if (!DOMAIN_IS_INITDOMAIN(xen_info) || console == CONS_HYPERVISOR) { @@ -1134,33 +1243,11 @@ bcons_putchar(int c) } #endif /* __xpv */ - if (c == '\t') { - do { - _doputchar(console, ' '); - if (diag != console) - _doputchar(diag, ' '); - } while (++bhcharpos % 8); - return; - } else if (c == '\n' || c == '\r') { - bhcharpos = 0; - if (console != CONS_FRAMEBUFFER) - _doputchar(console, '\r'); - if (diag != console && diag != CONS_FRAMEBUFFER) - _doputchar(diag, '\r'); - _doputchar(console, c); - if (diag != console) - _doputchar(diag, c); - return; - } else if (c == '\b') { - if (bhcharpos) - bhcharpos--; - _doputchar(console, c); + if (c == '\n') { + _doputchar(console, '\r'); if (diag != console) - _doputchar(diag, c); - return; + _doputchar(diag, '\r'); } - - bhcharpos++; _doputchar(console, c); if (diag != console) _doputchar(diag, c); diff --git a/usr/src/uts/i86pc/boot/boot_console_impl.h b/usr/src/uts/i86pc/boot/boot_console_impl.h index 22caf4da8f..9dbc2b5158 100644 --- a/usr/src/uts/i86pc/boot/boot_console_impl.h +++ b/usr/src/uts/i86pc/boot/boot_console_impl.h @@ -13,12 +13,12 @@ * Copyright 2016 Toomas Soome <tsome@me.com> */ -#include <sys/types.h> -#include <sys/bootinfo.h> - #ifndef _BOOT_CONSOLE_IMPL_H #define _BOOT_CONSOLE_IMPL_H +#include <sys/types.h> +#include <sys/bootinfo.h> + /* * Boot console implementation details. */ @@ -27,15 +27,19 @@ extern "C" { #endif -extern boolean_t xbi_fb_init(struct xboot_info *); -extern void boot_fb_init(int); -extern void boot_fb_putchar(uint8_t); -extern void boot_vga_init(int); +/* Console device callbacks. */ +typedef struct bcons_dev { + void (*bd_putchar)(int); + void (*bd_eraseline)(void); + void (*bd_cursor)(boolean_t); + void (*bd_setpos)(int, int); + void (*bd_shift)(int); +} bcons_dev_t; -extern void vga_setpos(int, int); -extern void vga_getpos(int *, int *); -extern void vga_scroll(int); -extern void vga_drawc(int, int); +extern boolean_t xbi_fb_init(struct xboot_info *, bcons_dev_t *); +extern void boot_fb_init(int); +extern void boot_vga_init(bcons_dev_t *); +extern void boot_get_color(uint32_t *, uint32_t *); #ifdef __cplusplus } diff --git a/usr/src/uts/i86pc/boot/boot_fb.c b/usr/src/uts/i86pc/boot/boot_fb.c index 5db2e0dcac..4ebf38cb30 100644 --- a/usr/src/uts/i86pc/boot/boot_fb.c +++ b/usr/src/uts/i86pc/boot/boot_fb.c @@ -31,6 +31,7 @@ #include <sys/bootinfo.h> #include <sys/boot_console.h> #include <sys/bootconf.h> +#include "boot_console_impl.h" #define P2ROUNDUP(x, align) (-(-(x) & -(align))) #define MIN(a, b) ((a) < (b) ? (a) : (b)) @@ -61,8 +62,6 @@ struct vis_conscopy { static struct font boot_fb_font; /* set by set_font() */ static uint8_t glyph[MAX_GLYPH]; -static uint32_t last_line_size; -static fb_info_pixel_coord_t last_line; /* color translation */ typedef struct { @@ -87,11 +86,17 @@ static text_cmap_t cmap4_to_24 = { /* END CSTYLED */ }; +static void boot_fb_putchar(int); +static void boot_fb_eraseline(void); +static void boot_fb_setpos(int, int); +static void boot_fb_shiftline(int); +static void boot_fb_eraseline_impl(uint16_t, uint16_t); + /* * extract data from MB2 framebuffer tag and set up initial frame buffer. */ boolean_t -xbi_fb_init(struct xboot_info *xbi) +xbi_fb_init(struct xboot_info *xbi, bcons_dev_t *bcons_dev) { multiboot_tag_framebuffer_t *tag; boot_framebuffer_t *xbi_fb; @@ -122,6 +127,12 @@ xbi_fb_init(struct xboot_info *xbi) fb_info.screen.y = tag->framebuffer_common.framebuffer_height; fb_info.fb_size = fb_info.screen.y * fb_info.pitch; + bcons_dev->bd_putchar = boot_fb_putchar; + bcons_dev->bd_eraseline = boot_fb_eraseline; + bcons_dev->bd_cursor = boot_fb_cursor; + bcons_dev->bd_setpos = boot_fb_setpos; + bcons_dev->bd_shift = boot_fb_shiftline; + if (fb_info.paddr == 0) fb_info.fb_type = FB_TYPE_UNKNOWN; @@ -187,16 +198,14 @@ boot_fb_fill(uint8_t *dst, uint32_t data, uint32_t len) case 16: dst16 = (uint16_t *)dst; len /= 2; - for (i = 0; i < len; i++) { + for (i = 0; i < len; i++) dst16[i] = (uint16_t)data; - } break; case 32: dst32 = (uint32_t *)dst; len /= 4; - for (i = 0; i < len; i++) { + for (i = 0; i < len; i++) dst32[i] = data; - } break; } } @@ -207,27 +216,54 @@ boot_fb_cpy(uint8_t *dst, uint8_t *src, uint32_t len) { uint16_t *dst16, *src16; uint32_t *dst32, *src32; - uint32_t i; switch (fb_info.depth) { case 24: case 8: - for (i = 0; i < len; i++) - dst[i] = src[i]; + default: + if (dst <= src) { + do { + *dst++ = *src++; + } while (--len != 0); + } else { + dst += len; + src += len; + do { + *--dst = *--src; + } while (--len != 0); + } break; case 15: case 16: dst16 = (uint16_t *)dst; src16 = (uint16_t *)src; - for (i = 0; i < len >> 1; i++) { - dst16[i] = src16[i]; + len /= 2; + if (dst16 <= src16) { + do { + *dst16++ = *src16++; + } while (--len != 0); + } else { + dst16 += len; + src16 += len; + do { + *--dst16 = *--src16; + } while (--len != 0); } break; case 32: dst32 = (uint32_t *)dst; src32 = (uint32_t *)src; - for (i = 0; i < len >> 2; i++) { - dst32[i] = src32[i]; + len /= 4; + if (dst32 <= src32) { + do { + *dst32++ = *src32++; + } while (--len != 0); + } else { + dst32 += len; + src32 += len; + do { + *--dst32 = *--src32; + } while (--len != 0); } break; } @@ -256,7 +292,7 @@ boot_fb_shadow_init(bootops_t *bops) /* * Translate ansi color based on inverses and brightness. */ -static void +void boot_get_color(uint32_t *fg, uint32_t *bg) { /* ansi to solaris colors, see also boot_console.c */ @@ -363,35 +399,30 @@ boot_fb_init(int console) #if defined(_BOOT) /* clear the screen if cursor is set to 0,0 */ - fb_info.cursor.pos.x = fb_info.cursor.pos.y = 0; - if (console == CONS_FRAMEBUFFER && - fb_info.cursor.pos.x == 0 && fb_info.cursor.pos.y == 0) { - uint32_t fg, bg; - int i; + if (fb_info.cursor.pos.x == 0 && fb_info.cursor.pos.y == 0) { + uint32_t fg, bg, toffset; + uint16_t y; boot_get_color(&fg, &bg); bg = boot_color_map(bg); - for (i = 0; i < fb_info.screen.y; i++) { - uint8_t *dest = fb_info.fb + i * fb_info.pitch; + toffset = 0; + for (y = 0; y < fb_info.screen.y; y++) { + uint8_t *dest = fb_info.fb + toffset; + boot_fb_fill(dest, bg, fb_info.pitch); + toffset += fb_info.pitch; } } #endif - /* set up pre-calculated last line */ - last_line_size = fb_info.terminal.x * boot_fb_font.width * - fb_info.bpp; - last_line.x = window.x; - last_line.y = window.y + (fb_info.terminal.y - 1) * boot_fb_font.height; - } /* copy rectangle to framebuffer. */ static void boot_fb_blit(struct vis_consdisplay *rect) { - uint32_t size; /* write size per scanline */ - uint8_t *fbp, *sfbp; /* fb + calculated offset */ + uint32_t offset, size; /* write size per scanline */ + uint8_t *fbp, *sfbp = NULL; /* fb + calculated offset */ int i; /* make sure we will not write past FB */ @@ -402,14 +433,10 @@ boot_fb_blit(struct vis_consdisplay *rect) return; size = rect->width * fb_info.bpp; - fbp = fb_info.fb + rect->col * fb_info.bpp + - rect->row * fb_info.pitch; - if (fb_info.shadow_fb != NULL) { - sfbp = fb_info.shadow_fb + rect->col * fb_info.bpp + - rect->row * fb_info.pitch; - } else { - sfbp = NULL; - } + offset = rect->col * fb_info.bpp + rect->row * fb_info.pitch; + fbp = fb_info.fb + offset; + if (fb_info.shadow_fb != NULL) + sfbp = fb_info.shadow_fb + offset; /* write all scanlines in rectangle */ for (i = 0; i < rect->height; i++) { @@ -450,68 +477,127 @@ bit_to_pix(uchar_t c) } } -/* - * move the terminal window lines [1..y] to [0..y-1] and clear last line. - */ static void -boot_fb_scroll(void) +boot_fb_eraseline_impl(uint16_t x, uint16_t y) { - struct vis_conscopy c_copy; - uint32_t soffset, toffset; - uint32_t width, height; + uint32_t toffset, size; uint32_t fg, bg; - uint8_t *src, *dst, *sdst; + uint8_t *dst, *sdst; int i; boot_get_color(&fg, &bg); bg = boot_color_map(bg); - /* support for scrolling. set up the console copy data and last line */ - c_copy.s_row = fb_info.terminal_origin.y + boot_fb_font.height; - c_copy.s_col = fb_info.terminal_origin.x; - c_copy.e_row = fb_info.screen.y - fb_info.terminal_origin.y; - c_copy.e_col = fb_info.screen.x - fb_info.terminal_origin.x; - c_copy.t_row = fb_info.terminal_origin.y; - c_copy.t_col = fb_info.terminal_origin.x; + size = fb_info.terminal.x * boot_fb_font.width * fb_info.bpp; + + toffset = x * fb_info.bpp + y * fb_info.pitch; + dst = fb_info.fb + toffset; + if (fb_info.shadow_fb != NULL) + sdst = fb_info.shadow_fb + toffset; + + for (i = 0; i < boot_fb_font.height; i++) { + uint8_t *dest = dst + i * fb_info.pitch; + if (fb_info.fb + fb_info.fb_size >= dest + size) + boot_fb_fill(dest, bg, size); + if (fb_info.shadow_fb != NULL) { + dest = sdst + i * fb_info.pitch; + if (fb_info.shadow_fb + fb_info.fb_size >= + dest + size) { + boot_fb_fill(dest, bg, size); + } + } + } +} + +static void +boot_fb_eraseline(void) +{ + boot_fb_eraseline_impl(fb_info.cursor.origin.x, + fb_info.cursor.origin.y); +} + +/* + * Copy rectangle from console to console. + * If shadow buffer is available, use shadow as source. + */ +static void +boot_fb_conscopy(struct vis_conscopy *c_copy) +{ + uint32_t soffset, toffset; + uint32_t width, height, increment; + uint8_t *src, *dst, *sdst = NULL; + int i; + + soffset = c_copy->s_col * fb_info.bpp + c_copy->s_row * fb_info.pitch; + toffset = c_copy->t_col * fb_info.bpp + c_copy->t_row * fb_info.pitch; + + src = fb_info.fb + soffset; + dst = fb_info.fb + toffset; - soffset = c_copy.s_col * fb_info.bpp + c_copy.s_row * fb_info.pitch; - toffset = c_copy.t_col * fb_info.bpp + c_copy.t_row * fb_info.pitch; if (fb_info.shadow_fb != NULL) { src = fb_info.shadow_fb + soffset; sdst = fb_info.shadow_fb + toffset; - } else { - src = fb_info.fb + soffset; - sdst = NULL; } - dst = fb_info.fb + toffset; - width = (c_copy.e_col - c_copy.s_col + 1) * fb_info.bpp; - height = c_copy.e_row - c_copy.s_row + 1; + width = (c_copy->e_col - c_copy->s_col + 1) * fb_info.bpp; + height = c_copy->e_row - c_copy->s_row + 1; + for (i = 0; i < height; i++) { - uint32_t increment = i * fb_info.pitch; + increment = i * fb_info.pitch; + + /* Make sure we fit into FB size. */ + if (soffset + increment + width >= fb_info.fb_size || + toffset + increment + width >= fb_info.fb_size) + break; + boot_fb_cpy(dst + increment, src + increment, width); + if (sdst != NULL) boot_fb_cpy(sdst + increment, src + increment, width); } +} - /* now clean up the last line */ - toffset = last_line.x * fb_info.bpp + last_line.y * fb_info.pitch; - dst = fb_info.fb + toffset; - if (fb_info.shadow_fb != NULL) - sdst = fb_info.shadow_fb + toffset; +/* Shift the line content by chars. */ +static void +boot_fb_shiftline(int chars) +{ + struct vis_conscopy c_copy; - for (i = 0; i < boot_fb_font.height; i++) { - uint8_t *dest = dst + i * fb_info.pitch; - if (fb_info.fb + fb_info.fb_size >= dest + last_line_size) - boot_fb_fill(dest, bg, last_line_size); - if (sdst != NULL) { - dest = sdst + i * fb_info.pitch; - if (fb_info.shadow_fb + fb_info.fb_size >= - dest + last_line_size) { - boot_fb_fill(dest, bg, last_line_size); - } - } - } + c_copy.s_col = fb_info.cursor.origin.x; + c_copy.s_row = fb_info.cursor.origin.y; + + c_copy.e_col = (fb_info.terminal.x - chars) * boot_fb_font.width; + c_copy.e_col += fb_info.terminal_origin.x; + c_copy.e_row = c_copy.s_row + boot_fb_font.height; + + c_copy.t_col = fb_info.cursor.origin.x + chars * boot_fb_font.width; + c_copy.t_row = fb_info.cursor.origin.y; + + boot_fb_conscopy(&c_copy); +} + +/* + * move the terminal window lines [1..y] to [0..y-1] and clear last line. + */ +static void +boot_fb_scroll(void) +{ + struct vis_conscopy c_copy; + + /* support for scrolling. set up the console copy data and last line */ + c_copy.s_row = fb_info.terminal_origin.y + boot_fb_font.height; + c_copy.s_col = fb_info.terminal_origin.x; + c_copy.e_row = fb_info.screen.y - fb_info.terminal_origin.y; + c_copy.e_col = fb_info.screen.x - fb_info.terminal_origin.x; + c_copy.t_row = fb_info.terminal_origin.y; + c_copy.t_col = fb_info.terminal_origin.x; + + boot_fb_conscopy(&c_copy); + + /* now clean up the last line */ + boot_fb_eraseline_impl(fb_info.terminal_origin.x, + fb_info.terminal_origin.y + + (fb_info.terminal.y - 1) * boot_fb_font.height); } /* @@ -626,64 +712,40 @@ boot_fb_cursor(boolean_t visible) } static void -set_cursor_row(void) +boot_fb_setpos(int row, int col) { - fb_info.cursor.pos.y++; - fb_info.cursor.pos.x = 0; + if (row < 0) + row = 0; + if (row >= fb_info.terminal.y) + row = fb_info.terminal.y - 1; + if (col < 0) + col = 0; + if (col >= fb_info.terminal.x) + col = fb_info.terminal.x - 1; + + fb_info.cursor.pos.x = col; + fb_info.cursor.pos.y = row; fb_info.cursor.origin.x = fb_info.terminal_origin.x; - - if (fb_info.cursor.pos.y < fb_info.terminal.y && - fb_info.cursor.origin.y + boot_fb_font.height < fb_info.screen.y) { - fb_info.cursor.origin.y += boot_fb_font.height; - } else { - fb_info.cursor.pos.y = fb_info.terminal.y - 1; - /* fix the cursor origin y */ - fb_info.cursor.origin.y = fb_info.terminal_origin.y + - boot_fb_font.height * fb_info.cursor.pos.y; - boot_fb_scroll(); - } + fb_info.cursor.origin.x += col * boot_fb_font.width; + fb_info.cursor.origin.y = fb_info.terminal_origin.y; + fb_info.cursor.origin.y += row * boot_fb_font.height; } static void -set_cursor_col(void) -{ - fb_info.cursor.pos.x++; - if (fb_info.cursor.pos.x < fb_info.terminal.x && - fb_info.cursor.origin.x + boot_fb_font.width < fb_info.screen.x) { - fb_info.cursor.origin.x += boot_fb_font.width; - } else { - fb_info.cursor.pos.x = 0; - fb_info.cursor.origin.x = fb_info.terminal_origin.x; - set_cursor_row(); - } -} - -void -boot_fb_putchar(uint8_t c) +boot_fb_putchar(int c) { struct vis_consdisplay display; - boolean_t bs = B_FALSE; - - /* early tem startup will switch cursor off, if so, keep it off */ - boot_fb_cursor(B_FALSE); /* cursor off */ - switch (c) { - case '\n': - set_cursor_row(); - boot_fb_cursor(B_TRUE); - return; - case '\r': - fb_info.cursor.pos.x = 0; - fb_info.cursor.origin.x = fb_info.terminal_origin.x; - boot_fb_cursor(B_TRUE); + int rows, cols; + + rows = fb_info.cursor.pos.y; + cols = fb_info.cursor.pos.x; + + if (c == '\n') { + if (rows < fb_info.terminal.y - 1) + boot_fb_setpos(rows + 1, cols); + else + boot_fb_scroll(); return; - case '\b': - if (fb_info.cursor.pos.x > 0) { - fb_info.cursor.pos.x--; - fb_info.cursor.origin.x -= boot_fb_font.width; - } - c = ' '; - bs = B_TRUE; - break; } bit_to_pix(c); @@ -694,7 +756,12 @@ boot_fb_putchar(uint8_t c) display.data = glyph; boot_fb_blit(&display); - if (bs == B_FALSE) - set_cursor_col(); - boot_fb_cursor(B_TRUE); + if (cols < fb_info.terminal.x - 1) + boot_fb_setpos(rows, cols + 1); + else if (rows < fb_info.terminal.y - 1) + boot_fb_setpos(rows + 1, 0); + else { + boot_fb_setpos(rows, 0); + boot_fb_scroll(); + } } diff --git a/usr/src/uts/i86pc/boot/boot_vga.c b/usr/src/uts/i86pc/boot/boot_vga.c index 3526964662..7f706e6cac 100644 --- a/usr/src/uts/i86pc/boot/boot_vga.c +++ b/usr/src/uts/i86pc/boot/boot_vga.c @@ -31,6 +31,8 @@ #include <sys/archsystm.h> #include <sys/vgareg.h> #include <sys/framebuffer.h> +#include <sys/boot_console.h> +#include "boot_console_impl.h" #include "boot_console_impl.h" #if defined(_BOOT) @@ -50,7 +52,7 @@ * there. */ extern unsigned short *video_fb; -#define VGA_SCREEN ((unsigned short *)video_fb) +#define VGA_SCREEN (video_fb) #else /* __xpv && _BOOT */ @@ -59,20 +61,44 @@ extern unsigned short *video_fb; #endif /* __xpv && _BOOT */ +static int cons_color = CONS_COLOR; static void vga_init(void); -static void vga_cursor_display(void); +static void vga_drawc(int); +static void vga_setpos(int, int); +static void vga_getpos(int *, int *); +static void vga_scroll(int); static void vga_clear(int); +static void vga_shiftline(int); +static void vga_eraseline(void); +static void vga_cursor_display(boolean_t); + static void vga_set_crtc(int index, unsigned char val); static unsigned char vga_get_crtc(int index); static void vga_set_atr(int index, unsigned char val); static unsigned char vga_get_atr(int index); +static int +get_vga_color(void) +{ + int color; + uint32_t fg, bg; + uint8_t solaris_color_to_pc_color[16] = { + 15, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 + }; + + boot_get_color(&fg, &bg); + color = solaris_color_to_pc_color[bg] << 4; + color |= solaris_color_to_pc_color[fg]; + return (color); +} + void -boot_vga_init(int cons_color) +boot_vga_init(bcons_dev_t *bcons_dev) { fb_info.terminal.x = VGA_TEXT_COLS; fb_info.terminal.y = VGA_TEXT_ROWS; + cons_color = get_vga_color(); #if defined(_BOOT) /* @@ -82,7 +108,7 @@ boot_vga_init(int cons_color) */ vga_init(); fb_info.cursor.visible = B_FALSE; - vga_cursor_display(); + vga_cursor_display(B_TRUE); /* * In general we should avoid resetting the display during the boot, @@ -97,6 +123,12 @@ boot_vga_init(int cons_color) vga_clear(cons_color); vga_setpos(fb_info.cursor.pos.y, fb_info.cursor.pos.x); #endif /* _BOOT */ + + bcons_dev->bd_putchar = vga_drawc; + bcons_dev->bd_eraseline = vga_eraseline; + bcons_dev->bd_cursor = vga_cursor_display; + bcons_dev->bd_setpos = vga_setpos; + bcons_dev->bd_shift = vga_shiftline; } static void @@ -112,10 +144,13 @@ vga_init(void) } static void -vga_cursor_display(void) +vga_cursor_display(boolean_t visible) { unsigned char val, msl; + if (fb_info.cursor.visible == visible) + return; + /* * Figure out the maximum scan line value. We need this to set the * cursor size. @@ -132,6 +167,10 @@ vga_cursor_display(void) * - Bit 5 is the cursor disable bit. */ val = vga_get_crtc(VGA_CRTC_CSSL) & 0xc0; + + if (visible == B_FALSE) + val |= (1 << 5); + vga_set_crtc(VGA_CRTC_CSSL, val); /* @@ -145,51 +184,121 @@ vga_cursor_display(void) vga_set_crtc(VGA_CRTC_CESL, msl); } - static void -vga_clear(int color) +vga_eraseline_impl(int x, int y, int color) { - unsigned short val; + unsigned short val, *buf; int i; + buf = VGA_SCREEN + x + y * VGA_TEXT_COLS; val = (color << 8) | ' '; + for (i = x; i < VGA_TEXT_COLS; i++) + buf[i] = val; +} + +static void +vga_eraseline(void) +{ + int x, y; + + x = fb_info.cursor.pos.x; + y = fb_info.cursor.pos.y; + vga_eraseline_impl(x, y, cons_color); +} - for (i = 0; i < VGA_TEXT_ROWS * VGA_TEXT_COLS; i++) { - VGA_SCREEN[i] = val; +static void +vga_shiftline(int chars) +{ + unsigned short *src, *dst; + int x, y, len; + + x = fb_info.cursor.pos.x; + y = fb_info.cursor.pos.y; + len = VGA_TEXT_COLS - x - chars; + if (len <= 0) + return; + + src = VGA_SCREEN + x + y * VGA_TEXT_COLS; + dst = src + chars; + if (dst <= src) { + do { + *dst++ = *src++; + } while (--len != 0); + } else { + dst += len; + src += len; + do { + *--dst = *--src; + } while (--len != 0); } } -void -vga_drawc(int c, int color) +static void +vga_clear(int color) +{ + int i; + + for (i = 0; i < VGA_TEXT_ROWS; i++) + vga_eraseline_impl(0, i, color); +} + +static void +vga_drawc(int c) { int row; int col; vga_getpos(&row, &col); - VGA_SCREEN[row*VGA_TEXT_COLS + col] = (color << 8) | c; + + if (c == '\n') { + if (row < fb_info.terminal.y - 1) + vga_setpos(row + 1, col); + else + vga_scroll(cons_color); + return; + } + + /* + * VGA_SCREEN is an array of 16-bit unsigned ints, we do let + * the compiler to take care of truncation here. + */ + VGA_SCREEN[row * VGA_TEXT_COLS + col] = (cons_color << 8) | c; + + if (col < VGA_TEXT_COLS - 1) + vga_setpos(row, col + 1); + else if (row < VGA_TEXT_ROWS - 1) + vga_setpos(row + 1, 0); + else { + vga_setpos(row, 0); + vga_scroll(cons_color); + } } -void +static void vga_scroll(int color) { - unsigned short val; int i; - val = (color << 8) | ' '; - - for (i = 0; i < (VGA_TEXT_ROWS-1)*VGA_TEXT_COLS; i++) { + for (i = 0; i < (VGA_TEXT_ROWS - 1) * VGA_TEXT_COLS; i++) { VGA_SCREEN[i] = VGA_SCREEN[i + VGA_TEXT_COLS]; } - for (; i < VGA_TEXT_ROWS * VGA_TEXT_COLS; i++) { - VGA_SCREEN[i] = val; - } + vga_eraseline_impl(0, VGA_TEXT_ROWS - 1, color); } -void +static void vga_setpos(int row, int col) { int off; + if (row < 0) + row = 0; + if (row >= fb_info.terminal.y) + row = fb_info.terminal.y - 1; + if (col < 0) + col = 0; + if (col >= fb_info.terminal.x) + col = fb_info.terminal.x - 1; + off = row * VGA_TEXT_COLS + col; vga_set_crtc(VGA_CRTC_CLAH, off >> 8); vga_set_crtc(VGA_CRTC_CLAL, off & 0xff); @@ -198,7 +307,7 @@ vga_setpos(int row, int col) fb_info.cursor.pos.x = col; } -void +static void vga_getpos(int *row, int *col) { int off; diff --git a/usr/src/uts/intel/cxgbe/cxgbe/Makefile b/usr/src/uts/intel/cxgbe/cxgbe/Makefile index 19c7d29776..a9600cce5e 100644 --- a/usr/src/uts/intel/cxgbe/cxgbe/Makefile +++ b/usr/src/uts/intel/cxgbe/cxgbe/Makefile @@ -43,7 +43,7 @@ ALL_TARGET = $(BINARY) LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -CFLAGS += -g -I$(UTSBASE)/common/io/cxgbe -I$(UTSBASE)/common/io/cxgbe/common \ +CFLAGS += -I$(UTSBASE)/common/io/cxgbe -I$(UTSBASE)/common/io/cxgbe/common \ -I$(UTSBASE)/common/io/cxgbe/t4nex -I$(UTSBASE)/common/io/cxgbe/shared # diff --git a/usr/src/uts/intel/cxgbe/t4nex/Makefile b/usr/src/uts/intel/cxgbe/t4nex/Makefile index 20ddeb8cf7..0c22a89391 100644 --- a/usr/src/uts/intel/cxgbe/t4nex/Makefile +++ b/usr/src/uts/intel/cxgbe/t4nex/Makefile @@ -48,7 +48,7 @@ ALL_TARGET = $(BINARY) LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) -CFLAGS += -g -I$(UTSBASE)/common/io/cxgbe -I$(UTSBASE)/common/io/cxgbe/common \ +CFLAGS += -I$(UTSBASE)/common/io/cxgbe -I$(UTSBASE)/common/io/cxgbe/common \ -I$(UTSBASE)/common/io/cxgbe/t4nex -I$(UTSBASE)/common/io/cxgbe/shared \ -I$(UTSBASE)/common/io/cxgbe/firmware diff --git a/usr/src/uts/sun4u/bignum/Makefile b/usr/src/uts/sun4u/bignum/Makefile index 407a7bc3f0..cb324146ef 100644 --- a/usr/src/uts/sun4u/bignum/Makefile +++ b/usr/src/uts/sun4u/bignum/Makefile @@ -61,7 +61,7 @@ LDFLAGS += -dy -Nmisc/kcf # lint pass one enforcement # CFLAGS += $(CCVERBOSE) -I$(CRYPTODIR) -I$(COM1_DIR) -CFLAGS += -DUMUL64 -DUSE_FLOATING_POINT +CFLAGS += -DUMUL64 LINTFLAGS += -I$(CRYPTODIR) -I$(COM1_DIR) CERRWARN += -_gcc=-Wno-unused-function |