diff options
author | Richard Lowe <richlowe@richlowe.net> | 2019-06-14 00:42:05 +0000 |
---|---|---|
committer | Richard Lowe <richlowe@richlowe.net> | 2019-09-04 14:09:21 -0400 |
commit | 69b1fd3f24d0ee2e682883606201c61f52085805 (patch) | |
tree | 2c167f8072390ee958000e727ff6b130c7033149 /usr | |
parent | d58ceae2ed78dc65ab682a0281ce523d6c4116fe (diff) | |
download | illumos-joyent-69b1fd3f24d0ee2e682883606201c61f52085805.tar.gz |
11461 should use a native link-editor during the build
11463 SUNWonld has passed its use-by date
11464 cmd/sgs/tools should contain tools, not common code
11465 sgsmsg should be built with the rest of the build tools
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
Approved by: Gordon Ross <gwr@nexenta.com>
Diffstat (limited to 'usr')
125 files changed, 670 insertions, 2150 deletions
diff --git a/usr/src/Makefile.master b/usr/src/Makefile.master index 23ff2610ae..5dee3d84a8 100644 --- a/usr/src/Makefile.master +++ b/usr/src/Makefile.master @@ -862,6 +862,7 @@ $(__SUNC)PRIMARY_CCC= studio12,$(SPRO_VROOT)/bin/CC,sun CW_CC_COMPILERS= $(PRIMARY_CC:%=--primary %) $(SHADOW_CCS:%=--shadow %) CW_CCC_COMPILERS= $(PRIMARY_CCC:%=--primary %) $(SHADOW_CCCS:%=--shadow %) +CW_LINKER= --linker $(LD) # Till SS12u1 formally becomes the NV CBE, LINT is hard # coded to be picked up from the $SPRO_ROOT/sunstudio12.1/ @@ -875,10 +876,10 @@ CW_CCC_COMPILERS= $(PRIMARY_CCC:%=--primary %) $(SHADOW_CCCS:%=--shadow %) # CW= $(ONBLD_TOOLS)/bin/$(MACH)/cw -BUILD_CC= $(CW) $(CW_CC_COMPILERS) -- -BUILD_CCC= $(CW) -C $(CW_CCC_COMPILERS) -- +BUILD_CC= $(CW) $(CW_LINKER) $(CW_CC_COMPILERS) -- +BUILD_CCC= $(CW) -C $(CW_LINKER) $(CW_CCC_COMPILERS) -- BUILD_CPP= /usr/ccs/lib/cpp -BUILD_LD= /usr/ccs/bin/ld +BUILD_LD= $(ONBLD_TOOLS)/bin/$(MACH)/ld BUILD_LINT= $(SPRO_ROOT)/sunstudio12.1/bin/lint $(MACH)_CC= $(BUILD_CC) diff --git a/usr/src/cmd/sgs/Makefile b/usr/src/cmd/sgs/Makefile index d9ac6c2305..e0a53e9cca 100644 --- a/usr/src/cmd/sgs/Makefile +++ b/usr/src/cmd/sgs/Makefile @@ -115,7 +115,7 @@ chkmsg := TARGET= chkmsg .PARALLEL: $(SUBDIRS) -all install: native-add .WAIT $(SUBDIRS) +all install: $(SUBDIRS) include $(SRC)/cmd/Makefile.targ @@ -125,8 +125,7 @@ _msg: _msg_gettext _msg_sgsmsg _msg_gettext: $(MSGDOMAIN)/$(POFILE) -# $(MACH)/sgsmsg must be built before we can descend into $(MSGDIR) -_msg_sgsmsg: native-add .WAIT $(MSGDIR) +_msg_sgsmsg: $(MSGDIR) $(MSGDOMAIN)/$(POFILE): \ $(MSGDOMAIN) $(POFILE) @@ -149,39 +148,18 @@ install_lib: FRC lint: -delete \ -clean clobber: native-clobber .WAIT $(SUBDIRS) $(MSGDIR) +delete clean clobber: $(SUBDIRS) $(MSGDIR) $(SUBDIRS): FRC @ cd $@; pwd; $(MAKE) $(TARGET) - -# Integration of ld and ld.so.1 in some developement cycles requires that both -# of these modules be built using the new ld. This `native' target allows us -# to build a local ld which will then be used to build the delivered version of -# itself and ld.so.1. Once this new functionality appears in the standard ld -# this target can be disabled. - -native-add: FRC - @ cd tools/$(MACH); pwd; $(MAKE) native - @ cd libconv/$(MACH); pwd; $(MAKE) - @ cd libelf/$(MACH); pwd; $(MAKE) native - @ cd liblddbg/$(MACH); pwd; $(MAKE) native - @ cd libldstab/$(MACH); pwd; $(MAKE) native - @ cd libld/$(MACH); pwd; $(MAKE) native - @ cd ld/$(MACH); pwd; $(MAKE) native - -native-clobber: - @ cd tools; pwd; $(MAKE) $(TARGET) - $(RM) -r proto/$(MACH) - FRC: # # Cross-reference customization: ignore the directories named by XRPRUNE, # and tweak the file globs slightly. # -XRPRUNE= rtld.4.x packages abi +XRPRUNE= rtld.4.x abi XRADD= *.msg mapfile* XRDEL= Makefile* kobj_* diff --git a/usr/src/cmd/sgs/Makefile.com b/usr/src/cmd/sgs/Makefile.com index c2c5143c66..f8f102b41b 100644 --- a/usr/src/cmd/sgs/Makefile.com +++ b/usr/src/cmd/sgs/Makefile.com @@ -31,8 +31,6 @@ include $(SRC)/cmd/sgs/Makefile.var -SRCBASE = ../../../.. - i386_ARCH = intel sparc_ARCH = sparc @@ -52,6 +50,8 @@ CSTD_GNU89 = $(CSTD_GNU99) CFLAGS += $(CCVERBOSE) $(DEBUG) $(XFFLAG) CFLAGS64 += $(CCVERBOSE) $(DEBUG) $(XFFLAG) +NATIVE_CFLAGS += $(CCVERBOSE) $(DEBUG) $(XFFLAG) + CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-value @@ -63,7 +63,7 @@ ELFCAP= $(SRC)/common/elfcap # Reassign CPPFLAGS so that local search paths are used before any parent # $ROOT paths. -CPPFLAGS = -I. -I../common -I../../include -I../../include/$(MACH) \ +CPPFLAGS = -I. -I../common -I$(SGSHOME)/include -I$(SGSHOME)/include/$(MACH) \ $(CPPFLAGS.master) -I$(ELFCAP) # PICS64 is unique to our environment @@ -77,7 +77,7 @@ DYNFLAGS += $(ZIGNORE) # Establish the local tools, proto and package area. SGSHOME = $(SRC)/cmd/sgs -SGSPROTO = $(SGSHOME)/proto/$(MACH) +SGSCOMMON = $(SGSHOME)/common SGSTOOLS = $(SGSHOME)/tools SGSMSGID = $(SGSHOME)/messages SGSMSGDIR = $(SGSHOME)/messages/$(MACH) @@ -85,12 +85,6 @@ SGSONLD = $(ROOT)/opt/SUNWonld SGSRPATH = /usr/lib SGSRPATH64 = $(SGSRPATH)/$(MACH64) -# Mimic the structure of an installed system. - -SGSLIBDIR = $(SGSPROTO)/lib -SGSPREFIX = $(SGSPROTO)/usr -SGSBINDIR = $(SGSPREFIX)/bin - # # Macros to be used to include link against libconv and include vernote.o # @@ -117,33 +111,10 @@ DTEXTDOM = # Define any generic sgsmsg(1l) flags. The default message generation system # is to use gettext(3i), add the -C flag to switch to catgets(3c). -SGSMSG = $(SGSTOOLS)/$(MACH)/sgsmsg +SGSMSG = $(ONBLD_TOOLS)/bin/$(MACH)/sgsmsg SGSMSG_PIGLATIN_NL = perl $(SGSTOOLS)/common/sgsmsg_piglatin_nl.pl -CHKMSG = $(SGSTOOLS)/chkmsg.sh +CHKMSG = $(SGSHOME)/tools/chkmsg.sh SGSMSGVFLAG = SGSMSGFLAGS = $(SGSMSGVFLAG) -i $(SGSMSGID)/sgs.ident CHKMSGFLAGS = $(SGSMSGTARG:%=-m %) $(SGSMSGCHK:%=-m %) - -# Native targets should use the minimum of ld(1) flags to allow building on -# previous releases. We use mapfiles to scope, but don't bother versioning. - -native := DYNFLAGS = -R$(SGSLIBDIR) -L$(SGSLIBDIR) $(ZNOVERSION) \ - $(HSONAME) - -# Comment out the following two lines to have the sgs built from the system -# link-editor, rather than the local proto link-editor. -CC_USE_PROTO = -Yl,$(SGSBINDIR) -LD_USE_PROTO = $(SGSBINDIR)/ - -LD_LIB = -lld -LD_LIB32 = -lld32 -LD_LIB64 = -lld64 - -LDDBG_LIB = -llddbg -LDDBG_LIB32 = -llddbg32 -LDDBG_LIB64 = -llddbg64 - -CONV_LIB = -lconv -CONV_LIB32 = -lconv32 -CONV_LIB64 = -lconv64 diff --git a/usr/src/cmd/sgs/Makefile.targ b/usr/src/cmd/sgs/Makefile.targ index 776fedad57..b8d85bef18 100644 --- a/usr/src/cmd/sgs/Makefile.targ +++ b/usr/src/cmd/sgs/Makefile.targ @@ -51,19 +51,4 @@ $(ROOTFS_LIBDIR)/$(LIBLINKSCCC): $(ROOTFS_LIBDIR)/$(LIBLINKSCCC)$(VERS) $(ROOTFS_LIBDIR64)/$(LIBLINKSCCC): $(ROOTFS_LIBDIR64)/$(LIBLINKSCCC)$(VERS) $(INS.liblinkccc64) -# -# For those that install into the SGSPROTO directory. -# -$(SGSPROTO): - $(INS.dir) - -$(SGSBINDIR): $(SGSPROTO) - $(INS.dir) - -$(SGSPREFIX): $(SGSPROTO) - $(INS.dir) - -$(SGSLIBDIR): $(SGSPREFIX) - $(INS.dir) - FRC: diff --git a/usr/src/cmd/sgs/Makefile.var b/usr/src/cmd/sgs/Makefile.var index 2e27e5411b..c2984dc553 100644 --- a/usr/src/cmd/sgs/Makefile.var +++ b/usr/src/cmd/sgs/Makefile.var @@ -69,8 +69,8 @@ VAR_PLAT_amd64= intel/amd64 # files avl.c, avl.h and avl_impl.h until these files are back ported into # the system. # -VAR_AVLDIR= $(SRCBASE)/common/avl -VAR_AVLINCDIR= -I $(SRCBASE)/uts/common +VAR_AVLDIR= $(SRC)/common/avl +VAR_AVLINCDIR= -I $(SRC)/uts/common # # VAR_DTRDIR - directory to find dtrace_data.c in. @@ -78,7 +78,7 @@ VAR_AVLINCDIR= -I $(SRCBASE)/uts/common # In Solaris 10 and earlier releases, dtrace_data.c was maintained as separate # files under sgs/rtld. This file is now under usr/src/common/dtrace. # -VAR_DTRDIR= $(SRCBASE)/common/dtrace +VAR_DTRDIR= $(SRC)/common/dtrace # # VAR_SGSBINPROG diff --git a/usr/src/cmd/sgs/ar/Makefile.com b/usr/src/cmd/sgs/ar/Makefile.com index 0ea19dc3a8..2afc58d8f3 100644 --- a/usr/src/cmd/sgs/ar/Makefile.com +++ b/usr/src/cmd/sgs/ar/Makefile.com @@ -47,7 +47,7 @@ CERRWARN += $(CNOWARN_UNINIT) SMOFF += signed -LDLIBS += -lelf $(CONVLIBDIR) $(CONV_LIB) -lsendfile +LDLIBS += -lelf $(CONVLIBDIR) -lconv -lsendfile $(XPG4) := CPPFLAGS += -DXPG4 @@ -63,6 +63,6 @@ SGSMSGALL = $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n ar_msg -SRCS= $(COMOBJ:%.o=../common/%.c) $(BLTDATA:%.o=$(SGSTOOLS)/common/%.c) +SRCS= $(COMOBJ:%.o=../common/%.c) $(BLTDATA:%.o=$(SGSCOMMON)/%.c) CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/tools/common/alist.c b/usr/src/cmd/sgs/common/alist.c index 51af6c0feb..51af6c0feb 100644 --- a/usr/src/cmd/sgs/tools/common/alist.c +++ b/usr/src/cmd/sgs/common/alist.c diff --git a/usr/src/cmd/sgs/tools/common/assfail.c b/usr/src/cmd/sgs/common/assfail.c index 4e0ccb7637..a362190f63 100644 --- a/usr/src/cmd/sgs/tools/common/assfail.c +++ b/usr/src/cmd/sgs/common/assfail.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <stdlib.h> #include <stdio.h> @@ -37,7 +35,7 @@ int assfail(const char *a, const char *f, int l) { (void) printf("assertion failed: %s, file: %s, line: %d\n", - a, f, l); + a, f, l); abort(); return (0); } diff --git a/usr/src/cmd/sgs/tools/common/findprime.c b/usr/src/cmd/sgs/common/findprime.c index 87d88c0b93..aebc611a76 100644 --- a/usr/src/cmd/sgs/tools/common/findprime.c +++ b/usr/src/cmd/sgs/common/findprime.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/types.h> /* diff --git a/usr/src/cmd/sgs/tools/common/leb128.c b/usr/src/cmd/sgs/common/leb128.c index ce30be83a6..ce30be83a6 100644 --- a/usr/src/cmd/sgs/tools/common/leb128.c +++ b/usr/src/cmd/sgs/common/leb128.c diff --git a/usr/src/cmd/sgs/tools/common/strhash.c b/usr/src/cmd/sgs/common/strhash.c index d7d4dcbafd..5502fbaa56 100644 --- a/usr/src/cmd/sgs/tools/common/strhash.c +++ b/usr/src/cmd/sgs/common/strhash.c @@ -24,8 +24,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sgs.h> /* diff --git a/usr/src/cmd/sgs/tools/common/string_table.c b/usr/src/cmd/sgs/common/string_table.c index c15473150e..c15473150e 100644 --- a/usr/src/cmd/sgs/tools/common/string_table.c +++ b/usr/src/cmd/sgs/common/string_table.c diff --git a/usr/src/cmd/sgs/crle/Makefile.com b/usr/src/cmd/sgs/crle/Makefile.com index 252ecd28a3..358f4def66 100644 --- a/usr/src/cmd/sgs/crle/Makefile.com +++ b/usr/src/cmd/sgs/crle/Makefile.com @@ -35,9 +35,9 @@ include $(SRC)/cmd/sgs/Makefile.com COMOBJ= config.o crle.o depend.o dump.o \ inspect.o hash.o print.o util.o BLTOBJ= msg.o -TOOLSOBJ= alist.o +SGSCOMMONOBJ= alist.o -OBJS= $(BLTOBJ) $(COMOBJ) $(TOOLSOBJ) +OBJS= $(BLTOBJ) $(COMOBJ) $(SGSCOMMONOBJ) MAPFILE= $(MAPFILE.NGB) MAPOPT= $(MAPFILE:%=-M%) @@ -45,13 +45,12 @@ MAPOPT= $(MAPFILE:%=-M%) # not linted SMATCH=off -CPPFLAGS += -I$(SRC)/common/sgsrtcid -I$(SRCBASE)/uts/$(ARCH)/sys \ +CPPFLAGS += -I$(SRC)/common/sgsrtcid -I$(SRC)/uts/$(ARCH)/sys \ -D__EXTENSIONS__ LLDFLAGS = '-R$$ORIGIN/../lib' LLDFLAGS64 = '-R$$ORIGIN/../../lib/$(MACH64)' -LDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPT) \ - $(LLDFLAGS) $(ZNOLAZYLOAD) -LDLIBS += -lelf $(CONVLIBDIR) $(CONV_LIB) $(DLLIB) +LDFLAGS += $(VERSREF) $(MAPOPT) $(LLDFLAGS) $(ZNOLAZYLOAD) +LDLIBS += -lelf $(CONVLIBDIR) -lconv BLTDEFS= msg.h BLTDATA= msg.c @@ -66,6 +65,6 @@ SGSMSGALL= $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n crle_msg SRCS= $(COMOBJ:%.o=../common/%.c) $(BLTDATA) \ - $(TOOLSOBJ:%.o=$(SGSTOOLS)/common/%.c) + $(COMMON:%.o=$(SGSCOMMON)/%.c) CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/crle/Makefile.targ b/usr/src/cmd/sgs/crle/Makefile.targ index 850e37892f..346aec755a 100644 --- a/usr/src/cmd/sgs/crle/Makefile.targ +++ b/usr/src/cmd/sgs/crle/Makefile.targ @@ -28,7 +28,7 @@ $(COMPILE.c) $< $(POST_PROCESS_O) -%.o: $(SGSTOOLS)/common/%.c +%.o: $(SGSCOMMON)/%.c $(COMPILE.c) $< $(POST_PROCESS_O) diff --git a/usr/src/cmd/sgs/dump/Makefile.com b/usr/src/cmd/sgs/dump/Makefile.com index e857d76a95..6fee454721 100644 --- a/usr/src/cmd/sgs/dump/Makefile.com +++ b/usr/src/cmd/sgs/dump/Makefile.com @@ -48,4 +48,4 @@ CERRWARN += $(CNOWARN_UNINIT) SMOFF += indenting -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf +LDLIBS += $(CONVLIBDIR) -lconv $(ELFLIBDIR) -lelf diff --git a/usr/src/cmd/sgs/elfdump/Makefile.com b/usr/src/cmd/sgs/elfdump/Makefile.com index a82d85307e..968c8ae99c 100644 --- a/usr/src/cmd/sgs/elfdump/Makefile.com +++ b/usr/src/cmd/sgs/elfdump/Makefile.com @@ -39,23 +39,23 @@ COMOBJ32 = elfdump32.o fake_shdr32.o COMOBJ64 = elfdump64.o fake_shdr64.o -TOOLOBJ = leb128.o +SGSCOMMONOBJ = leb128.o BLTOBJ = msg.o -OBJS= $(BLTOBJ) $(COMOBJ) $(COMOBJ32) $(COMOBJ64) $(TOOLOBJ) +OBJS= $(BLTOBJ) $(COMOBJ) $(COMOBJ32) $(COMOBJ64) $(SGSCOMMONOBJ) MAPFILE= $(MAPFILE.NGB) MAPOPT= $(MAPFILE:%=-M%) CPPFLAGS= -I. -I../common -I../../include -I../../include/$(MACH) \ - -I$(SRCBASE)/lib/libc/inc -I$(SRCBASE)/uts/$(ARCH)/sys \ + -I$(SRC)/lib/libc/inc -I$(SRC)/uts/$(ARCH)/sys \ $(CPPFLAGS.master) -I$(ELFCAP) LLDFLAGS = $(VAR_ELFDUMP_LLDFLAGS) LLDFLAGS64 = $(VAR_ELFDUMP_LLDFLAGS64) -LDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPT) $(LLDFLAGS) -LDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) $(LDDBG_LIB) \ - $(CONVLIBDIR) $(CONV_LIB) +LDFLAGS += $(VERSREF) $(MAPOPT) $(LLDFLAGS) +LDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) -llddbg \ + $(CONVLIBDIR) -lconv CERRWARN += $(CNOWARN_UNINIT) @@ -75,6 +75,6 @@ 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) + $(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) $(BLTDATA) CLEANFILES += $(BLTFILES) gen_struct_layout diff --git a/usr/src/cmd/sgs/elfdump/Makefile.targ b/usr/src/cmd/sgs/elfdump/Makefile.targ index 4cbbec6bff..6122df233d 100644 --- a/usr/src/cmd/sgs/elfdump/Makefile.targ +++ b/usr/src/cmd/sgs/elfdump/Makefile.targ @@ -39,7 +39,7 @@ $(COMPILE.c) -D_ELF64 -o $@ $< $(POST_PROCESS_O) -%.o: $(SGSTOOLS)/common/%.c +%.o: $(SGSCOMMON)/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) diff --git a/usr/src/cmd/sgs/elfedit/Makefile.com b/usr/src/cmd/sgs/elfedit/Makefile.com index 99b630ff47..e218130693 100644 --- a/usr/src/cmd/sgs/elfedit/Makefile.com +++ b/usr/src/cmd/sgs/elfedit/Makefile.com @@ -44,13 +44,13 @@ OBJS= $(BLTOBJ) $(COMOBJ) $(COMOBJ32) $(COMOBJ64) MAPFILE= ../common/mapfile-vers CPPFLAGS= -I. -I../common -I../../include -I../../include/$(MACH) \ - -I$(SRCBASE)/lib/libc/inc -I$(SRCBASE)/uts/$(ARCH)/sys \ + -I$(SRC)/lib/libc/inc -I$(SRC)/uts/$(ARCH)/sys \ $(CPPFLAGS.master) -I$(ELFCAP) LLDFLAGS = $(VAR_ELFEDIT_LLDFLAGS) LLDFLAGS64 = $(VAR_ELFEDIT_LLDFLAGS64) -LDFLAGS += $(VERSREF) $(CC_USE_PROTO) -M$(MAPFILE) $(LLDFLAGS) -LDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) $(LDDBG_LIB) \ - $(CONVLIBDIR) $(CONV_LIB) -ltecla +LDFLAGS += $(VERSREF) -M$(MAPFILE) $(LLDFLAGS) +LDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) -llddbg \ + $(CONVLIBDIR) -lconv -ltecla CERRWARN += -_gcc=-Wno-switch CERRWARN += $(CNOWARN_UNINIT) diff --git a/usr/src/cmd/sgs/elfedit/Makefile.targ b/usr/src/cmd/sgs/elfedit/Makefile.targ index e5efa499c8..9f31a1770a 100644 --- a/usr/src/cmd/sgs/elfedit/Makefile.targ +++ b/usr/src/cmd/sgs/elfedit/Makefile.targ @@ -36,7 +36,7 @@ $(COMPILE.c) -D_ELF64 -o $@ $< $(POST_PROCESS_O) -%.o: $(SGSTOOLS)/common/%.c +%.o: $(SGSCOMMON)/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) diff --git a/usr/src/cmd/sgs/elfedit/modules/Makefile.com b/usr/src/cmd/sgs/elfedit/modules/Makefile.com index e9de1523b9..721361a456 100644 --- a/usr/src/cmd/sgs/elfedit/modules/Makefile.com +++ b/usr/src/cmd/sgs/elfedit/modules/Makefile.com @@ -67,8 +67,8 @@ STR_PICS= $(STR_OBJ:%.o=$(PICDIR)/%.o) SYM_PICS= $(SYM_OBJ:%.o=$(PICDIR)/%.o) SYMINFO_PICS= $(SYMINFO_OBJ:%.o=$(PICDIR)/%.o) -LDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) $(LDDBG_LIB) \ - $(CONVLIBDIR) $(CONV_LIB) -lc +LDLIBS += $(ELFLIBDIR) -lelf $(LDDBGLIBDIR) -llddbg \ + $(CONVLIBDIR) -lconv -lc $(CAP_LIB):= PICS = $(CAP_PICS) $(DYN_LIB):= PICS = $(DYN_PICS) @@ -92,10 +92,10 @@ $(SYMINFO_LIB):= SONAME = $(SYMINFO_LIB) MAPFILES = ../common/mapfile-vers CPPFLAGS += -I../../../include -I../../../include/$(MACH) \ - -I../$(SRCBASE)/lib/libc/inc -D_REENTRANT + -I$(SRC)/lib/libc/inc -D_REENTRANT LLDFLAGS = '-R$$ORIGIN/../../../lib' LLDFLAGS64 = '-R$$ORIGIN/../../../../lib/$(MACH64)' -LDFLAGS += $(CC_USE_PROTO) $(LLDFLAGS) +LDFLAGS += $(LLDFLAGS) DYNFLAGS += $(VERSREF) CERRWARN += -_gcc=-Wno-switch diff --git a/usr/src/cmd/sgs/elfedit/modules/Makefile.targ b/usr/src/cmd/sgs/elfedit/modules/Makefile.targ index 24f3b53e68..350bb280c9 100644 --- a/usr/src/cmd/sgs/elfedit/modules/Makefile.targ +++ b/usr/src/cmd/sgs/elfedit/modules/Makefile.targ @@ -101,10 +101,6 @@ $(ROOTELFEDITDIR64)/%: % $(SGSMSGDIR)/elfedit_%: $(SGSMSG) ../common/%.msg $(SGSMSG) $(SGSMSGFLAGS) -l -m $(SGSMSGDIR)/elfedit_$* $< -$(SGSMSG): - @ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog - @ pwd - catalog: $(SGSMSGDIR)/elfedit_cap \ $(SGSMSGDIR)/elfedit_dyn \ $(SGSMSGDIR)/elfedit_ehdr \ diff --git a/usr/src/cmd/sgs/elfwrap/Makefile.com b/usr/src/cmd/sgs/elfwrap/Makefile.com index fa84c86328..de5a4e2892 100644 --- a/usr/src/cmd/sgs/elfwrap/Makefile.com +++ b/usr/src/cmd/sgs/elfwrap/Makefile.com @@ -40,12 +40,12 @@ COMOBJ32 = elfwrap32.o COMOBJ64 = elfwrap64.o -TOOLOBJS = alist.o +SGSCOMMONOBJ = alist.o BLTOBJ = msg.o OBJS= $(BLTOBJ) $(COMOBJ) $(MACHOBJ) $(COMOBJ32) $(COMOBJ64) \ - $(TOOLOBJS) + $(SGSCOMMONOBJ) MAPFILES = $(MAPFILE.NGB) MAPOPTS = $(MAPFILES:%=-M%) @@ -53,8 +53,8 @@ MAPOPTS = $(MAPFILES:%=-M%) CPPFLAGS = -I. -I../common -I../../include $(CPPFLAGS.master) -I$(ELFCAP) LLDFLAGS = LLDFLAGS64 = -LDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPTS) $(LLDFLAGS) -LDLIBS += $(ELFLIBDIR) -lelf $(CONVLIBDIR) $(CONV_LIB) +LDFLAGS += $(VERSREF) $(MAPOPTS) $(LLDFLAGS) +LDLIBS += $(ELFLIBDIR) -lelf $(CONVLIBDIR) -lconv CERRWARN += $(CNOWARN_UNINIT) @@ -71,6 +71,6 @@ 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) + $(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) $(BLTDATA) CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/elfwrap/Makefile.targ b/usr/src/cmd/sgs/elfwrap/Makefile.targ index b315de2c50..117cd43f38 100644 --- a/usr/src/cmd/sgs/elfwrap/Makefile.targ +++ b/usr/src/cmd/sgs/elfwrap/Makefile.targ @@ -38,7 +38,7 @@ $(COMPILE.c) -D_ELF64 -o $@ $< $(POST_PROCESS_O) -%.o: $(SGSTOOLS)/common/%.c +%.o: $(SGSCOMMON)/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) diff --git a/usr/src/cmd/sgs/gprof/Makefile.com b/usr/src/cmd/sgs/gprof/Makefile.com index 1a46e900cb..78a43fca4e 100644 --- a/usr/src/cmd/sgs/gprof/Makefile.com +++ b/usr/src/cmd/sgs/gprof/Makefile.com @@ -43,7 +43,7 @@ DEFLIST= -DELF_OBJ -DELF CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) -I$(ELFCAP) CFLAGS += $(CCVERBOSE) CSTD= $(CSTD_GNU99) -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf +LDLIBS += $(CONVLIBDIR) -lconv $(ELFLIBDIR) -lelf CERRWARN += $(CNOWARN_UNINIT) # not linted diff --git a/usr/src/cmd/sgs/include/conv.h b/usr/src/cmd/sgs/include/conv.h index 066e215bc4..4133866e86 100644 --- a/usr/src/cmd/sgs/include/conv.h +++ b/usr/src/cmd/sgs/include/conv.h @@ -42,10 +42,7 @@ #include <libld.h> #include <sgs.h> #include <sgsmsg.h> - -#ifndef NATIVE_BUILD #include <sys/secflags.h> -#endif #ifdef __cplusplus extern "C" { @@ -331,14 +328,12 @@ typedef union { char buf[CONV_CNOTE_PROC_FLAG_BUFSIZE]; } Conv_cnote_proc_flag_buf_t; -#ifndef NATIVE_BUILD /* conv_prsecflags() */ #define CONV_PRSECFLAGS_BUFSIZE 57 typedef union { Conv_inv_buf_t inv_buf; char buf[CONV_PRSECFLAGS_BUFSIZE]; } Conv_secflags_buf_t; -#endif /* conv_cnote_sigset() */ #define CONV_CNOTE_SIGSET_BUFSIZE 639 @@ -592,7 +587,7 @@ typedef enum { } conv_ds_type_t; #define CONV_DS_COMMON_FIELDS \ - conv_ds_type_t ds_type; /* Type of data structure used */ \ + conv_ds_type_t ds_type; /* Type of data structure used */ \ uint32_t ds_baseval; /* Value of first item */ \ uint32_t ds_topval /* Value of last item */ @@ -836,10 +831,8 @@ extern const char *conv_cnote_pr_why(short, Conv_fmt_flags_t, Conv_inv_buf_t *); extern const char *conv_cnote_priv(int, Conv_fmt_flags_t, Conv_inv_buf_t *); -#ifndef NATIVE_BUILD extern const char *conv_prsecflags(secflagset_t, Conv_fmt_flags_t, Conv_secflags_buf_t *); -#endif extern const char *conv_cnote_psetid(int, Conv_fmt_flags_t, Conv_inv_buf_t *); extern const char *conv_cnote_sa_flags(int, Conv_fmt_flags_t, diff --git a/usr/src/cmd/sgs/ld/Makefile.com b/usr/src/cmd/sgs/ld/Makefile.com index 9cf9e0a713..81e507a969 100644 --- a/usr/src/cmd/sgs/ld/Makefile.com +++ b/usr/src/cmd/sgs/ld/Makefile.com @@ -36,33 +36,30 @@ BLTOBJ = msg.o OBJS = $(BLTOBJ) $(COMOBJS) .PARALLEL: $(OBJS) -MAPFILES = ../common/mapfile-intf $(MAPFILE.NGB) +SRCDIR = $(SGSHOME)/ld + +MAPFILES = $(SRCDIR)/common/mapfile-intf $(MAPFILE.NGB) MAPOPTS = $(MAPFILES:%=-M%) -LDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPTS) $(VAR_LD_LLDFLAGS) -LDLIBS += $(LDLIBDIR) $(LD_LIB) $(ELFLIBDIR) -lelf \ - $(LDDBGLIBDIR) $(LDDBG_LIB) $(CONVLIBDIR) $(CONV_LIB) +LDFLAGS += $(VERSREF) $(MAPOPTS) $(VAR_LD_LLDFLAGS) +LDLIBS += $(LDLIBDIR) -lld $(ELFLIBDIR) -lelf \ + $(LDDBGLIBDIR) -llddbg $(CONVLIBDIR) -lconv CERRWARN += -_gcc=-Wno-switch CERRWARN += -_gcc=-Wno-parentheses -native := LDFLAGS = -R$(SGSLIBDIR) $(ZNOVERSION) -native := LDLIBS = -L$(SGSLIBDIR) $(LD_LIB) -lelf $(CONVLIBDIR) \ - $(CONV_LIB) -native := CPPFLAGS += -DNATIVE_BUILD - BLTDEFS= msg.h BLTDATA= msg.c BLTMESG= $(SGSMSGDIR)/ld BLTFILES= $(BLTDEFS) $(BLTDATA) $(BLTMESG) -SGSMSGCOM= ../common/ld.msg +SGSMSGCOM= $(SRCDIR)/common/ld.msg SGSMSGTARG= $(SGSMSGCOM) SGSMSGALL= $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n ld_msg -SRCS= $(MACHOBJS:%.o=%.c) $(COMOBJS:%.o=../common/%.c) $(BLTDATA) +SRCS= $(MACHOBJS:%.o=%.c) $(COMOBJS:%.o=$(SRCDIR)/common/%.c) $(BLTDATA) CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/ld/Makefile.targ b/usr/src/cmd/sgs/ld/Makefile.targ index b2155c2a73..075e67d8f3 100644 --- a/usr/src/cmd/sgs/ld/Makefile.targ +++ b/usr/src/cmd/sgs/ld/Makefile.targ @@ -29,10 +29,7 @@ all: $(PROG) -package \ -install: all $(VAR_SGSBINPROG) $(VAR_SGSCCSLINK) - -%.o: ../common/%.c +%.o: $(SRCDIR)/common/%.c $(COMPILE.c) $< $(POST_PROCESS_O) @@ -49,15 +46,6 @@ delete: include $(SRC)/cmd/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ -# Special target for native builds (ie. when we need to build a version of ld -# to build a version of ld :-). - -native: $(SGSBINDIR)/$(PROG) - -$(SGSBINDIR)/$(PROG): $(OBJS) $(SGSBINDIR) - $(LINK.c) $(OBJS) -o $@ $(LDLIBS) - $(POST_PROCESS) - # Derived source and header files (messaging). catalog: $(BLTMESG) diff --git a/usr/src/cmd/sgs/ld/amd64/Makefile b/usr/src/cmd/sgs/ld/amd64/Makefile index 80b7029540..8e329ec823 100644 --- a/usr/src/cmd/sgs/ld/amd64/Makefile +++ b/usr/src/cmd/sgs/ld/amd64/Makefile @@ -23,7 +23,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" # include ../Makefile.com @@ -33,12 +32,11 @@ ELFLIBDIR = $(ELFLIBDIR64) LDDBGLIBDIR = $(LDDBGLIBDIR64) CONVLIBDIR = $(CONVLIBDIR64) -VAR_SGSBINPROG= $(VAR_SGSBINPROG64) -VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) - VAR_LD_LLDFLAGS = \ $(VAR_LD_LLDFLAGS64) +package install: all $(VAR_SGSBINPROG64) $(VAR_SGSCCSLINK64) + .KEEP_STATE: include ../Makefile.targ diff --git a/usr/src/cmd/sgs/ld/i386/Makefile b/usr/src/cmd/sgs/ld/i386/Makefile index 0955bc546b..b8adbefe49 100644 --- a/usr/src/cmd/sgs/ld/i386/Makefile +++ b/usr/src/cmd/sgs/ld/i386/Makefile @@ -19,9 +19,6 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1996 by Sun Microsystems, Inc. # All rights reserved. @@ -29,4 +26,6 @@ include ../Makefile.com .KEEP_STATE: +package install: all $(VAR_SGSBINPROG) $(VAR_SGSCCSLINK) + include ../Makefile.targ diff --git a/usr/src/cmd/sgs/ld/sparc/Makefile b/usr/src/cmd/sgs/ld/sparc/Makefile index 0955bc546b..b8adbefe49 100644 --- a/usr/src/cmd/sgs/ld/sparc/Makefile +++ b/usr/src/cmd/sgs/ld/sparc/Makefile @@ -19,9 +19,6 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1996 by Sun Microsystems, Inc. # All rights reserved. @@ -29,4 +26,6 @@ include ../Makefile.com .KEEP_STATE: +package install: all $(VAR_SGSBINPROG) $(VAR_SGSCCSLINK) + include ../Makefile.targ diff --git a/usr/src/cmd/sgs/ld/sparcv9/Makefile b/usr/src/cmd/sgs/ld/sparcv9/Makefile index dda1b9ce13..64a2db892f 100644 --- a/usr/src/cmd/sgs/ld/sparcv9/Makefile +++ b/usr/src/cmd/sgs/ld/sparcv9/Makefile @@ -23,8 +23,6 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" -# include ../Makefile.com @@ -33,13 +31,12 @@ ELFLIBDIR = $(ELFLIBDIR64) LDDBGLIBDIR = $(LDDBGLIBDIR64) CONVLIBDIR = $(CONVLIBDIR64) -VAR_SGSBINPROG= $(VAR_SGSBINPROG64) -VAR_SGSCCSLINK= $(VAR_SGSCCSLINK64) - VAR_LD_LLDFLAGS = \ $(VAR_LD_LLDFLAGS64) .KEEP_STATE: +package install: all $(VAR_SGSBINPROG64) $(VAR_SGSCCSLINK64) + include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/ldd/Makefile.com b/usr/src/cmd/sgs/ldd/Makefile.com index d3ec53655c..82621fe23e 100644 --- a/usr/src/cmd/sgs/ldd/Makefile.com +++ b/usr/src/cmd/sgs/ldd/Makefile.com @@ -34,20 +34,20 @@ include $(SRC)/cmd/sgs/Makefile.com COMOBJ= ldd.o BLTOBJ= msg.o -TOOLSOBJ= alist.o +SGSCOMMONOBJ= alist.o -OBJS= $(BLTOBJ) $(COMOBJ) $(TOOLSOBJ) +OBJS= $(BLTOBJ) $(COMOBJ) $(SGSCOMMONOBJ) MAPFILE= $(MAPFILE.NGB) MAPOPTS= $(MAPFILE:%=-M%) CPPFLAGS += -I. -I../../include -I../../include/$(MACH) \ - -I$(SRCBASE)/uts/$(ARCH)/sys \ + -I$(SRC)/uts/$(ARCH)/sys \ $(CPPFLAGS.master) LLDFLAGS = '-R$$ORIGIN/../../lib' LLDFLAGS64 = '-R$$ORIGIN/../../../lib/$(MACH64)' -LDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPTS) $(LLDFLAGS) -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) -lelf $(DLLIB) +LDFLAGS += $(VERSREF) $(MAPOPTS) $(LLDFLAGS) +LDLIBS += $(CONVLIBDIR) -lconv -lelf SMOFF += or_vs_and @@ -63,6 +63,6 @@ SGSMSGALL= $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n ldd_msg SRCS= $(COMOBJ:%.o=../common/%.c) $(BLTDATA) \ - $(TOOLSOBJ:%.o=$(SGSTOOLS)/common/%.c) + $(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/ldd/Makefile.targ b/usr/src/cmd/sgs/ldd/Makefile.targ index c3e4f19649..12c24ab1bb 100644 --- a/usr/src/cmd/sgs/ldd/Makefile.targ +++ b/usr/src/cmd/sgs/ldd/Makefile.targ @@ -26,7 +26,7 @@ $(COMPILE.c) $< $(POST_PROCESS_O) -%.o: $(SGSTOOLS)/common/%.c +%.o: $(SGSCOMMON)/%.c $(COMPILE.c) $< $(POST_PROCESS_O) @@ -49,7 +49,6 @@ 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/ldprof/Makefile.com b/usr/src/cmd/sgs/ldprof/Makefile.com index 81c85b2251..577ffbbc74 100644 --- a/usr/src/cmd/sgs/ldprof/Makefile.com +++ b/usr/src/cmd/sgs/ldprof/Makefile.com @@ -38,14 +38,13 @@ ROOTLIBDIR= $(ROOT)/usr/lib/link_audit MAPFILES = ../common/mapfile-vers -DYNFLAGS += $(CC_USE_PROTO) CPPFLAGS= -I. -I../common -I../../include \ -I../../rtld/common \ -I../../include/$(MACH) \ - -I$(SRCBASE)/lib/libc/inc \ - -I$(SRCBASE)/uts/common/krtld \ + -I$(SRC)/lib/libc/inc \ + -I$(SRC)/uts/common/krtld \ -I$(SRC)/common/sgsrtcid \ - -I$(SRCBASE)/uts/$(ARCH)/sys \ + -I$(SRC)/uts/$(ARCH)/sys \ $(CPPFLAGS.master) -I$(ELFCAP) CFLAGS += $(C_PICFLAGS) diff --git a/usr/src/cmd/sgs/libconv/Makefile.com b/usr/src/cmd/sgs/libconv/Makefile.com index cfc99fce64..daffcfa01e 100644 --- a/usr/src/cmd/sgs/libconv/Makefile.com +++ b/usr/src/cmd/sgs/libconv/Makefile.com @@ -89,6 +89,8 @@ CTFMERGE_LIB = : include $(SRC)/lib/Makefile.lib include $(SRC)/cmd/sgs/Makefile.com +SRCDIR = $(SRC)/cmd/sgs/libconv + CERRWARN += -_gcc=-Wno-type-limits CERRWARN += -_gcc=-Wno-switch @@ -97,12 +99,12 @@ SMATCH=off CTFCONVERT_O= -README_REVISION=../../packages/common/readme_revision -ONLDREADME= ../../packages/common/SUNWonld-README +README_REVISION= $(SGSHOME)/tools/readme_revision +ONLDREADME= $(SGSHOME)/tools/SUNWonld-README PICS= $(OBJECTS:%=pics/%) -CPPFLAGS += -I$(SRCBASE)/lib/libc/inc -I$(ELFCAP) \ +CPPFLAGS += -I$(SRC)/lib/libc/inc -I$(ELFCAP) \ -I$(SRC)/common/sgsrtcid ARFLAGS= cr diff --git a/usr/src/cmd/sgs/libconv/Makefile.targ b/usr/src/cmd/sgs/libconv/Makefile.targ index 94d9cf3fdf..edb023a4a9 100644 --- a/usr/src/cmd/sgs/libconv/Makefile.targ +++ b/usr/src/cmd/sgs/libconv/Makefile.targ @@ -26,7 +26,7 @@ # Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -pics/%.o: ../common/%.c +pics/%.o: $(SRCDIR)/common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) @@ -34,11 +34,11 @@ pics/%.o: %.s $(COMPILE.s) -o $@ $< $(POST_PROCESS_O) -pics/%32.o: ../common/%.c +pics/%32.o: $(SRCDIR)/common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%64.o: ../common/%.c +pics/%64.o: $(SRCDIR)/common/%.c $(COMPILE.c) -D_ELF64 -o $@ $< $(POST_PROCESS_O) @@ -55,27 +55,23 @@ pics/elfcap.o: $(ELFCAP)/elfcap.c # # We make this depend on Makefile.targ, because a change to Makefile.targ # can change the limit, in which case we want to force everything to rebuild. -report_bufsize.h: ../Makefile.targ - perl ../../tools/libconv_mk_report_bufsize.pl 8000 +report_bufsize.h: $(SRCDIR)/Makefile.targ + perl $(SRC)/cmd/sgs/tools/libconv_mk_report_bufsize.pl 8000 -../common/%.c ../common/%_machelf.c: %_msg.h +$(SRCDIR)/common/%.c $(SRCDIR)/common/%_machelf.c: %_msg.h -%_msg.h %_msg.c: $(SGSMSG) ../common/%.msg report_bufsize.h +%_msg.h + %_msg.c: $(SGSMSG) $(SRCDIR)/common/%.msg report_bufsize.h $(SGSMSG) $(SGSMSGFLAGS) -h $*_msg.h -d $*_msg.c \ -n sgs_msg_libconv_$* $< -$(SGSMSG): FRC - @ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog - @ pwd - vernote.s: bld_vernote $(README_REVISION) $(ONLDREADME) ./bld_vernote \ -R `perl $(README_REVISION) $(ONLDREADME)` \ -r "$(RELEASE)" -o $@ -bld_vernote: ../common/bld_vernote.ksh +bld_vernote: $(SRCDIR)/common/bld_vernote.ksh $(RM) -f $@ - cp ../common/bld_vernote.ksh $@ + cp $(SRCDIR)/common/bld_vernote.ksh $@ chmod a+x $@ $(LIBRARY): pics $$(PICS) @@ -89,7 +85,7 @@ chkmsg: $(MSGSRCS) catalog: pics: - -@mkdir -p $@ + $(MKDIR) -p $@ clobber: clean -$(RM) $(LIBRARY) $(CLOBBERFILES) diff --git a/usr/src/cmd/sgs/libcrle/Makefile.com b/usr/src/cmd/sgs/libcrle/Makefile.com index 92904198aa..c77dfa9500 100644 --- a/usr/src/cmd/sgs/libcrle/Makefile.com +++ b/usr/src/cmd/sgs/libcrle/Makefile.com @@ -42,8 +42,8 @@ SRCDIR = ../common LDLIBS += $(ZRECORD) -lmapmalloc $(DLLIB) -lc -CPPFLAGS += -I$(SRCBASE)/lib/libc/inc -I$(SRC)/common/sgsrtcid -DYNFLAGS += $(VERSREF) $(CONVLIBDIR) -lconv $(CC_USE_PROTO) +CPPFLAGS += -I$(SRC)/lib/libc/inc -I$(SRC)/common/sgsrtcid +DYNFLAGS += $(VERSREF) $(CONVLIBDIR) -lconv BLTDEFS= msg.h BLTDATA= msg.c diff --git a/usr/src/cmd/sgs/libelf/Makefile.com b/usr/src/cmd/sgs/libelf/Makefile.com index 35df043a20..23a27ce5f0 100644 --- a/usr/src/cmd/sgs/libelf/Makefile.com +++ b/usr/src/cmd/sgs/libelf/Makefile.com @@ -52,20 +52,22 @@ OBJECTS= $(BLTOBJS) $(MACHOBJS) $(COMOBJS) $(CLASSOBJS) $(MISCOBJS) include $(SRC)/lib/Makefile.lib +SRCDIR= $(SRC)/cmd/sgs/libelf + # Use the value of M4 set in Makefile.master via Makefile.lib DEMOFILES= Makefile 00README acom.c dcom.c \ pcom.c tpcom.c dispsyms.c -DEMOFILESRCDIR= ../demo +DEMOFILESRCDIR= $(SRCDIR)/demo ROOTDEMODIRBASE=$(ROOT)/usr/demo/ELF ROOTDEMODIRS= $(ROOTDEMODIRBASE) include $(SRC)/cmd/sgs/Makefile.com -MAPFILES = ../common/mapfile-vers +MAPFILES = $(SRCDIR)/common/mapfile-vers DYNFLAGS += $(VERSREF) -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) -lc +LDLIBS += $(CONVLIBDIR) -lconv -lc CERRWARN += -_gcc=-Wno-parentheses CERRWARN += $(CNOWARN_UNINIT) @@ -83,8 +85,8 @@ BLTMESG= $(SGSMSGDIR)/libelf BLTFILES= $(BLTDEFS) $(BLTDATA) $(BLTMESG) -SGSMSGCOM= ../common/libelf.msg -SGSMSG32= ../common/libelf.32.msg +SGSMSGCOM= $(SRCDIR)/common/libelf.msg +SGSMSG32= $(SRCDIR)/common/libelf.32.msg SGSMSGTARG= $(SGSMSGCOM) SGSMSGALL= $(SGSMSGCOM) $(SGSMSG32) @@ -92,7 +94,7 @@ SGSMSGFLAGS1= $(SGSMSGFLAGS) -m $(BLTMESG) SGSMSGFLAGS2= $(SGSMSGFLAGS) -h $(BLTDEFS) -d $(BLTDATA) -n libelf_msg BLTSRCS= $(BLTOBJS:%.o=%.c) -LIBSRCS= $(COMOBJS:%.o=../common/%.c) $(MISCOBJS:%.o=../misc/%.c) \ +LIBSRCS= $(COMOBJS:%.o=$(SRCDIR)/common/%.c) $(MISCOBJS:%.o=$(SRCDIR)/misc/%.c) \ $(MACHOBJS:%.o=%.c) $(BLTSRCS) ROOTFS_DYNLIB= $(DYNLIB:%=$(ROOTFS_LIBDIR)/%) diff --git a/usr/src/cmd/sgs/libelf/Makefile.targ b/usr/src/cmd/sgs/libelf/Makefile.targ index 7fd082fb9f..3db0b17918 100644 --- a/usr/src/cmd/sgs/libelf/Makefile.targ +++ b/usr/src/cmd/sgs/libelf/Makefile.targ @@ -30,25 +30,22 @@ pics/%.o: %.c $(POST_PROCESS_O) objs/%64.o \ -pics/%64.o: ../common/%.c +pics/%64.o: $(SRCDIR)/common/%.c $(COMPILE.c) -D_ELF64 -o $@ $< $(POST_PROCESS_O) objs/%.o \ -pics/%.o: ../misc/%.c +pics/%.o: $(SRCDIR)/misc/%.c $(COMPILE.c) -DELF -o $@ $< $(POST_PROCESS_O) objs/%.o \ -pics/%.o: ../common/%.c +pics/%.o: $(SRCDIR)/common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) all: $(BLTSRCS) .WAIT $(LIBS) $(LIBLINKS) -install: all .WAIT $(ROOTFS_LIBS) $(ROOTFS_LINKS) \ - .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) - delete: $(RM) $(DYNLIB) @@ -63,11 +60,11 @@ CLOBBERFILES += $(LIBLINKS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ -xlate.c: ../common/xlate.m4 - $(M4) < ../common/xlate.m4 > xlate.c +xlate.c: $(SRCDIR)/common/xlate.m4 + $(M4) < $(SRCDIR)/common/xlate.m4 > xlate.c -xlate64.c: ../common/xlate64.m4 - $(M4) < ../common/xlate64.m4 > xlate64.c +xlate64.c: $(SRCDIR)/common/xlate64.m4 + $(M4) < $(SRCDIR)/common/xlate64.m4 > xlate64.c objs/msg.o \ @@ -82,22 +79,8 @@ pics/ar.o: msg.h objs/xlate.o \ pics/xlate.o: xlate.c -# Special target for native builds (ie. when we need to build a version of ld -# to build a version of ld :-). - -native: $(SGSLIBDIR)/$(LIBLINKS) - $(PICS): pics -$(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR) - $(BUILD.SO) - $(POST_PROCESS_SO) - -$(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB) - -@$(RM) $(SGSLIBDIR)/$(LIBLINKS) - $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS) - - # Derived source and header files (messaging). Make sure that the sgsmsg # command is constructed - libelf might not be built with the whole sgs. @@ -107,14 +90,10 @@ chkmsg: $(LIBSRCS) sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS) $(BLTDEFS) + \ -$(BLTDATA): $(SGSMSG) $(SGSMSGTARG) +$(BLTDATA): $(SGSMSGTARG) $(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG) -$(BLTMESG): $(SGSMSG) $(SGSMSGALL) xlate.c xlate64.c +$(BLTMESG): $(SGSMSGALL) xlate.c xlate64.c $(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL) -$(SGSMSG): FRC - @ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog - @ pwd - FRC: diff --git a/usr/src/cmd/sgs/libelf/Makefile.targ.64 b/usr/src/cmd/sgs/libelf/Makefile.targ.64 index 058ceace4c..7cc82d9fa9 100644 --- a/usr/src/cmd/sgs/libelf/Makefile.targ.64 +++ b/usr/src/cmd/sgs/libelf/Makefile.targ.64 @@ -45,8 +45,6 @@ pics/%.o: ../common/%.c all: $(BLTSRCS) .WAIT $(LIBS) $(LIBLINKS) -install: all .WAIT $(ROOTFS_LIBS64) $(ROOTFS_LINKS64) - delete: $(RM) $(DYNLIB) @@ -89,16 +87,12 @@ chkmsg: $(LIBSRCS) sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS) $(BLTDEFS) + \ -$(BLTDATA): $(SGSMSG) $(SGSMSGTARG) +$(BLTDATA): $(SGSMSGTARG) $(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG) -$(BLTMESG): $(SGSMSG) $(SGSMSGALL) xlate.c xlate64.c +$(BLTMESG): $(SGSMSGALL) xlate.c xlate64.c $(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL) -$(SGSMSG): FRC - @ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog - @ pwd - # # 64-bit overrides # diff --git a/usr/src/cmd/sgs/libelf/amd64/Makefile b/usr/src/cmd/sgs/libelf/amd64/Makefile index 99651ac38b..94251398d8 100644 --- a/usr/src/cmd/sgs/libelf/amd64/Makefile +++ b/usr/src/cmd/sgs/libelf/amd64/Makefile @@ -34,4 +34,6 @@ MISCOBJS= $(MISCOBJS64) .KEEP_STATE: +install: all .WAIT $(ROOTFS_LIBS64) $(ROOTFS_LINKS64) + include ../Makefile.targ.64 diff --git a/usr/src/cmd/sgs/libelf/i386/Makefile b/usr/src/cmd/sgs/libelf/i386/Makefile index be3bf8ab80..a14fcadcdb 100644 --- a/usr/src/cmd/sgs/libelf/i386/Makefile +++ b/usr/src/cmd/sgs/libelf/i386/Makefile @@ -29,4 +29,7 @@ SGSMSGTARG += $(SGSMSG32) .KEEP_STATE: +install: all .WAIT $(ROOTFS_LIBS) $(ROOTFS_LINKS) \ + .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) + include ../Makefile.targ diff --git a/usr/src/cmd/sgs/libelf/sparc/Makefile b/usr/src/cmd/sgs/libelf/sparc/Makefile index 0cdef9272f..f5e39a6940 100644 --- a/usr/src/cmd/sgs/libelf/sparc/Makefile +++ b/usr/src/cmd/sgs/libelf/sparc/Makefile @@ -29,4 +29,7 @@ SGSMSGTARG += $(SGSMSG32) .KEEP_STATE: +install: all .WAIT $(ROOTFS_LIBS) $(ROOTFS_LINKS) \ + .WAIT $(ROOTDEMODIRS) .WAIT $(ROOTDEMOFILES) + include ../Makefile.targ diff --git a/usr/src/cmd/sgs/libelf/sparcv9/Makefile b/usr/src/cmd/sgs/libelf/sparcv9/Makefile index 99651ac38b..94251398d8 100644 --- a/usr/src/cmd/sgs/libelf/sparcv9/Makefile +++ b/usr/src/cmd/sgs/libelf/sparcv9/Makefile @@ -34,4 +34,6 @@ MISCOBJS= $(MISCOBJS64) .KEEP_STATE: +install: all .WAIT $(ROOTFS_LIBS64) $(ROOTFS_LINKS64) + include ../Makefile.targ.64 diff --git a/usr/src/cmd/sgs/libld/Makefile.com b/usr/src/cmd/sgs/libld/Makefile.com index c85abded8f..f471b398bf 100644 --- a/usr/src/cmd/sgs/libld/Makefile.com +++ b/usr/src/cmd/sgs/libld/Makefile.com @@ -47,7 +47,7 @@ COMOBJS64 = args64.o entry64.o exit64.o groups64.o \ sunwmove64.o support64.o syms64.o update64.o \ unwind64.o version64.o wrap64.o -TOOLOBJS = alist.o assfail.o findprime.o string_table.o \ +SGSCOMMONOBJ = alist.o assfail.o findprime.o string_table.o \ strhash.o AVLOBJ = avl.o @@ -60,13 +60,13 @@ L_SPARC_MACHOBJS32 = machrel.sparc32.o machsym.sparc32.o L_SPARC_MACHOBJS64 = machrel.sparc64.o machsym.sparc64.o # Target specific objects (i386/amd64) -E_X86_TOOLOBJS = leb128.o +E_X86_COMMONOBJ = 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) +E_COMMONOBJ = $(E_SPARC_COMMONOBJ) \ + $(E_X86_COMMONOBJ) L_MACHOBJS32 = $(L_SPARC_MACHOBJS32) \ $(L_X86_MACHOBJS32) L_MACHOBJS64 = $(L_SPARC_MACHOBJS64) \ @@ -79,12 +79,13 @@ ELFCAPOBJ = elfcap.o OBJECTS = $(BLTOBJ) $(G_MACHOBJS32) $(G_MACHOBJS64) \ $(L_MACHOBJS32) $(L_MACHOBJS64) \ $(COMOBJS) $(COMOBJS32) $(COMOBJS64) \ - $(TOOLOBJS) $(E_TOOLOBJS) $(AVLOBJ) $(ELFCAPOBJ) + $(SGSCOMMONOBJ) $(E_COMMONOBJ) $(AVLOBJ) $(ELFCAPOBJ) include $(SRC)/lib/Makefile.lib include $(SRC)/cmd/sgs/Makefile.com -SRCDIR = ../common +SRCDIR = $(SGSHOME)/libld +MAPFILEDIR = $(SRCDIR)/common CERRWARN += -_gcc=-Wno-unused-value CERRWARN += -_gcc=-Wno-parentheses @@ -98,20 +99,18 @@ SMOFF += no_if_block # Location of the shared relocation engines maintained under usr/src/uts. # -KRTLD_I386 = $(SRCBASE)/uts/$(VAR_PLAT_i386)/krtld -KRTLD_AMD64 = $(SRCBASE)/uts/$(VAR_PLAT_amd64)/krtld -KRTLD_SPARC = $(SRCBASE)/uts/$(VAR_PLAT_sparc)/krtld +KRTLD_I386 = $(SRC)/uts/$(VAR_PLAT_i386)/krtld +KRTLD_AMD64 = $(SRC)/uts/$(VAR_PLAT_amd64)/krtld +KRTLD_SPARC = $(SRC)/uts/$(VAR_PLAT_sparc)/krtld -CPPFLAGS += -DUSE_LIBLD_MALLOC -I$(SRCBASE)/lib/libc/inc \ - -I$(SRCBASE)/uts/common/krtld -I$(SRCBASE)/uts/sparc \ +CPPFLAGS += -DUSE_LIBLD_MALLOC -I$(SRC)/lib/libc/inc \ + -I$(SRC)/uts/common/krtld -I$(SRC)/uts/sparc \ $(VAR_LIBLD_CPPFLAGS) -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(LDDBGLIBDIR) $(LDDBG_LIB) \ +LDLIBS += $(CONVLIBDIR) -lconv $(LDDBGLIBDIR) -llddbg \ $(ELFLIBDIR) -lelf $(DLLIB) -lc -DYNFLAGS += $(VERSREF) $(CC_USE_PROTO) '-R$$ORIGIN' - -native:= DYNFLAGS += $(CONVLIBDIR) +DYNFLAGS += $(VERSREF) '-R$$ORIGIN' # too hairy pics/sections32.o := SMATCH=off @@ -127,26 +126,26 @@ BLTFILES = $(BLTDEFS) $(BLTDATA) $(BLTMESG) # However, we keep target specific messages in their own separate files for # organizational reasons. # -SGSMSGCOM = ../common/libld.msg -SGSMSGSPARC = ../common/libld.sparc.msg -SGSMSGINTEL = ../common/libld.intel.msg +SGSMSGCOM = $(SRCDIR)/common/libld.msg +SGSMSGSPARC = $(SRCDIR)/common/libld.sparc.msg +SGSMSGINTEL = $(SRCDIR)/common/libld.intel.msg SGSMSGTARG = $(SGSMSGCOM) $(SGSMSGSPARC) $(SGSMSGINTEL) SGSMSGALL = $(SGSMSGCOM) $(SGSMSGSPARC) $(SGSMSGINTEL) SGSMSGFLAGS1 = $(SGSMSGFLAGS) -m $(BLTMESG) SGSMSGFLAGS2 = $(SGSMSGFLAGS) -h $(BLTDEFS) -d $(BLTDATA) -n libld_msg -CHKSRCS = $(SRCBASE)/uts/common/krtld/reloc.h \ - $(COMOBJS32:%32.o=../common/%.c) \ - $(L_MACHOBJS32:%32.o=../common/%.c) \ - $(L_MACHOBJS64:%64.o=../common/%.c) \ +CHKSRCS = $(SRC)/uts/common/krtld/reloc.h \ + $(COMOBJS32:%32.o=$(SRCDIR)/common/%.c) \ + $(L_MACHOBJS32:%32.o=$(SRCDIR)/common/%.c) \ + $(L_MACHOBJS64:%64.o=$(SRCDIR)/common/%.c) \ $(KRTLD_I386)/doreloc.c \ $(KRTLD_AMD64)/doreloc.c \ $(KRTLD_SPARC)/doreloc.c -LIBSRCS = $(TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \ - $(E_TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \ - $(COMOBJS:%.o=../common/%.c) \ +LIBSRCS = $(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) \ + $(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) \ + $(COMOBJS:%.o=$(SRCDIR)/common/%.c) \ $(AVLOBJS:%.o=$(VAR_AVLDIR)/%.c) \ $(BLTDATA) diff --git a/usr/src/cmd/sgs/libld/Makefile.targ b/usr/src/cmd/sgs/libld/Makefile.targ index f48f6fcd56..69e53f79c9 100644 --- a/usr/src/cmd/sgs/libld/Makefile.targ +++ b/usr/src/cmd/sgs/libld/Makefile.targ @@ -26,15 +26,15 @@ # Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -pics/%.o: ../common/%.c +pics/%.o: $(SRCDIR)/common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%32.o: ../common/%.c +pics/%32.o: $(SRCDIR)/common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%64.o: ../common/%.c +pics/%64.o: $(SRCDIR)/common/%.c $(COMPILE.c) -o $@ -D_ELF64 $< $(POST_PROCESS_O) @@ -46,7 +46,7 @@ pics/%64.o: %.c $(COMPILE.c) -o $@ -D_ELF64 $< $(POST_PROCESS_O) -pics/%.o: $(SGSTOOLS)/common/%.c +pics/%.o: $(SGSCOMMON)/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) @@ -94,21 +94,8 @@ $(LIBLINKS): delete: $(RM) $(DYNLIB) -# Special target for native builds (ie. when we need to build a version of ld -# to build a version of ld :-). - -native: $(SGSLIBDIR)/$(LIBLINKS) - $(PICS): pics -$(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR) - $(BUILD.SO) - $(POST_PROCESS_SO) - -$(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB) - @$(RM) $(SGSLIBDIR)/$(LIBLINKS) - $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS) - include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ diff --git a/usr/src/cmd/sgs/liblddbg/Makefile.com b/usr/src/cmd/sgs/liblddbg/Makefile.com index 76e161501f..c4b9f9d6db 100644 --- a/usr/src/cmd/sgs/liblddbg/Makefile.com +++ b/usr/src/cmd/sgs/liblddbg/Makefile.com @@ -47,26 +47,24 @@ COMOBJS64 = bindings64.o cap64.o dlfcns64.o dynamic64.o \ BLTOBJ = msg.o -TOOLOBJ = alist.o +SGSCOMMONOBJ = alist.o -OBJECTS = $(BLTOBJ) $(COMOBJS) $(COMOBJS32) $(COMOBJS64) $(TOOLOBJ) +OBJECTS = $(BLTOBJ) $(COMOBJS) $(COMOBJS32) $(COMOBJS64) $(SGSCOMMONOBJ) include $(SRC)/lib/Makefile.lib include $(SRC)/cmd/sgs/Makefile.com -SRCDIR = ../common +SRCDIR = $(SGSHOME)/liblddbg +MAPFILEDIR = $(SRCDIR)/common CERRWARN += -_gcc=-Wno-unused-value CERRWARN += $(CNOWARN_UNINIT) CERRWARN += -_gcc=-Wno-parentheses -CPPFLAGS += -I$(SRCBASE)/lib/libc/inc -DYNFLAGS += $(VERSREF) $(CC_USE_PROTO) '-R$$ORIGIN' -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) -lc - -native := DYNFLAGS += $(CONVLIBDIR) -native := CPPFLAGS += -DNATIVE_BUILD +CPPFLAGS += -I$(SRC)/lib/libc/inc +DYNFLAGS += $(VERSREF) '-R$$ORIGIN' +LDLIBS += $(CONVLIBDIR) -lconv -lc BLTDEFS = msg.h BLTDATA = msg.c @@ -74,15 +72,15 @@ BLTMESG = $(SGSMSGDIR)/liblddbg BLTFILES = $(BLTDEFS) $(BLTDATA) $(BLTMESG) -SGSMSGCOM = ../common/liblddbg.msg +SGSMSGCOM = $(SRCDIR)/common/liblddbg.msg SGSMSGALL = $(SGSMSGCOM) SGSMSGTARG = $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n liblddbg_msg -CHKSRCS = $(COMOBJS32:%32.o=../common/%.c) +CHKSRCS = $(COMOBJS32:%32.o=$(SRCDIR)/common/%.c) -LIBSRCS = $(COMOBJS:%.o=../common/%.c) \ - $(TOOLOBJ:%.o=$(SGSTOOLS)/common/%.c) $(BLTDATA) +LIBSRCS = $(COMOBJS:%.o=$(SRCDIR)/common/%.c) \ + $(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) $(BLTDATA) CLEANFILES += $(BLTFILES) CLOBBERFILES += $(DYNLIB) $(LIBLINKS) diff --git a/usr/src/cmd/sgs/liblddbg/Makefile.targ b/usr/src/cmd/sgs/liblddbg/Makefile.targ index 30fb79e62a..7eb4895306 100644 --- a/usr/src/cmd/sgs/liblddbg/Makefile.targ +++ b/usr/src/cmd/sgs/liblddbg/Makefile.targ @@ -26,19 +26,19 @@ # Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -pics/%.o: ../common/%.c +pics/%.o: $(SRCDIR)/common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%.o: $(SGSTOOLS)/common/%.c +pics/%.o: $(SGSCOMMON)/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%32.o: ../common/%.c +pics/%32.o: $(SRCDIR)/common/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%64.o: ../common/%.c +pics/%64.o: $(SRCDIR)/common/%.c $(COMPILE.c) -D_ELF64 -o $@ $< $(POST_PROCESS_O) @@ -48,21 +48,8 @@ $(LIBLINKS): delete: $(RM) $(DYNLIB) -# Special target for native builds (ie. when we need to build a version of ld -# to build a version of ld :-). - -native: $(SGSLIBDIR)/$(LIBLINKS) - $(PICS): pics -$(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR) - $(BUILD.SO) - $(POST_PROCESS_SO) - -$(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB) - -@$(RM) $(SGSLIBDIR)/$(LIBLINKS) - $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS) - include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ diff --git a/usr/src/cmd/sgs/libldmake/Makefile.com b/usr/src/cmd/sgs/libldmake/Makefile.com index 76a89e0dfb..ff9ead0b9c 100644 --- a/usr/src/cmd/sgs/libldmake/Makefile.com +++ b/usr/src/cmd/sgs/libldmake/Makefile.com @@ -38,8 +38,6 @@ ROOTLIBDIR64= $(ROOT)/opt/SUNWonld/lib/$(MACH64) SRCDIR = ../common -DYNFLAGS += $(CC_USE_PROTO) - CFLAGS += $(C_PICFLAGS) CFLAGS64 += $(C_PICFLAGS64) diff --git a/usr/src/cmd/sgs/libldstab/Makefile.com b/usr/src/cmd/sgs/libldstab/Makefile.com index 16e3817397..6eed5d6349 100644 --- a/usr/src/cmd/sgs/libldstab/Makefile.com +++ b/usr/src/cmd/sgs/libldstab/Makefile.com @@ -38,12 +38,11 @@ include $(SRC)/lib/Makefile.lib include $(SRC)/cmd/sgs/Makefile.com SRCDIR = ../common -SRCBASE= ../../../.. CPPFLAGS += -I$(ELFCAP) -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf -lc -DYNFLAGS += $(VERSREF) $(CC_USE_PROTO) +LDLIBS += $(CONVLIBDIR) -lconv $(ELFLIBDIR) -lelf -lc +DYNFLAGS += $(VERSREF) SRCS= $(COMOBJS:%.o=../common/%.c) diff --git a/usr/src/cmd/sgs/libldstab/Makefile.targ b/usr/src/cmd/sgs/libldstab/Makefile.targ index 490a987356..6fc36576c9 100644 --- a/usr/src/cmd/sgs/libldstab/Makefile.targ +++ b/usr/src/cmd/sgs/libldstab/Makefile.targ @@ -37,17 +37,8 @@ pics/%64.o: ../common/%.c delete: -$(RM) $(DYNLIB) -# Special target for native builds (ie. when we need to build a version of ld -# to build a version of ld :-). - -native: $(SGSLIBDIR)/$(DYNLIB) - $(PICS): pics -$(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR) - $(BUILD.SO) - $(POST_PROCESS_SO) - include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ diff --git a/usr/src/cmd/sgs/librtld/Makefile.com b/usr/src/cmd/sgs/librtld/Makefile.com index bc6772751e..e15980f956 100644 --- a/usr/src/cmd/sgs/librtld/Makefile.com +++ b/usr/src/cmd/sgs/librtld/Makefile.com @@ -41,11 +41,11 @@ include $(SRC)/lib/Makefile.lib include $(SRC)/cmd/sgs/Makefile.com SRCDIR = ../common -CPPFLAGS += -I../../rtld/common -I$(SRCBASE)/lib/libc/inc \ - -I$(SRCBASE)/uts/common/krtld -I$(SRC)/common/sgsrtcid \ - -I$(SRCBASE)/uts/sparc -DYNFLAGS += $(VERSREF) $(CC_USE_PROTO) '-R$$ORIGIN' -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf -lc +CPPFLAGS += -I../../rtld/common -I$(SRC)/lib/libc/inc \ + -I$(SRC)/uts/common/krtld -I$(SRC)/common/sgsrtcid \ + -I$(SRC)/uts/sparc +DYNFLAGS += $(VERSREF) '-R$$ORIGIN' +LDLIBS += $(CONVLIBDIR) -lconv $(ELFLIBDIR) -lelf -lc CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-value diff --git a/usr/src/cmd/sgs/librtld/Makefile.targ b/usr/src/cmd/sgs/librtld/Makefile.targ index 7747934999..9b56ae1ab7 100644 --- a/usr/src/cmd/sgs/librtld/Makefile.targ +++ b/usr/src/cmd/sgs/librtld/Makefile.targ @@ -36,20 +36,8 @@ $(LIBLINKS): delete: $(RM) $(DYNLIB) -# Special target for native builds (ie. when we need to build a version of ld -# to build a version of ld :-). - -native: $(SGSLIBDIR)/$(LIBLINKS) - $(PICS): pics -$(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR) - $(BUILD.SO) - $(POST_PROCESS_SO) - -$(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB) - -@$(RM) $(SGSLIBDIR)/$(LIBLINKS) - $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS) include $(SRC)/lib/Makefile.targ include $(SRC)/cmd/sgs/Makefile.targ diff --git a/usr/src/cmd/sgs/librtld_db/Makefile.com b/usr/src/cmd/sgs/librtld_db/Makefile.com index 13ce445558..2d7b9093c3 100644 --- a/usr/src/cmd/sgs/librtld_db/Makefile.com +++ b/usr/src/cmd/sgs/librtld_db/Makefile.com @@ -36,9 +36,9 @@ include $(SRC)/cmd/sgs/Makefile.com SRCDIR = ../common -CPPFLAGS += -I$(SRCBASE)/lib/libc/inc +CPPFLAGS += -I$(SRC)/lib/libc/inc DYNFLAGS += $(VERSREF) -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) -lc +LDLIBS += $(CONVLIBDIR) -lconv -lc CERRWARN += $(CNOWARN_UNINIT) diff --git a/usr/src/cmd/sgs/librtld_db/demo/Makefile b/usr/src/cmd/sgs/librtld_db/demo/Makefile index abb486b6b7..f61bf6796b 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/Makefile +++ b/usr/src/cmd/sgs/librtld_db/demo/Makefile @@ -23,6 +23,7 @@ # include $(SRC)/Makefile.master +include $(SRC)/cmd/sgs/Makefile.sub MACHDEMOFILES= \ i386/regs.c \ diff --git a/usr/src/cmd/sgs/librtld_db/demo/Makefile.com b/usr/src/cmd/sgs/librtld_db/demo/Makefile.com index 5b5b663b9e..391c1a30cb 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/Makefile.com +++ b/usr/src/cmd/sgs/librtld_db/demo/Makefile.com @@ -62,6 +62,7 @@ CLEANFILES += $(BLTSRC) $(BLTHDR) simp libsub.so.1 CERRWARN += -_gcc=-Wno-parentheses CERRWARN += -_gcc=-Wno-unused-label CERRWARN += -_gcc=-Wno-unused-variable +SMOFF += buffer_too_small_for_struct # DEMO DELETE END test-sparc= test-sparc-regs diff --git a/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ b/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ index 70a87bb949..82de1a0deb 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ +++ b/usr/src/cmd/sgs/librtld_db/demo/Makefile.targ @@ -31,10 +31,17 @@ $(OBJDIR)/%.o: ../common/%.c $(POST_PROCESS_O) # DEMO DELETE START -$(ROOTONLDBIN)/%: % + +$(ROOTONLDBIN): + $(INS.dir) + +$(ROOTONLDBIN)/$(MACH64): + $(INS.dir) + +$(ROOTONLDBIN)/%: % $(ROOTONLDBIN) $(INS.file) -$(ROOTONLDBIN)/$(MACH64)/%: % +$(ROOTONLDBIN)/$(MACH64)/%: % $(ROOTONLDBIN)/$(MACH64) $(INS.file) # DEMO DELETE END @@ -92,6 +99,10 @@ clean: FRC clobber: clean FRC $(RM) $(PROG) +# DEMO DELETE START +catalog check chkmsg: +# DEMO DELETE END + FRC: # DEMO DELETE START diff --git a/usr/src/cmd/sgs/librtld_db/demo/amd64/Makefile b/usr/src/cmd/sgs/librtld_db/demo/amd64/Makefile index 7cabf2ea7b..1428252d8b 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/amd64/Makefile +++ b/usr/src/cmd/sgs/librtld_db/demo/amd64/Makefile @@ -48,6 +48,8 @@ test: $(TESTS) # DEMO DELETE START DEMOCFLAGS= +catalog: + install: all $(ROOTONLDBINPROG64) # DEMO DELETE END diff --git a/usr/src/cmd/sgs/librtld_db/demo/i386/Makefile b/usr/src/cmd/sgs/librtld_db/demo/i386/Makefile index da1bcc7f0e..1112eb1ca3 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/i386/Makefile +++ b/usr/src/cmd/sgs/librtld_db/demo/i386/Makefile @@ -33,6 +33,8 @@ all: $(OBJDIR) .WAIT $(PROG) test: $(TESTS) # DEMO DELETE START +catalog: + install: all $(ROOTONLDBINPROG) # DEMO DELETE END diff --git a/usr/src/cmd/sgs/librtld_db/demo/sparc/Makefile b/usr/src/cmd/sgs/librtld_db/demo/sparc/Makefile index da1bcc7f0e..1112eb1ca3 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/sparc/Makefile +++ b/usr/src/cmd/sgs/librtld_db/demo/sparc/Makefile @@ -33,6 +33,8 @@ all: $(OBJDIR) .WAIT $(PROG) test: $(TESTS) # DEMO DELETE START +catalog: + install: all $(ROOTONLDBINPROG) # DEMO DELETE END diff --git a/usr/src/cmd/sgs/librtld_db/demo/sparcv9/Makefile b/usr/src/cmd/sgs/librtld_db/demo/sparcv9/Makefile index bfb094260f..b1b3f38d32 100644 --- a/usr/src/cmd/sgs/librtld_db/demo/sparcv9/Makefile +++ b/usr/src/cmd/sgs/librtld_db/demo/sparcv9/Makefile @@ -48,6 +48,8 @@ test: $(TESTS) # DEMO DELETE START DEMOCFLAGS= +catalog: + install: all $(ROOTONLDBINPROG64) # DEMO DELETE END diff --git a/usr/src/cmd/sgs/link_audit/Makefile.com b/usr/src/cmd/sgs/link_audit/Makefile.com index d02c71dc4f..1d122e8f8f 100644 --- a/usr/src/cmd/sgs/link_audit/Makefile.com +++ b/usr/src/cmd/sgs/link_audit/Makefile.com @@ -62,7 +62,7 @@ BINDPICS= $(BINDSRC:%.c=$(PICDIR)/%.o) $(PICDIR)/env.o $(WHOPICS):= SEMANTICCHK= -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) +LDLIBS += $(CONVLIBDIR) -lconv $(TRUSSLIB):= PICS = $(TRUSSPICS) $(PERFLIB):= PICS = $(PERFPICS) @@ -91,7 +91,6 @@ $(BINDLIB):= MAPFILES = ../common/mapfile-vers-bindings $(ROOTCCSLIB) := DIRMODE = 755 CPPFLAGS += -D_REENTRANT -LDFLAGS += $(CC_USE_PROTO) DYNFLAGS += $(VERSREF) CLEANFILES += $(OBJDIR)/* $(PICDIR)/* diff --git a/usr/src/cmd/sgs/link_audit/Makefile.targ b/usr/src/cmd/sgs/link_audit/Makefile.targ index cb6c0443c3..bc63a59842 100644 --- a/usr/src/cmd/sgs/link_audit/Makefile.targ +++ b/usr/src/cmd/sgs/link_audit/Makefile.targ @@ -80,13 +80,13 @@ $(ROOTCCSLIB)/%: % $(ROOTCCSLIB64)/%: % $(INS.file) -$(ROOTONLDBIN)/%: % +$(ROOTONLDBIN)/%: % $(ROOTONLDBIN) $(INS.file) -$(ROOTONLDLIB)/%: % +$(ROOTONLDLIB)/%: % $(ROOTONLDLIB) $(INS.file) -$(ROOTONLDLIB64)/%: % +$(ROOTONLDLIB64)/%: % $(ROOTONLDLIB64) $(INS.file) $(ROOTCCSLIB): @@ -95,4 +95,13 @@ $(ROOTCCSLIB): $(ROOTCCSLIB64): $(INS.dir) +$(ROOTONLDBIN): + $(INS.dir) + +$(ROOTONLDLIB): + $(INS.dir) + +$(ROOTONLDLIB64): + $(INS.dir) + 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 078a97e8f8..0a44e691e5 100644 --- a/usr/src/cmd/sgs/link_audit/amd64/Makefile +++ b/usr/src/cmd/sgs/link_audit/amd64/Makefile @@ -39,9 +39,7 @@ $(CCSLIBS) := CFLAGS64 += $(C_PICFLAGS64) $(NO_ASM_WARN) all: $(PICDIR) .WAIT $(CCSLIBS) $(CCSSCRIPTS) \ $(ONSCRIPTS) $(ONLIBS) -install: all $(ROOTCCSLIB64) .WAIT $(ROOTCCSLIBS64) - -package: install .WAIT $(ROOTONLDLIBS64) +install: all $(ROOTCCSLIB64) .WAIT $(ROOTCCSLIBS64) .WAIT $(ROOTONLDLIBS64) include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/link_audit/i386/Makefile b/usr/src/cmd/sgs/link_audit/i386/Makefile index 1e5c56bce7..0343456ab9 100644 --- a/usr/src/cmd/sgs/link_audit/i386/Makefile +++ b/usr/src/cmd/sgs/link_audit/i386/Makefile @@ -36,8 +36,7 @@ $(CCSLIBS) := CFLAGS += $(C_PICFLAGS) $(NO_ASM_WARN) all: $(OBJDIR) $(PICDIR) .WAIT $(CCSLIBS) $(CCSSCRIPTS) \ $(ONSCRIPTS) $(ONPROGS) $(ONLIBS) -install: all $(ROOTCCSLIB) .WAIT $(ROOTUSRBINS) $(ROOTCCSLIBS) - -package: install .WAIT $(ROOTONLDLIBS) $(ROOTONLDBINPROG) +install: all $(ROOTCCSLIB) .WAIT $(ROOTUSRBINS) $(ROOTCCSLIBS) \ + .WAIT $(ROOTONLDLIBS) $(ROOTONLDBINPROG) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/link_audit/sparc/Makefile b/usr/src/cmd/sgs/link_audit/sparc/Makefile index 1e5c56bce7..0343456ab9 100644 --- a/usr/src/cmd/sgs/link_audit/sparc/Makefile +++ b/usr/src/cmd/sgs/link_audit/sparc/Makefile @@ -36,8 +36,7 @@ $(CCSLIBS) := CFLAGS += $(C_PICFLAGS) $(NO_ASM_WARN) all: $(OBJDIR) $(PICDIR) .WAIT $(CCSLIBS) $(CCSSCRIPTS) \ $(ONSCRIPTS) $(ONPROGS) $(ONLIBS) -install: all $(ROOTCCSLIB) .WAIT $(ROOTUSRBINS) $(ROOTCCSLIBS) - -package: install .WAIT $(ROOTONLDLIBS) $(ROOTONLDBINPROG) +install: all $(ROOTCCSLIB) .WAIT $(ROOTUSRBINS) $(ROOTCCSLIBS) \ + .WAIT $(ROOTONLDLIBS) $(ROOTONLDBINPROG) include ../Makefile.targ diff --git a/usr/src/cmd/sgs/link_audit/sparcv9/Makefile b/usr/src/cmd/sgs/link_audit/sparcv9/Makefile index 078a97e8f8..63bed7ff25 100644 --- a/usr/src/cmd/sgs/link_audit/sparcv9/Makefile +++ b/usr/src/cmd/sgs/link_audit/sparcv9/Makefile @@ -39,9 +39,8 @@ $(CCSLIBS) := CFLAGS64 += $(C_PICFLAGS64) $(NO_ASM_WARN) all: $(PICDIR) .WAIT $(CCSLIBS) $(CCSSCRIPTS) \ $(ONSCRIPTS) $(ONLIBS) -install: all $(ROOTCCSLIB64) .WAIT $(ROOTCCSLIBS64) - -package: install .WAIT $(ROOTONLDLIBS64) +install: all $(ROOTCCSLIB64) .WAIT $(ROOTCCSLIBS64) \ + .WAIT $(ROOTONLDLIBS64) include ../Makefile.targ include ../../Makefile.sub.64 diff --git a/usr/src/cmd/sgs/mcs/Makefile.com b/usr/src/cmd/sgs/mcs/Makefile.com index b732c5c143..97ee70ac5b 100644 --- a/usr/src/cmd/sgs/mcs/Makefile.com +++ b/usr/src/cmd/sgs/mcs/Makefile.com @@ -39,18 +39,18 @@ MCS = /usr/ccs/bin/mcs COMOBJS = main.o file.o utils.o global.o \ message.o -TOOLSOBJS = alist.o +SGSCOMMONOBJ = alist.o -OBJS = $(COMOBJS) $(TOOLSOBJS) +OBJS = $(COMOBJS) $(SGSCOMMONOBJ) LLDFLAGS = '-R$$ORIGIN/../../lib' LLDFLAGS64 = '-R$$ORIGIN/../../../lib/$(MACH64)' LDFLAGS += $(VERSREF) $(LLDFLAGS) -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf +LDLIBS += $(CONVLIBDIR) -lconv $(ELFLIBDIR) -lelf CERRWARN += $(CNOWARN_UNINIT) SRCS = $(COMOBJS:%.o=../common/%.c) \ - $(TOOLSOBJS:%.o=$(SGSTOOLS)/common/%.c) + $(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) CLEANFILES += $(OBJS) diff --git a/usr/src/cmd/sgs/mcs/Makefile.targ b/usr/src/cmd/sgs/mcs/Makefile.targ index e35d939011..7dead9dcc6 100644 --- a/usr/src/cmd/sgs/mcs/Makefile.targ +++ b/usr/src/cmd/sgs/mcs/Makefile.targ @@ -33,7 +33,7 @@ ROOTSTRIPFILEPROG64= $(STRIPFILE:%=$(ROOTCCSBIN64)/%) $(COMPILE.c) $< $(POST_PROCESS_O) -%.o: $(SGSTOOLS)/common/%.c +%.o: $(SGSCOMMON)/%.c $(COMPILE.c) $< $(POST_PROCESS_O) diff --git a/usr/src/cmd/sgs/moe/Makefile.com b/usr/src/cmd/sgs/moe/Makefile.com index a752ef2b90..0f3ec8bdb4 100644 --- a/usr/src/cmd/sgs/moe/Makefile.com +++ b/usr/src/cmd/sgs/moe/Makefile.com @@ -39,8 +39,8 @@ OBJS= $(BLTOBJ) $(COMOBJ) MAPFILE= $(MAPFILE.NGB) MAPOPT= $(MAPFILE:%=-M%) -LDFLAGS += -Wl,$(VERSREF) $(CC_USE_PROTO) $(MAPOPT) -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) +LDFLAGS += -Wl,$(VERSREF) $(MAPOPT) +LDLIBS += $(CONVLIBDIR) -lconv BLTDEFS= msg.h BLTDATA= msg.c diff --git a/usr/src/cmd/sgs/nm/amd64/Makefile b/usr/src/cmd/sgs/nm/amd64/Makefile index cb2d8a5fb5..c086b64dc3 100644 --- a/usr/src/cmd/sgs/nm/amd64/Makefile +++ b/usr/src/cmd/sgs/nm/amd64/Makefile @@ -41,10 +41,10 @@ SRCS= $(COMOBJS:%.o=../common/%.c) LDFLAGS += '-R$$ORIGIN/../../../lib/$(MACH64)' INCLIST= -I../../include -I../../include/i386 \ - -I$(SRCBASE)/uts/$(ARCH)/sys + -I$(SRC)/uts/$(ARCH)/sys CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) -I$(ELFCAP) -LDLIBS += $(CONVLIBDIR64) $(CONV_LIB) $(ELFLIBDIR) -lelf +LDLIBS += $(CONVLIBDIR64) -lconv $(ELFLIBDIR) -lelf %.o: ../common/%.c $(COMPILE.c) $< diff --git a/usr/src/cmd/sgs/nm/i386/Makefile b/usr/src/cmd/sgs/nm/i386/Makefile index a6f7735af2..3d8ecf845d 100644 --- a/usr/src/cmd/sgs/nm/i386/Makefile +++ b/usr/src/cmd/sgs/nm/i386/Makefile @@ -42,11 +42,11 @@ SRCS= $(COMOBJS:%.o=../common/%.c) LLDFLAGS = '-R$$ORIGIN/../../lib' INCLIST= -I../../include -I../../include/i386 \ - -I$(SRCBASE)/uts/$(ARCH)/sys + -I$(SRC)/uts/$(ARCH)/sys DEFLIST= -DTARGET=I386 -DI386=1 -D$(ARFORMAT) -DELF CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) -I$(ELFCAP) -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf +LDLIBS += $(CONVLIBDIR) -lconv $(ELFLIBDIR) -lelf objs.xpg4/%.o := CPPFLAGS += -DXPG4 $(DEMOBJS):= DEFLIST = -DELF_OBJ diff --git a/usr/src/cmd/sgs/nm/sparc/Makefile b/usr/src/cmd/sgs/nm/sparc/Makefile index a76d967545..ceb5646968 100644 --- a/usr/src/cmd/sgs/nm/sparc/Makefile +++ b/usr/src/cmd/sgs/nm/sparc/Makefile @@ -42,10 +42,10 @@ SRCS= $(COMOBJS:%.o=../common/%.c) LLDFLAGS= '-R$$ORIGIN/../../lib' INCLIST= -I../../include -I../../include/sparc \ - -I$(SRCBASE)/uts/$(ARCH)/sys + -I$(SRC)/uts/$(ARCH)/sys DEFLIST= -DTARGET=SPARC -DSPARC=1 -D$(ARFORMAT) -DELF CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) -I$(ELFCAP) -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf +LDLIBS += $(CONVLIBDIR) -lconv $(ELFLIBDIR) -lelf objs.xpg4/%.o := CPPFLAGS += -DXPG4 diff --git a/usr/src/cmd/sgs/nm/sparcv9/Makefile b/usr/src/cmd/sgs/nm/sparcv9/Makefile index 75772f807c..6fb95ac24f 100644 --- a/usr/src/cmd/sgs/nm/sparcv9/Makefile +++ b/usr/src/cmd/sgs/nm/sparcv9/Makefile @@ -40,10 +40,10 @@ SRCS= $(COMOBJS:%.o=../common/%.c) LDFLAGS += '-R$$ORIGIN/../../../lib/$(MACH64)' INCLIST= -I../../include -I../../include/sparc \ - -I$(SRCBASE)/uts/$(ARCH)/sys + -I$(SRC)/uts/$(ARCH)/sys DEFLIST= -DTARGET=SPARC -DSPARC=1 -D$(ARFORMAT) -DELF CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master) -I$(ELFCAP) -LDLIBS += $(CONVLIBDIR64) $(CONV_LIB) $(ELFLIBDIR) -lelf +LDLIBS += $(CONVLIBDIR64) -lconv $(ELFLIBDIR) -lelf %.o: ../common/%.c diff --git a/usr/src/cmd/sgs/packages/Makefile b/usr/src/cmd/sgs/packages/Makefile deleted file mode 100644 index cfc6424a61..0000000000 --- a/usr/src/cmd/sgs/packages/Makefile +++ /dev/null @@ -1,154 +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) 1994, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. -# - -include $(SRC)/Makefile.master -include $(SRC)/cmd/sgs/Makefile.var - -BUILDLOG= package_build.$(MACH).log - -MACHS:sh= if [ "$MACH" = "sparc" ]; \ - then echo "sparc sparcv9"; \ - elif [ "$MACH" = "i386" ]; \ - then echo "i386 amd64"; \ - else echo "unknown"; \ - fi - -RDBDIRS= $(MACHS:%=../librtld_db/demo/%) -LDMAKEDIRS= $(MACHS:%=../libldmake/%) - -SUBDIRS1= ../libconv \ - .WAIT \ - ../libdl \ - .WAIT \ - ../libelf \ - .WAIT \ - ../liblddbg \ - ../librtld_db \ - .WAIT \ - ../librtld \ - ../libcrle - -SUBDIRS2 = ../rtld \ - ../rtld.4.x \ - ../libldstab \ - ../lari \ - ../ldprof \ - ../lddstub \ - $(LDMAKEDIRS) \ - ../0@0 \ - ../tools \ - $(RDBDIRS) - -# -# Package dirs are directories which specifically -# have a 'package' target. This target is used to key -# off of whether a system build is performed -# or a SUNWonld build. -# -PKGDIRS= ../libcrle \ - ../libld \ - ../elfdump \ - ../elfedit \ - ../elfedit/modules \ - ../elfwrap \ - ../ar \ - ../crle \ - ../dump \ - ../lari \ - ../ld \ - ../ldd \ - ../ldprof \ - ../nm \ - ../mcs \ - ../moe \ - ../pvs - -$(SUBDIRS1) $(SUBDIRS2) := TARGET = install -$(PKGDIRS) := TARGET = package - -../%: FRC - @ cd $@; pwd; $(MAKE) $(TARGET) - -.KEEP_STATE_FILE: .make.state.$(MACH) -.KEEP_STATE: -.PARALLEL: $(SUBDIRS1) $(PKGDIRS) $(SUBDIRS2) - -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 -# -package: FRC - @/bin/time $(MAKE) package_build 2>&1 | tee $(BUILDLOG) - @ echo "===BUILD COMPLETED checking for warnings...===" - @ grep -i "warning:" $(BUILDLOG) | grep -v PSTAMP | cat - @ echo "==================done=========================" - -package_build: package_dep .WAIT package_chkmsg .WAIT install - -package_chkmsg: FRC - @ cd ..; pwd; $(MAKE) chkmsg - -package_dep: package_dep_ .WAIT $(SUBDIRS1) .WAIT \ - $(PKGDIRS) .WAIT $(SUBDIRS2) - -package_dep_: FRC - @ cd ../tools; pwd; $(MAKE) proto && ./proto $(RELEASE) - @ cd $(SRC)/common/mapfiles/gen ; pwd; $(MAKE) install - @ cd $(SRC)/head; pwd; $(MAKE) \ - $(ROOT)/usr/include/dlfcn.h \ - $(ROOT)/usr/include/gelf.h \ - $(ROOT)/usr/include/libelf.h \ - $(ROOT)/usr/include/proc_service.h \ - $(ROOT)/usr/include/rtld_db.h \ - $(ROOT)/usr/include/link.h - @ cd $(SRC)/lib/libproc; pwd; $(MAKE) install_h - @ cd $(SRC)/uts/common/sys; pwd; $(MAKE) \ - $(ROOT)/usr/include/sys/elf.h \ - $(ROOT)/usr/include/sys/elf_386.h \ - $(ROOT)/usr/include/sys/elf_SPARC.h \ - $(ROOT)/usr/include/sys/elf_notes.h \ - $(ROOT)/usr/include/sys/elf_amd64.h \ - $(ROOT)/usr/include/sys/elftypes.h \ - $(ROOT)/usr/include/sys/auxv.h \ - $(ROOT)/usr/include/sys/auxv_SPARC.h \ - $(ROOT)/usr/include/sys/auxv_386.h \ - $(ROOT)/usr/include/sys/avl.h \ - $(ROOT)/usr/include/sys/link.h \ - $(ROOT)/usr/include/sys/machelf.h \ - $(ROOT)/usr/include/sys/note.h \ - $(ROOT)/usr/include/sys/systeminfo.h - @ cd ../tools/$(MACH); pwd; $(MAKE) sgsmsg piglatin - @ cd ..; pwd; $(MAKE) _msg_sgsmsg - @ cd ..; pwd; $(MAKE) native-add - @ cd ../libconv; pwd; $(MAKE) all - @ cd ../link_audit; pwd; $(MAKE) package - @ cd ../messages/$(MACH); pwd; $(MAKE) test - -FRC: diff --git a/usr/src/cmd/sgs/packages/Makefile.targ b/usr/src/cmd/sgs/packages/Makefile.targ deleted file mode 100644 index a4b307f359..0000000000 --- a/usr/src/cmd/sgs/packages/Makefile.targ +++ /dev/null @@ -1,51 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# Copyright 2015 Igor Kozhukhov <ikozhukhov@gmail.com> -# - -pkginfo: ../common/pkginfo.tmpl awk_pkginfo - $(RM) $@; $(AWK) -f awk_pkginfo ../common/$@.tmpl > $@ - -pkg: FRC - @ $(RM) -r $(PACKAGE) - pkgmk -f prototype_$(MACH) -d $(PKGARCHIVE) -r $(ROOT) \ - -o $(PACKAGE) 2>&1 | egrep -v "$(SRC)|parametric paths may" - pkgtrans -o -s $(PKGARCHIVE) $(PACKAGE).tmp $(PACKAGE) - $(RM) -r $(PKGARCHIVE)/$(PACKAGE) - mv $(PKGARCHIVE)/$(PACKAGE).tmp $(PKGARCHIVE)/$(PACKAGE) - -$(DATAFILES): ../common/$$@ - $(RM) $@; cp ../common/$@ $@ - -awk_pkginfo: ../bld_awk_pkginfo ../common/readme_revision ../common/$(README) - ../bld_awk_pkginfo \ - -R `perl ../common/readme_revision -d ../common/$(README)` \ - -m $(MACH) -r "$(RELEASE)" -o $@ - -clean: FRC - $(RM) $(CLEANFILES) - -clobber: clean FRC - $(RM) -r $(CLOBBERFILES) - -FRC: diff --git a/usr/src/cmd/sgs/packages/common/bld_awk_pkginfo.ksh b/usr/src/cmd/sgs/packages/common/bld_awk_pkginfo.ksh deleted file mode 100644 index 4b1f33e2da..0000000000 --- a/usr/src/cmd/sgs/packages/common/bld_awk_pkginfo.ksh +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/ksh -p -# -# 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 -# -# -#pragma ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Simple script which builds the awk_pkginfo awk script. This awk script -# is used to convert the pkginfo.tmpl files into pkginfo files -# for the build. -# - - -usage() -{ - echo "usage: bld_awk_pkginfo -R <revision> -r <release> -m <mach> -o <awk_script>" -} -# -# Awk strings -# -VERSION="VERSION\=" -PRODVERS="^PRODVERS\=" -ARCH='ARCH=\"ISA\"' - - -# -# parse command line -# -mach="" -release="" -awk_script="" -revision="" - -while getopts DR:o:r:m: c -do - case $c in - o) - awk_script=$OPTARG - ;; - m) - mach=$OPTARG - ;; - r) - release=$OPTARG - ;; - R) - revision=$OPTARG - ;; - \?) - usage - exit 1 - ;; - esac -done - -if [[ ( -z $release ) || ( -z $mach ) || ( -z $awk_script ) \ - || ( -z $revision) ]] -then - usage - exit 1 -fi - -if [[ -f $awk_script ]] -then - rm -f $awk_script -fi - -# -# Build REV= field based on date -# -rev=$(date "+%y.%m.%d.%H.%M") - -# -# Build PRODVERS string - same as in libconv/common/bld_vernote.ksh -# -prodver="${release}-${revision}" - -# -# Build awk script which will process all the -# pkginfo.tmpl files. -# -rm -f $awk_script -cat << EOF > $awk_script -/$VERSION/ { - sub(/\=[^=]*$/,"=$rev\"") - print - next - } -/$PRODVERS/ { - printf "PRODVERS=\"%s\"\n", "$prodver" - next - } -/$ARCH/ { - printf "ARCH=\"%s\"\n", "$mach" - next - } -{ print } -EOF - diff --git a/usr/src/cmd/sgs/packages/common/checkinstall b/usr/src/cmd/sgs/packages/common/checkinstall deleted file mode 100644 index b728b6489c..0000000000 --- a/usr/src/cmd/sgs/packages/common/checkinstall +++ /dev/null @@ -1,60 +0,0 @@ -# -# Copyright 2009 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 -# - -# Installing the wrong architecture of runtime linker will immediately -# brick the system. Catch this case and refuse to do it. -if [ "$PKG_INSTALL_ROOT" = '' -o "$PKG_INSTALL_ROOT" = '/' ]; then - SYSARCH=`uname -p` - if [ "$SYSARCH" != "$ARCH" ]; then - echo "***" - echo "*** Cannot install $ARCH linker into root of $SYSARCH system." - echo "***" - exit 1 - fi -fi - -if [ -d $BASEDIR/$SGSBACKUPDIR ]; -then - echo "***" - echo "*** Previous version of SUNWonld already installed. Use" - echo "*** # pkgrm SUNWonld" - echo "*** to remove it before installing a newer version, or" - echo "*** use an admin file to force an overwrite." - echo "***" - exit 1 -fi - -# As of Nevada build snv_104, we require the mmapobj() system call. -# Installing on a system that lacks it will break rtld and brick the system. -elfdump -sN.dynsym /lib/libc.so.1 | grep mmapobj > /dev/null -if [ $? != 0 ]; -then - echo "***" - echo "*** System lacks required mmapobj() system call" - echo "*** Nevada snv_104 or newer is required." - echo "***" - exit 1 -fi - -exit 0 diff --git a/usr/src/cmd/sgs/packages/common/copyright b/usr/src/cmd/sgs/packages/common/copyright deleted file mode 100644 index 2ebebd6ed8..0000000000 --- a/usr/src/cmd/sgs/packages/common/copyright +++ /dev/null @@ -1,2 +0,0 @@ -Copyright 2009 Sun Microsystems, Inc. All rights reserved. -Use is subject to license terms. diff --git a/usr/src/cmd/sgs/packages/common/depend b/usr/src/cmd/sgs/packages/common/depend deleted file mode 100644 index e10cb99d4e..0000000000 --- a/usr/src/cmd/sgs/packages/common/depend +++ /dev/null @@ -1,46 +0,0 @@ -# ident "%Z%%M% %I% %E% SMI" -# Copyright 2005 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, 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 -# -# -# This package information file defines software dependencies associated -# with the pkg. You can define three types of pkg dependencies with this file: -# P indicates a prerequisite for installation -# I indicates an incompatible package -# R indicates a reverse dependency -# <pkg.abbr> see pkginfo(4), PKG parameter -# <name> see pkginfo(4), NAME parameter -# <version> see pkginfo(4), VERSION parameter -# <arch> see pkginfo(4), ARCH parameter -# <type> <pkg.abbr> <name> -# (<arch>)<version> -# (<arch>)<version> -# ... -# <type> <pkg.abbr> <name> -# ... - -P SUNWcar Core Architecture, (Root) -P SUNWkvm Core Architecture, (Kvm) -P SUNWcsr Core Solaris, (Root) -P SUNWcsu Core Solaris, (Usr) -P SUNWcsd Core Solaris Devices diff --git a/usr/src/cmd/sgs/packages/common/postinstall b/usr/src/cmd/sgs/packages/common/postinstall deleted file mode 100644 index 31575a1dbd..0000000000 --- a/usr/src/cmd/sgs/packages/common/postinstall +++ /dev/null @@ -1,173 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# -# -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -ONLDCPIO=/tmp/SUNWonld.cpio.$$ - - -# -# This script handles the installation of the new sgstools on -# both Solaris10 systems (which libraries moved to '/lib') and -# pre Solaris10 systems where libraries reside under '/usr/lib'. -# -# We test to deterine if '/lib' is a symlink (pre Solaris10) or a -# directory (Solaris10 & later). We key off of that for -# everything below. -# -if [ -h ${BASEDIR}/lib ] -then - LIBBASE=usr/lib - ETCLIST="etc/lib/ld.so.1 etc/lib/libdl.so.1" -else - LIBBASE=lib -fi -export LIBBASE - - -build_liblist () -{ - # - # Build '/lib' file list for backing up - # - cd $BASEDIR/$SGSDIR/lib - find . \( -type f -o -type l \) -print | sed 's/^\.\///'g | - while read file - do - if [ \( -f $BASEDIR/$LIBBASE/$file \) -o \ - \( -h $BASEDIR/$LIBBASE/$file \) ]; then - echo $LIBBASE/$file - fi - done -} - -build_filelist() -{ - # - # Build rest of files - # - cd $BASEDIR/$SGSDIR - find usr \( -type f -o -type l \) -print | while read file - do - if [ \( -f $BASEDIR/$file \) -o \ - \( -h $BASEDIR/$file \) ]; then - echo $file - fi - done -} - -build_newitemsfile () -{ - rm -f ${SGSBACKUPDIR}.newfiles - - # Build a list of files/directories that this package is going - # add to the system that do not already exist. - cd $BASEDIR/$SGSDIR/lib - find . -depth -print | sed 's/^\.\///'g | while read file - do - # Built in /bin/sh test lacks -e - /usr/bin/test \! -e "$BASEDIR/$LIBBASE/$file" - if [ $? = 0 ]; then - echo $LIBBASE/$file >> ${SGSBACKUPDIR}.newfiles - fi - done - - cd $BASEDIR/$SGSDIR - find usr -depth -print | while read file - do - /usr/bin/test \! -e "$BASEDIR/$file" - if [ $? = 0 ]; then - echo $file >> ${SGSBACKUPDIR}.newfiles - fi - done -} - -# Generate a file containing the names of the files and directories -# that are being added (as opposed to being replaced) to the system. -# These items will need to be explicitly removed at uninstall. -build_newitemsfile - -# Generate a file containing the names of the original files backed -# up from the system. These items will be moved back at uninstall. -LIBLIST=`build_liblist` -FILELIST=`build_filelist` -for file in $LIBLIST $FILELIST $ETCLIST -do - echo $file -done > ${SGSBACKUPDIR}.origfiles - -# -# backup all existing SGStools. -# -echo "Backup up existing SGS tools to $SGSBACKUPDIR..." -cd $BASEDIR -cpio -pdm $BASEDIR/$SGSBACKUPDIR < ${SGSBACKUPDIR}.origfiles - - -# -# Overwrite SGSTOOLS onto existing system. We use CPIO -# because it unlinks a file and then creates a new one -# instead of copying over an existing inode. This is -# required when updating libraries (and the run-time linker) -# which are currently being used. -# - - -# -# First '/lib' components -# -echo "Installing new SGSTOOLS from $BASEDIR/$SGSDIR" - -prev_bindnow=$LD_BIND_NOW -LD_BIND_NOW=1 -export LD_BIND_NOW - -cd $BASEDIR/$SGSDIR/lib -find . -depth -print | cpio -o -O $ONLDCPIO -cd $BASEDIR/$LIBBASE -cpio -imdu < $ONLDCPIO -rm -f $ONLDCPIO - -# -# Then everything else -# -cd $BASEDIR/$SGSDIR -find usr -depth -print | cpio -o -O $ONLDCPIO -cd $BASEDIR -cpio -imdu < $ONLDCPIO -rm -f $ONLDCPIO - - -# -# Populate '/etc/lib' directories on systems with the -# run-time linker installed under '/usr/lib/ld.so.1' -# -if [ "${ETCLIST}x" != "x" ]; then - cp $BASEDIR/usr/lib/ld.so.1 $BASEDIR/etc/lib/ld.so.1.onld - cp $BASEDIR/usr/lib/libdl.so.1 $BASEDIR/etc/lib/libdl.so.1.onld - cd $BASEDIR/etc/lib - mv ld.so.1.onld ld.so.1 - mv libdl.so.1.onld libdl.so.1 -fi - -LD_BIND_NOW=$prev_bindnow diff --git a/usr/src/cmd/sgs/packages/common/prototype_com b/usr/src/cmd/sgs/packages/common/prototype_com deleted file mode 100644 index b4e32178d1..0000000000 --- a/usr/src/cmd/sgs/packages/common/prototype_com +++ /dev/null @@ -1,300 +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) 1994, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This required package information file contains a list of package contents. -# The 'pkgmk' command uses this file to identify the contents of a package -# and their location on the development machine when building the package. -# Can be created via a text editor or through use of the 'pkgproto' command. - -# packaging files -i pkginfo -i copyright -i depend -i checkinstall -i postinstall -i preremove -# -# source locations relative to the prototype file -# -# SUNWonld -# -d none var 755 root sys -d none var/ld 755 root bin -d none $SGSBACKUPDIR 755 root bin -d none opt 755 root sys -d none opt/SUNWonld 755 root sys -d none $SGSDIR/ 755 root sys -d none $SGSDIR/lib 755 root sys -s none $SGSDIR/lib/32=. -d none $SGSDIR/usr 755 root sys -f none $SGSDIR/lib/ld.so.1=lib/ld.so.1 755 root bin -f none $SGSDIR/lib/libdl.so.1=lib/libdl.so.1 755 root bin -s none $SGSDIR/lib/libdl.so=./libdl.so.1 -f none $SGSDIR/lib/libelf.so.1=lib/libelf.so.1 755 root bin -s none $SGSDIR/lib/libelf.so=./libelf.so.1 -f none $SGSDIR/lib/libld.so.4=lib/libld.so.4 755 root bin -f none $SGSDIR/lib/liblddbg.so.4=lib/liblddbg.so.4 755 root bin -f none $SGSDIR/lib/librtld.so.1=lib/librtld.so.1 755 root bin -s none $SGSDIR/lib/librtld_db.so=librtld_db.so.1 -f none $SGSDIR/lib/librtld_db.so.1=lib/librtld_db.so.1 755 root bin -d none $SGSDIR/usr/bin 755 root bin -f none $SGSDIR/usr/bin/ar=usr/bin/ar 555 root bin -s none $SGSDIR/usr/ccs/bin/ar=../../bin/ar -f none $SGSDIR/usr/xpg4/bin/ar=usr/xpg4/bin/ar 0555 root bin -f none $SGSDIR/usr/bin/crle=usr/bin/crle 555 root bin -f none $SGSDIR/usr/bin/ldd=usr/bin/ldd 555 root bin -f none $SGSDIR/usr/bin/moe=usr/bin/moe 555 root bin -f none $SGSDIR/usr/bin/pvs=usr/bin/pvs 555 root bin -f none $SGSDIR/usr/bin/sotruss=usr/bin/sotruss 755 root bin -f none $SGSDIR/usr/bin/whocalls=usr/bin/whocalls 755 root bin -d none $SGSDIR/usr/ccs 755 root bin -d none $SGSDIR/usr/ccs/bin 755 root bin -f none $SGSDIR/usr/bin/dump=usr/bin/dump 0555 root bin -s none $SGSDIR/usr/ccs/bin/dump=../../bin/dump -f none $SGSDIR/usr/bin/elfdump=usr/bin/elfdump 0555 root bin -s none $SGSDIR/usr/ccs/bin/elfdump=../../bin/elfdump -f none $SGSDIR/usr/bin/elfedit=usr/bin/elfedit 0555 root bin -f none $SGSDIR/usr/bin/elfwrap=usr/bin/elfwrap 0555 root bin -f none $SGSDIR/usr/bin/lari=usr/bin/lari 0555 root bin -s none $SGSDIR/usr/ccs/bin/lari=../../bin/lari -f none $SGSDIR/usr/bin/ld=usr/bin/ld 755 root bin -s none $SGSDIR/usr/ccs/bin/ld=../../bin/ld -f none $SGSDIR/usr/bin/nm=usr/bin/nm 0555 root bin -s none $SGSDIR/usr/ccs/bin/nm=../../bin/nm -f none $SGSDIR/usr/bin/mcs=usr/bin/mcs 0555 root bin -s none $SGSDIR/usr/ccs/bin/mcs=../../bin/mcs -l none $SGSDIR/usr/bin/strip=./mcs -s none $SGSDIR/usr/ccs/bin/strip=../../bin/strip -d none $SGSDIR/usr/include 755 root bin -f none $SGSDIR/usr/include/dlfcn.h=usr/include/dlfcn.h 644 root bin -f none $SGSDIR/usr/include/libelf.h=usr/include/libelf.h 644 root bin -f none $SGSDIR/usr/include/link.h=usr/include/link.h 644 root bin -f none $SGSDIR/usr/include/gelf.h=usr/include/gelf.h 644 root bin -f none $SGSDIR/usr/include/proc_service.h=usr/include/proc_service.h 644 root bin -f none $SGSDIR/usr/include/rtld_db.h=usr/include/rtld_db.h 644 root bin -d none $SGSDIR/usr/include/sys 755 root bin -f none $SGSDIR/usr/include/sys/elf.h=usr/include/sys/elf.h 644 root bin -f none $SGSDIR/usr/include/sys/elf_386.h=usr/include/sys/elf_386.h 644 root bin -f none $SGSDIR/usr/include/sys/elf_amd64.h=usr/include/sys/elf_amd64.h 644 root bin -f none $SGSDIR/usr/include/sys/elf_SPARC.h=usr/include/sys/elf_SPARC.h 644 root bin -f none $SGSDIR/usr/include/sys/elftypes.h=usr/include/sys/elftypes.h 644 root bin -f none $SGSDIR/usr/include/sys/machelf.h=usr/include/sys/machelf.h 644 root bin -f none $SGSDIR/usr/include/sys/link.h=usr/include/sys/link.h 644 root bin -d none $SGSDIR/usr/lib 755 root bin -s none $SGSDIR/usr/lib/32=. -f none $SGSDIR/usr/lib/0@0.so.1=usr/lib/0@0.so.1 755 root bin -f none $SGSDIR/usr/lib/lddstub=usr/lib/lddstub 555 root bin -f none $SGSDIR/usr/lib/libcrle.so.1=usr/lib/libcrle.so.1 755 root bin -f none $SGSDIR/usr/lib/libldstab.so.1=usr/lib/libldstab.so.1 755 root bin -d none $SGSDIR/usr/lib/elfedit 755 root bin -s none $SGSDIR/usr/lib/elfedit/32=. -f none $SGSDIR/usr/lib/elfedit/cap.so=usr/lib/elfedit/cap.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/dyn.so=usr/lib/elfedit/dyn.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/ehdr.so=usr/lib/elfedit/ehdr.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/phdr.so=usr/lib/elfedit/phdr.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/shdr.so=usr/lib/elfedit/shdr.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/str.so=usr/lib/elfedit/str.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/sym.so=usr/lib/elfedit/sym.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/syminfo.so=usr/lib/elfedit/syminfo.so 755 root bin -d none $SGSDIR/usr/lib/link_audit 755 root bin -s none $SGSDIR/usr/lib/link_audit/32=. -f none $SGSDIR/usr/lib/link_audit/ldprof.so.1=usr/lib/link_audit/ldprof.so.1 755 root bin -f none $SGSDIR/usr/lib/link_audit/truss.so.1=usr/lib/link_audit/truss.so.1 755 root bin -f none $SGSDIR/usr/lib/link_audit/who.so.1=usr/lib/link_audit/who.so.1 755 root bin -d none $SGSDIR/usr/lib/mdb/ 755 root sys -d none $SGSDIR/usr/lib/mdb/proc 755 root sys -f none $SGSDIR/usr/lib/mdb/proc/ld.so=/usr/lib/mdb/proc/ld.so 555 root sys -d none $SGSDIR/usr/lib/locale 755 root bin -d none $SGSDIR/usr/lib/locale/piglatin 755 root bin -d none $SGSDIR/usr/lib/locale/piglatin/LC_MESSAGES 755 root bin -f none $SGSDIR/usr/lib/locale/piglatin/LC_MESSAGES/SUNW_OST_SGS.mo=/usr/lib/locale/piglatin/LC_MESSAGES/SUNW_OST_SGS.mo 444 root bin -d none $SGSDIR/usr/lib/secure 755 root bin -s none $SGSDIR/usr/lib/secure/32=. -d none $SGSDIR/usr/xpg4 755 root bin -d none $SGSDIR/usr/xpg4/bin 755 root bin -f none $SGSDIR/usr/xpg4/bin/nm=usr/xpg4/bin/nm 0555 root bin -d none $SGSDIR/usr/demo 755 root bin -d none $SGSDIR/usr/demo/ELF 755 root bin -f none $SGSDIR/usr/demo/ELF/Makefile=usr/demo/ELF/Makefile 644 root bin -f none $SGSDIR/usr/demo/ELF/00README=usr/demo/ELF/00README 644 root bin -f none $SGSDIR/usr/demo/ELF/acom.c=usr/demo/ELF/acom.c 644 root bin -f none $SGSDIR/usr/demo/ELF/dcom.c=usr/demo/ELF/dcom.c 644 root bin -f none $SGSDIR/usr/demo/ELF/dispsyms.c=usr/demo/ELF/dispsyms.c 644 root bin -f none $SGSDIR/usr/demo/ELF/pcom.c=usr/demo/ELF/pcom.c 644 root bin -f none $SGSDIR/usr/demo/ELF/tpcom.c=usr/demo/ELF/tpcom.c 644 root bin -d none $SGSDIR/usr/demo/librtld_db 755 root bin -f none $SGSDIR/usr/demo/librtld_db/00README=usr/demo/librtld_db/00README 644 root bin -f none $SGSDIR/usr/demo/librtld_db/Makefile.com=usr/demo/librtld_db/Makefile.com 644 root bin -f none $SGSDIR/usr/demo/librtld_db/Makefile.targ=usr/demo/librtld_db/Makefile.targ 644 root bin -d none $SGSDIR/usr/demo/librtld_db/amd64 755 root bin -f none $SGSDIR/usr/demo/librtld_db/amd64/Makefile=usr/demo/librtld_db/amd64/Makefile 644 root bin -f none $SGSDIR/usr/demo/librtld_db/amd64/rdb_mach.h=usr/demo/librtld_db/amd64/rdb_mach.h 644 root bin -f none $SGSDIR/usr/demo/librtld_db/amd64/regs.c=usr/demo/librtld_db/amd64/regs.c 644 root bin -d none $SGSDIR/usr/demo/librtld_db/common 755 root bin -f none $SGSDIR/usr/demo/librtld_db/common/bpt.c=usr/demo/librtld_db/common/bpt.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/callstack.c=usr/demo/librtld_db/common/callstack.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/dis.c=usr/demo/librtld_db/common/dis.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/disasm.c=usr/demo/librtld_db/common/disasm.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/disasm.h=usr/demo/librtld_db/common/disasm.h 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/globals.c=usr/demo/librtld_db/common/globals.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/gram.y=usr/demo/librtld_db/common/gram.y 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/help.c=usr/demo/librtld_db/common/help.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/lex.l=usr/demo/librtld_db/common/lex.l 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/main.c=usr/demo/librtld_db/common/main.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/maps.c=usr/demo/librtld_db/common/maps.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/ps.c=usr/demo/librtld_db/common/ps.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/rdb.h=usr/demo/librtld_db/common/rdb.h 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/rdb.man=usr/demo/librtld_db/common/rdb.man 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/syms.c=usr/demo/librtld_db/common/syms.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/common/utils.c=usr/demo/librtld_db/common/utils.c 644 root bin -d none $SGSDIR/usr/demo/librtld_db/i386 755 root bin -f none $SGSDIR/usr/demo/librtld_db/i386/Makefile=usr/demo/librtld_db/i386/Makefile 644 root bin -f none $SGSDIR/usr/demo/librtld_db/i386/m_utils.c=usr/demo/librtld_db/i386/m_utils.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/i386/rdb_mach.h=usr/demo/librtld_db/i386/rdb_mach.h 644 root bin -f none $SGSDIR/usr/demo/librtld_db/i386/regs.c=usr/demo/librtld_db/i386/regs.c 644 root bin -d none $SGSDIR/usr/demo/librtld_db/sparc 755 root bin -f none $SGSDIR/usr/demo/librtld_db/sparc/Makefile=usr/demo/librtld_db/sparc/Makefile 644 root bin -f none $SGSDIR/usr/demo/librtld_db/sparc/m_utils.c=usr/demo/librtld_db/sparc/m_utils.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/sparc/rdb_mach.h=usr/demo/librtld_db/sparc/rdb_mach.h 644 root bin -f none $SGSDIR/usr/demo/librtld_db/sparc/regs.c=usr/demo/librtld_db/sparc/regs.c 644 root bin -d none $SGSDIR/usr/demo/librtld_db/sparcv9 755 root bin -f none $SGSDIR/usr/demo/librtld_db/sparcv9/Makefile=usr/demo/librtld_db/sparcv9/Makefile 644 root bin -f none $SGSDIR/usr/demo/librtld_db/sparcv9/m_utils.c=usr/demo/librtld_db/sparcv9/m_utils.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/sparcv9/rdb_mach.h=usr/demo/librtld_db/sparcv9/rdb_mach.h 644 root bin -f none $SGSDIR/usr/demo/librtld_db/sparcv9/regs.c=usr/demo/librtld_db/sparcv9/regs.c 644 root bin -d none $SGSDIR/usr/demo/librtld_db/tests 755 root bin -f none $SGSDIR/usr/demo/librtld_db/tests/breaks=usr/demo/librtld_db/tests/breaks 644 root bin -f none $SGSDIR/usr/demo/librtld_db/tests/loadmaps=usr/demo/librtld_db/tests/loadmaps 644 root bin -f none $SGSDIR/usr/demo/librtld_db/tests/object_padding_maps=usr/demo/librtld_db/tests/object_padding_maps 644 root bin -f none $SGSDIR/usr/demo/librtld_db/tests/plt_skip=usr/demo/librtld_db/tests/plt_skip 644 root bin -f none $SGSDIR/usr/demo/librtld_db/tests/simp.c=usr/demo/librtld_db/tests/simp.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/tests/steps=usr/demo/librtld_db/tests/steps 644 root bin -f none $SGSDIR/usr/demo/librtld_db/tests/sub.c=usr/demo/librtld_db/tests/sub.c 644 root bin -f none $SGSDIR/usr/demo/librtld_db/tests/test-sparc-regs=usr/demo/librtld_db/tests/test-sparc-regs 644 root bin -d none $SGSDIR/usr/demo/link_audit 755 root bin -f none $SGSDIR/usr/demo/link_audit/00README=usr/demo/link_audit/00README 644 root bin -f none $SGSDIR/usr/demo/link_audit/Makefile=usr/demo/link_audit/Makefile 644 root bin -d none $SGSDIR/usr/demo/link_audit/man 755 root bin -f none $SGSDIR/usr/demo/link_audit/man/dumpbind.man=usr/demo/link_audit/man/dumpbind.man 644 root bin -f none $SGSDIR/usr/demo/link_audit/man/perfcnt.man=usr/demo/link_audit/man/perfcnt.man 644 root bin -f none $SGSDIR/usr/demo/link_audit/man/symbindrep.man=usr/demo/link_audit/man/symbindrep.man 644 root bin -d none $SGSDIR/usr/demo/link_audit/src 755 root bin -f none $SGSDIR/usr/demo/link_audit/src/bindings.c=usr/demo/link_audit/src/bindings.c 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/bindings.h=usr/demo/link_audit/src/bindings.h 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/dumpbind.c=usr/demo/link_audit/src/dumpbind.c 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/env.c=usr/demo/link_audit/src/env.c 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/env.h=usr/demo/link_audit/src/env.h 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/hash.c=usr/demo/link_audit/src/hash.c 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/hash.h=usr/demo/link_audit/src/hash.h 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/mach.h=usr/demo/link_audit/src/mach.h 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/perfcnt.c=usr/demo/link_audit/src/perfcnt.c 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/perfcnt.ksh=usr/demo/link_audit/src/perfcnt.ksh 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/sotruss.ksh=usr/demo/link_audit/src/sotruss.ksh 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/symbindrep.c=usr/demo/link_audit/src/symbindrep.c 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/symbindrep.ksh=usr/demo/link_audit/src/symbindrep.ksh 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/truss.c=usr/demo/link_audit/src/truss.c 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/who.c=usr/demo/link_audit/src/who.c 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/who.h=usr/demo/link_audit/src/who.h 644 root bin -f none $SGSDIR/usr/demo/link_audit/src/whocalls.ksh=usr/demo/link_audit/src/whocalls.ksh 644 root bin -f none opt/SUNWonld/SUNWonld-README 444 root bin -d none opt/SUNWonld/bin 755 root bin -f none opt/SUNWonld/bin/dumpbind 755 root bin -f none opt/SUNWonld/bin/rdb 755 root bin -f none opt/SUNWonld/bin/perfcnt 755 root bin -f none opt/SUNWonld/bin/symbindrep 755 root bin -d none opt/SUNWonld/lib 755 root bin -s none opt/SUNWonld/lib/32=. -f none opt/SUNWonld/lib/libldmake.so.1 755 root bin -f none opt/SUNWonld/lib/bindings.so.1 755 root bin -f none opt/SUNWonld/lib/symbindrep.so.1 755 root bin -f none opt/SUNWonld/lib/perfcnt.so.1 755 root bin -d none opt/SUNWonld/man 755 root bin -d none opt/SUNWonld/man/man1l 755 root bin -f none opt/SUNWonld/man/man1l/chkmsg.1l 444 root bin -f none opt/SUNWonld/man/man1l/sgsmsg.1l 444 root bin - - -# -# The following commented items are for things that exist within -# usr/src/cmd/sgs, but which are not normally considered to be -# part of the SUNWonld package. It is possible to add these items -# to a special-purpose SUNWonld by uncommenting the appropriate lines. -# - -# /usr/share/lib/ccs is needed by: gprof, lex, yacc -#d none $SGSDIR/usr/share 755 root bin -#d none $SGSDIR/usr/share/lib 755 root bin -#d none $SGSDIR/usr/share/lib/ccs 755 root bin - -#f none $SGSDIR/usr/bin/error=usr/bin/error 555 root bin -#s none $SGSDIR/usr/ccs/bin/error=../../bin/error - -#f none $SGSDIR/usr/bin/gprof=usr/bin/gprof 555 root bin -#s none $SGSDIR/usr/ccs/bin/gprof=../../bin/gprof -#f none $SGSDIR/usr/share/lib/ccs/gprof.callg.blurb=usr/share/lib/ccs/gprof.callg.blurb 444 root bin -#f none $SGSDIR/usr/share/lib/ccs/gprof.flat.blurb=usr/share/lib/ccs/gprof.flat.blurb 444 root bin - -#f none $SGSDIR/usr/bin/lex=usr/bin/lex 555 root bin -#s none $SGSDIR/usr/ccs/bin/lex=../../bin/lex -#f none $SGSDIR/usr/share/lib/ccs/nceucform=usr/share/lib/ccs/nceucform 644 root bin -#f none $SGSDIR/usr/share/lib/ccs/ncform=usr/share/lib/ccs/ncform 644 root bin -#f none $SGSDIR/usr/share/lib/ccs/nrform=usr/share/lib/ccs/nrform 644 root bin -#f none $SGSDIR/usr/lib/libl.so.1=usr/lib/libl.so.1 755 root bin -#s none $SGSDIR/usr/lib/libl.so=./libl.so.1 -#f none $SGSDIR/usr/lib/llib-ll.ln=usr/lib/llib-ll.ln 644 root bin -#f none $SGSDIR/usr/lib/llib-ll=usr/lib/llib-ll 644 root bin - -#f none $SGSDIR/usr/bin/lorder=usr/bin/lorder 555 root bin -#s none $SGSDIR/usr/ccs/bin/lorder=../../bin/lorder - -#f none $SGSDIR/usr/bin/m4=usr/bin/m4 555 root bin -#s none $SGSDIR/usr/ccs/bin/m4=../../bin/m4 -#f none $SGSDIR/usr/xpg4/bin/m4=usr/xpg4/bin/m4 0555 root bin - -#f none $SGSDIR/usr/bin/prof=usr/bin/prof 555 root bin -#s none $SGSDIR/usr/ccs/bin/prof=../../bin/prof - -#f none $SGSDIR/usr/bin/ranlib=usr/bin/ranlib 555 root bin -#s none $SGSDIR/usr/ccs/bin/ranlib=../../bin/ranlib - -#f none $SGSDIR/usr/bin/size=usr/bin/size 555 root bin -#s none $SGSDIR/usr/ccs/bin/size=../../bin/size - -#f none $SGSDIR/usr/bin/symorder=usr/bin/symorder 555 root bin -#s none $SGSDIR/usr/ccs/bin/symorder=../../bin/symorder - -#f none $SGSDIR/usr/bin/tsort=usr/bin/tsort 555 root bin -#s none $SGSDIR/usr/ccs/bin/tsort=../../bin/tsort - -#f none $SGSDIR/usr/bin/unifdef=usr/bin/unifdef 555 root bin -#s none $SGSDIR/usr/ccs/bin/unifdef=../../bin/unifdef - -#f none $SGSDIR/usr/bin/yacc=usr/bin/yacc 555 root bin -#s none $SGSDIR/usr/ccs/bin/yacc=../../bin/yacc -#f none $SGSDIR/usr/share/lib/ccs/yaccpar=usr/share/lib/ccs/yaccpar 644 root bin -#s none $SGSDIR/usr/ccs/bin/yaccpar=../../share/lib/ccs/yaccpar -#f none $SGSDIR/usr/lib/liby.so.1=usr/lib/liby.so.1 755 root bin -#s none $SGSDIR/usr/lib/liby.so=./liby.so.1 -#f none $SGSDIR/usr/lib/llib-ly.ln=usr/lib/llib-ly.ln 644 root bin -#f none $SGSDIR/usr/lib/llib-ly=usr/lib/llib-ly 644 root bin diff --git a/usr/src/cmd/sgs/packages/common/prototype_i386 b/usr/src/cmd/sgs/packages/common/prototype_i386 deleted file mode 100644 index b17f7b4a46..0000000000 --- a/usr/src/cmd/sgs/packages/common/prototype_i386 +++ /dev/null @@ -1,119 +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. -# -# This required package information file contains a list of package contents. -# The 'pkgmk' command uses this file to identify the contents of a package -# and their location on the development machine when building the package. -# Can be created via a text editor or through use of the 'pkgproto' command. - -#!search <pathname pathname ...> # where to find pkg objects -#!include <filename> # include another 'prototype' file -#!default <mode> <owner> <group> # default used if not specified on entry -#!<param>=<value> # puts parameter in pkg environment - -!include prototype_com - -d none $SGSDIR/lib/amd64=lib/amd64 755 root bin -s none $SGSDIR/lib/64=amd64 -f none $SGSDIR/lib/amd64/ld.so.1=lib/amd64/ld.so.1 755 root bin -f none $SGSDIR/lib/amd64/libdl.so.1=lib/amd64/libdl.so.1 755 root bin -s none $SGSDIR/lib/amd64/libdl.so=libdl.so.1 -f none $SGSDIR/lib/amd64/libelf.so.1=lib/amd64/libelf.so.1 755 root bin -s none $SGSDIR/lib/amd64/libelf.so=libelf.so.1 -f none $SGSDIR/lib/amd64/libld.so.4=lib/amd64/libld.so.4 755 root bin -f none $SGSDIR/lib/amd64/liblddbg.so.4=lib/amd64/liblddbg.so.4 755 root bin -f none $SGSDIR/lib/amd64/librtld.so.1=lib/amd64/librtld.so.1 755 root bin -f none $SGSDIR/lib/amd64/librtld_db.so.1=lib/amd64/librtld_db.so.1 755 root bin -s none $SGSDIR/lib/amd64/librtld_db.so=librtld_db.so.1 -d none $SGSDIR/usr/bin/amd64 755 root bin -f none $SGSDIR/usr/bin/amd64/ar=usr/bin/amd64/ar 555 root bin -s none $SGSDIR/usr/ccs/bin/amd64/ar=../../bin/amd64/ar -f none $SGSDIR/usr/bin/amd64/crle=usr/bin/amd64/crle 555 root bin -f none $SGSDIR/usr/bin/amd64/ldd=usr/bin/amd64/ldd 555 root bin -f none $SGSDIR/usr/bin/amd64/moe=usr/bin/amd64/moe 555 root bin -f none $SGSDIR/usr/bin/amd64/pvs=usr/bin/amd64/pvs 555 root bin -d none $SGSDIR/usr/ccs/bin/amd64 755 root bin -f none $SGSDIR/usr/bin/amd64/dump=usr/bin/amd64/dump 0555 root bin -s none $SGSDIR/usr/ccs/bin/amd64/dump=../../../bin/amd64/dump -f none $SGSDIR/usr/bin/amd64/elfdump=usr/bin/amd64/elfdump 0555 root bin -s none $SGSDIR/usr/ccs/bin/amd64/elfdump=../../../bin/amd64/elfdump -f none $SGSDIR/usr/bin/amd64/elfedit=usr/bin/amd64/elfedit 0555 root bin -f none $SGSDIR/usr/bin/amd64/elfwrap=usr/bin/amd64/elfwrap 0555 root bin -f none $SGSDIR/usr/bin/amd64/ld=usr/bin/amd64/ld 755 root bin -s none $SGSDIR/usr/ccs/bin/amd64/ld=../../../bin/amd64/ld -f none $SGSDIR/usr/bin/amd64/nm=usr/bin/amd64/nm 0555 root bin -s none $SGSDIR/usr/ccs/bin/amd64/nm=../../../bin/amd64/nm -f none $SGSDIR/usr/bin/amd64/mcs=usr/bin/amd64/mcs 0555 root bin -s none $SGSDIR/usr/ccs/bin/amd64/mcs=../../../bin/amd64/mcs -l none $SGSDIR/usr/bin/amd64/strip=./mcs -s none $SGSDIR/usr/ccs/bin/amd64/strip=../../../bin/amd64/strip -d none $SGSDIR/usr/lib/elfedit/amd64 755 root bin -s none $SGSDIR/usr/lib/elfedit/64=amd64 -f none $SGSDIR/usr/lib/elfedit/amd64/cap.so=usr/lib/elfedit/amd64/cap.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/amd64/dyn.so=usr/lib/elfedit/amd64/dyn.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/amd64/ehdr.so=usr/lib/elfedit/amd64/ehdr.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/amd64/phdr.so=usr/lib/elfedit/amd64/phdr.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/amd64/shdr.so=usr/lib/elfedit/amd64/shdr.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/amd64/str.so=usr/lib/elfedit/amd64/str.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/amd64/sym.so=usr/lib/elfedit/amd64/sym.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/amd64/syminfo.so=usr/lib/elfedit/amd64/syminfo.so 755 root bin -d none $SGSDIR/usr/lib/link_audit/amd64 755 root bin -s none $SGSDIR/usr/lib/link_audit/64=amd64 -f none $SGSDIR/usr/lib/link_audit/amd64/ldprof.so.1=usr/lib/link_audit/amd64/ldprof.so.1 755 root bin -f none $SGSDIR/usr/lib/link_audit/amd64/truss.so.1=usr/lib/link_audit/amd64/truss.so.1 755 root bin -f none $SGSDIR/usr/lib/link_audit/amd64/who.so.1=usr/lib/link_audit/amd64/who.so.1 755 root bin -d none $SGSDIR/usr/lib/mdb/proc/amd64 755 root sys -f none $SGSDIR/usr/lib/mdb/proc/amd64/ld.so=usr/lib/mdb/proc/amd64/ld.so 555 root sys -d none $SGSDIR/usr/lib/secure/amd64 755 root bin -s none $SGSDIR/usr/lib/secure/64=amd64 -d none $SGSDIR/usr/lib/amd64 755 root bin -s none $SGSDIR/usr/lib/64=amd64 -f none $SGSDIR/usr/lib/amd64/lddstub=usr/lib/amd64/lddstub 555 root bin -f none $SGSDIR/usr/lib/amd64/libcrle.so.1=usr/lib/amd64/libcrle.so.1 755 root bin -f none $SGSDIR/usr/lib/amd64/libldstab.so.1=usr/lib/amd64/libldstab.so.1 755 root bin -d none opt/SUNWonld/bin/amd64 755 root bin -f none opt/SUNWonld/bin/amd64/rdb 755 root bin -d none opt/SUNWonld/lib/amd64 755 root bin -s none opt/SUNWonld/lib/64=amd64 -f none opt/SUNWonld/lib/amd64/libldmake.so.1 755 root bin -f none opt/SUNWonld/lib/amd64/bindings.so.1 755 root bin -f none opt/SUNWonld/lib/amd64/perfcnt.so.1 755 root bin -f none opt/SUNWonld/lib/amd64/symbindrep.so.1 755 root bin - -# -# The following commented items are for things that exist within -# usr/src/cmd/sgs, but which are not normally considered to be -# part of the SUNWonld package. It is possible to add these items -# to a special-purpose SUNWonld by uncommenting the appropriate lines. -# -#f none $SGSDIR/usr/lib/amd64/libl.so.1=usr/lib/amd64/libl.so.1 755 root bin -#s none $SGSDIR/usr/lib/amd64/libl.so=./libl.so.1 -#f none $SGSDIR/usr/lib/amd64/llib-ll.ln=usr/lib/amd64/llib-ll.ln 644 root bin - -#f none $SGSDIR/usr/bin/amd64/size=usr/bin/amd64/size 555 root bin -#s none $SGSDIR/usr/ccs/bin/amd64/size=../../../bin/amd64/size - -#f none $SGSDIR/usr/lib/amd64/liby.so.1=usr/lib/amd64/liby.so.1 755 root bin -#s none $SGSDIR/usr/lib/amd64/liby.so=./liby.so.1 -#f none $SGSDIR/usr/lib/amd64/llib-ly.ln=usr/lib/amd64/llib-ly.ln 644 root bin diff --git a/usr/src/cmd/sgs/packages/common/prototype_sparc b/usr/src/cmd/sgs/packages/common/prototype_sparc deleted file mode 100644 index 6f6e6f317c..0000000000 --- a/usr/src/cmd/sgs/packages/common/prototype_sparc +++ /dev/null @@ -1,120 +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. -# -# This required package information file contains a list of package contents. -# The 'pkgmk' command uses this file to identify the contents of a package -# and their location on the development machine when building the package. -# Can be created via a text editor or through use of the 'pkgproto' command. - -#!search <pathname pathname ...> # where to find pkg objects -#!include <filename> # include another 'prototype' file -#!default <mode> <owner> <group> # default used if not specified on entry -#!<param>=<value> # puts parameter in pkg environment - -!include prototype_com - -d none $SGSDIR/lib/sparcv9=lib/sparcv9 755 root bin -s none $SGSDIR/lib/64=sparcv9 -f none $SGSDIR/lib/sparcv9/ld.so.1=lib/sparcv9/ld.so.1 755 root bin -f none $SGSDIR/lib/sparcv9/libdl.so.1=lib/sparcv9/libdl.so.1 755 root bin -s none $SGSDIR/lib/sparcv9/libdl.so=libdl.so.1 -f none $SGSDIR/lib/sparcv9/libelf.so.1=lib/sparcv9/libelf.so.1 755 root bin -s none $SGSDIR/lib/sparcv9/libelf.so=libelf.so.1 -f none $SGSDIR/lib/sparcv9/libld.so.4=lib/sparcv9/libld.so.4 755 root bin -f none $SGSDIR/lib/sparcv9/liblddbg.so.4=lib/sparcv9/liblddbg.so.4 755 root bin -f none $SGSDIR/lib/sparcv9/librtld.so.1=lib/sparcv9/librtld.so.1 755 root bin -f none $SGSDIR/lib/sparcv9/librtld_db.so.1=lib/sparcv9/librtld_db.so.1 755 root bin -s none $SGSDIR/lib/sparcv9/librtld_db.so=librtld_db.so.1 -d none $SGSDIR/usr/bin/sparcv9 755 root bin -f none $SGSDIR/usr/bin/sparcv9/ar=usr/bin/sparcv9/ar 555 root bin -s none $SGSDIR/usr/ccs/bin/sparcv9/ar=../../bin/sparcv9/ar -f none $SGSDIR/usr/bin/sparcv9/crle=usr/bin/sparcv9/crle 555 root bin -f none $SGSDIR/usr/bin/sparcv9/ldd=usr/bin/sparcv9/ldd 555 root bin -f none $SGSDIR/usr/bin/sparcv9/moe=usr/bin/sparcv9/moe 555 root bin -f none $SGSDIR/usr/bin/sparcv9/pvs=usr/bin/sparcv9/pvs 555 root bin -d none $SGSDIR/usr/ccs/bin/sparcv9 755 root bin -f none $SGSDIR/usr/bin/sparcv9/dump=usr/bin/sparcv9/dump 0555 root bin -s none $SGSDIR/usr/ccs/bin/sparcv9/dump=../../../bin/sparcv9/dump -f none $SGSDIR/usr/bin/sparcv9/elfdump=usr/bin/sparcv9/elfdump 0555 root bin -s none $SGSDIR/usr/ccs/bin/sparcv9/elfdump=../../../bin/sparcv9/elfdump -f none $SGSDIR/usr/bin/sparcv9/elfedit=usr/bin/sparcv9/elfedit 0555 root bin -f none $SGSDIR/usr/bin/sparcv9/elfwrap=usr/bin/sparcv9/elfwrap 0555 root bin -f none $SGSDIR/usr/bin/sparcv9/ld=usr/bin/sparcv9/ld 755 root bin -s none $SGSDIR/usr/ccs/bin/sparcv9/ld=../../../bin/sparcv9/ld -f none $SGSDIR/usr/bin/sparcv9/nm=usr/bin/sparcv9/nm 0555 root bin -s none $SGSDIR/usr/ccs/bin/sparcv9/nm=../../../bin/sparcv9/nm 0555 root bin -f none $SGSDIR/usr/bin/sparcv9/mcs=usr/bin/sparcv9/mcs 0555 root bin -s none $SGSDIR/usr/ccs/bin/sparcv9/mcs=../../../bin/sparcv9/mcs 0555 root bin -l none $SGSDIR/usr/bin/sparcv9/strip=./mcs -s none $SGSDIR/usr/ccs/bin/sparcv9/strip=../../../bin/sparcv9/strip -f none $SGSDIR/usr/lib/ld.so=usr/lib/ld.so 755 root bin -d none $SGSDIR/usr/lib/elfedit/sparcv9 755 root bin -s none $SGSDIR/usr/lib/elfedit/64=sparcv9 -f none $SGSDIR/usr/lib/elfedit/sparcv9/cap.so=usr/lib/elfedit/sparcv9/cap.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/sparcv9/dyn.so=usr/lib/elfedit/sparcv9/dyn.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/sparcv9/ehdr.so=usr/lib/elfedit/sparcv9/ehdr.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/sparcv9/phdr.so=usr/lib/elfedit/sparcv9/phdr.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/sparcv9/shdr.so=usr/lib/elfedit/sparcv9/shdr.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/sparcv9/str.so=usr/lib/elfedit/sparcv9/str.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/sparcv9/sym.so=usr/lib/elfedit/sparcv9/sym.so 755 root bin -f none $SGSDIR/usr/lib/elfedit/sparcv9/syminfo.so=usr/lib/elfedit/sparcv9/syminfo.so 755 root bin -d none $SGSDIR/usr/lib/link_audit/sparcv9 755 root bin -s none $SGSDIR/usr/lib/link_audit/64=sparcv9 -f none $SGSDIR/usr/lib/link_audit/sparcv9/ldprof.so.1=usr/lib/link_audit/sparcv9/ldprof.so.1 755 root bin -f none $SGSDIR/usr/lib/link_audit/sparcv9/truss.so.1=usr/lib/link_audit/sparcv9/truss.so.1 755 root bin -f none $SGSDIR/usr/lib/link_audit/sparcv9/who.so.1=usr/lib/link_audit/sparcv9/who.so.1 755 root bin -d none $SGSDIR/usr/lib/mdb/proc/sparcv9 755 root sys -f none $SGSDIR/usr/lib/mdb/proc/sparcv9/ld.so=usr/lib/mdb/proc/sparcv9/ld.so 555 root sys -d none $SGSDIR/usr/lib/secure/sparcv9 755 root bin -s none $SGSDIR/usr/lib/secure/64=sparcv9 -d none $SGSDIR/usr/lib/sparcv9 755 root bin -s none $SGSDIR/usr/lib/64=sparcv9 -f none $SGSDIR/usr/lib/sparcv9/lddstub=usr/lib/sparcv9/lddstub 555 root bin -f none $SGSDIR/usr/lib/sparcv9/libcrle.so.1=usr/lib/sparcv9/libcrle.so.1 755 root bin -f none $SGSDIR/usr/lib/sparcv9/libldstab.so.1=usr/lib/sparcv9/libldstab.so.1 755 root bin -d none opt/SUNWonld/bin/sparcv9 755 root bin -f none opt/SUNWonld/bin/sparcv9/rdb 755 root bin -d none opt/SUNWonld/lib/sparcv9 755 root bin -s none opt/SUNWonld/lib/64=sparcv9 -f none opt/SUNWonld/lib/sparcv9/libldmake.so.1 755 root bin -f none opt/SUNWonld/lib/sparcv9/bindings.so.1 755 root bin -f none opt/SUNWonld/lib/sparcv9/perfcnt.so.1 755 root bin -f none opt/SUNWonld/lib/sparcv9/symbindrep.so.1 755 root bin - -# -# The following commented items are for things that exist within -# usr/src/cmd/sgs, but which are not normally considered to be -# part of the SUNWonld package. It is possible to add these items -# to a special-purpose SUNWonld by uncommenting the appropriate lines. -# -#f none $SGSDIR/usr/lib/sparcv9/libl.so.1=usr/lib/sparcv9/libl.so.1 755 root bin -#s none $SGSDIR/usr/lib/sparcv9/libl.so=./libl.so.1 -#f none $SGSDIR/usr/lib/sparcv9/llib-ll.ln=usr/lib/sparcv9/llib-ll.ln 644 root bin - -#f none $SGSDIR/usr/bin/sparcv9/size=usr/bin/sparcv9/size 555 root bin -#s none $SGSDIR/usr/ccs/bin/sparcv9/size=../../../bin/sparcv9/size - -#f none $SGSDIR/usr/lib/sparcv9/liby.so.1=usr/lib/sparcv9/liby.so.1 755 root bin -#s none $SGSDIR/usr/lib/sparcv9/liby.so=./liby.so.1 -#f none $SGSDIR/usr/lib/sparcv9/llib-ly.ln=usr/lib/sparcv9/llib-ly.ln 644 root bin diff --git a/usr/src/cmd/sgs/packages/i386/Makefile b/usr/src/cmd/sgs/packages/i386/Makefile deleted file mode 100644 index 6158a1c608..0000000000 --- a/usr/src/cmd/sgs/packages/i386/Makefile +++ /dev/null @@ -1,36 +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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 1993 by Sun Microsystems, Inc. -# - - -include ../Makefile.com - -.KEEP_STATE: - -all: $(FILES) -install: all $(ROOTREADME) .WAIT pkg - -include ../Makefile.targ diff --git a/usr/src/cmd/sgs/prof/Makefile.com b/usr/src/cmd/sgs/prof/Makefile.com index d713f56acc..52e0bd1031 100644 --- a/usr/src/cmd/sgs/prof/Makefile.com +++ b/usr/src/cmd/sgs/prof/Makefile.com @@ -48,7 +48,7 @@ CERRWARN += $(CNOWARN_UNINIT) # not linted SMATCH=off -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf +LDLIBS += $(CONVLIBDIR) -lconv $(ELFLIBDIR) -lelf %.o: ../common/%.c $(COMPILE.c) $< diff --git a/usr/src/cmd/sgs/pvs/Makefile.com b/usr/src/cmd/sgs/pvs/Makefile.com index 31239a7d0d..e34c937975 100644 --- a/usr/src/cmd/sgs/pvs/Makefile.com +++ b/usr/src/cmd/sgs/pvs/Makefile.com @@ -35,19 +35,19 @@ include $(SRC)/cmd/sgs/Makefile.com COMOBJ= pvs.o BLTOBJ= msg.o -TOOLOBJS = alist.o +SGSCOMMONOBJ = alist.o -OBJS= $(BLTOBJ) $(COMOBJ) $(TOOLOBJS) +OBJS= $(BLTOBJ) $(COMOBJ) $(SGSCOMMONOBJ) MAPFILE= $(MAPFILE.NGB) MAPOPTS= $(MAPFILE:%=-M%) -CPPFLAGS += -I$(SRCBASE)/lib/libc/inc +CPPFLAGS += -I$(SRC)/lib/libc/inc LLDFLAGS = '-R$$ORIGIN/../lib' LLDFLAGS64 = '-R$$ORIGIN/../../lib/$(MACH64)' -LDFLAGS += $(VERSREF) $(CC_USE_PROTO) $(MAPOPTS) $(LLDFLAGS) -LDLIBS += $(LDDBGLIBDIR) $(LDDBG_LIB) $(ELFLIBDIR) -lelf \ - $(CONVLIBDIR) $(CONV_LIB) +LDFLAGS += $(VERSREF) $(MAPOPTS) $(LLDFLAGS) +LDLIBS += $(LDDBGLIBDIR) -llddbg $(ELFLIBDIR) -lelf \ + $(CONVLIBDIR) -lconv # not linted SMATCH=off @@ -65,6 +65,6 @@ SGSMSGALL= $(SGSMSGCOM) SGSMSGFLAGS += -h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n pvs_msg SRCS= $(COMOBJ:%.o=../common/%.c) $(BLTDATA) \ - $(TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) + $(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) CLEANFILES += $(BLTFILES) diff --git a/usr/src/cmd/sgs/pvs/Makefile.targ b/usr/src/cmd/sgs/pvs/Makefile.targ index 444f1e4bc9..2069a4615c 100644 --- a/usr/src/cmd/sgs/pvs/Makefile.targ +++ b/usr/src/cmd/sgs/pvs/Makefile.targ @@ -29,7 +29,7 @@ $(COMPILE.c) $< $(POST_PROCESS_O) -%.o: $(SGSTOOLS)/common/%.c +%.o: $(SGSCOMMON)/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) diff --git a/usr/src/cmd/sgs/rtld/Makefile.com b/usr/src/cmd/sgs/rtld/Makefile.com index fbdede2a9e..6a767de04b 100644 --- a/usr/src/cmd/sgs/rtld/Makefile.com +++ b/usr/src/cmd/sgs/rtld/Makefile.com @@ -29,13 +29,13 @@ RTLD= ld.so.1 AVLOBJ= avl.o DTROBJ= dtrace_data.o -TOOLOBJS= alist.o strhash.o +SGSCOMMONOBJ= alist.o strhash.o BLTOBJ= msg.o ELFCAPOBJ= elfcap.o OBJECTS= $(BLTOBJ) \ $(AVLOBJ) \ $(DTROBJ) \ - $(TOOLOBJS) \ + $(SGSCOMMONOBJ) \ $(ELFCAPOBJ) \ $(P_ASOBJS) $(P_COMOBJS) $(P_MACHOBJS) $(G_MACHOBJS) \ $(S_ASOBJS) $(S_COMOBJS) $(S_MACHOBJS) $(CP_MACHOBJS) @@ -75,10 +75,10 @@ ROOTDYNLIB64= $(RTLD:%=$(ROOTFS_LIBDIR64)/%) FILEMODE = 755 -CPPFLAGS += -I$(SRCBASE)/lib/libc/inc \ - -I$(SRCBASE)/uts/common/krtld \ - -I$(SRCBASE)/uts/$(PLAT) \ - -I$(SRCBASE)/uts/$(PLAT)/krtld \ +CPPFLAGS += -I$(SRC)/lib/libc/inc \ + -I$(SRC)/uts/common/krtld \ + -I$(SRC)/uts/$(PLAT) \ + -I$(SRC)/uts/$(PLAT)/krtld \ -I$(SRC)/common/sgsrtcid \ -I$(ELFCAP) \ $(CPPFEATUREMACROS) @@ -101,11 +101,11 @@ CPICLIB = $(VAR_RTLD_CPICLIB) CPICLIB64 = $(VAR_RTLD_CPICLIB64) CLIB = -lc_pic -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) \ +LDLIBS += $(CONVLIBDIR) -lconv \ $(CPICLIB) $(CLIB) \ - $(LDDBGLIBDIR) $(LDDBG_LIB) \ + $(LDDBGLIBDIR) -llddbg \ $(RTLDLIB) -lrtld \ - $(LDLIB) $(LD_LIB) + $(LDLIB) -lld DYNFLAGS += -i -e _rt_boot $(VERSREF) $(ZNODLOPEN) \ $(ZINTERPOSE) -zdtrace=dtrace_data '-R$$ORIGIN' @@ -138,9 +138,9 @@ SGSMSGFLAGS2= $(SGSMSGFLAGS) -h $(BLTDEFS) -d $(BLTDATA) -n rtld_msg SRCS= $(AVLOBJ:%.o=$(VAR_AVLDIR)/%.c) \ $(DTROBJ:%.o=$(VAR_DTRDIR)/%.c) \ - $(TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \ + $(SGSCOMMONOBJ:%.o=$(SGSCOMMON)/%.c) \ $(COMOBJS:%.o=../common/%.c) $(MACHOBJS:%.o=%.c) $(BLTDATA) \ - $(G_MACHOBJS:%.o=$(SRCBASE)/uts/$(PLAT)/krtld/%.c) \ + $(G_MACHOBJS:%.o=$(SRC)/uts/$(PLAT)/krtld/%.c) \ $(CP_MACHOBJS:%.o=../$(MACH)/%.c) \ $(ASOBJS:%.o=%.s) diff --git a/usr/src/cmd/sgs/rtld/Makefile.targ b/usr/src/cmd/sgs/rtld/Makefile.targ index 6ea1a29e6d..ff2ccf9864 100644 --- a/usr/src/cmd/sgs/rtld/Makefile.targ +++ b/usr/src/cmd/sgs/rtld/Makefile.targ @@ -58,11 +58,11 @@ pics/%.o: $(VAR_DTRDIR)/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%.o: $(SGSTOOLS)/common/%.c +pics/%.o: $(SGSCOMMON)/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -pics/%.o: $(SRCBASE)/uts/$(PLAT)/krtld/%.c +pics/%.o: $(SRC)/uts/$(PLAT)/krtld/%.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) @@ -71,7 +71,7 @@ pics/elfcap.o: $(ELFCAP)/elfcap.c $(POST_PROCESS_O) $(RTLD): pics $(PICS) $(CRTS) - $(LD_USE_PROTO)ld -o $@ -dy -G $(DYNFLAGS) $(CRTI) $(PICS) \ + $(LD) -o $@ -dy -G $(DYNFLAGS) $(CRTI) $(PICS) \ $(LDLIBS) $(CRTN) $(POST_PROCESS_SO) diff --git a/usr/src/cmd/sgs/rtld/mdbmod/Makefile.com b/usr/src/cmd/sgs/rtld/mdbmod/Makefile.com index e7cfe1137f..4f654ba8c4 100644 --- a/usr/src/cmd/sgs/rtld/mdbmod/Makefile.com +++ b/usr/src/cmd/sgs/rtld/mdbmod/Makefile.com @@ -66,7 +66,7 @@ CPPFLAGS += -I. -I../common -I../../common -I../../../include \ -I$(SRC)/uts/$(ARCH)/sys DYNFLAGS += $(VERSREF) -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) -lc +LDLIBS += $(CONVLIBDIR) -lconv -lc ROOTMDBLIB= $(ROOT)/usr/lib/mdb/proc ROOTMDBLIB64= $(ROOTMDBLIB)/$(MACH64) diff --git a/usr/src/cmd/sgs/rtld/sparc/Makefile b/usr/src/cmd/sgs/rtld/sparc/Makefile index 4c60c5c8d6..d63f57b13a 100644 --- a/usr/src/cmd/sgs/rtld/sparc/Makefile +++ b/usr/src/cmd/sgs/rtld/sparc/Makefile @@ -53,7 +53,7 @@ CRTI= pics/crti.o CRTN= pics/crtn.o CRTS= $(CRTI) $(CRTN) -CHKSRCS= $(SRCBASE)/uts/common/krtld/reloc.h +CHKSRCS= $(SRC)/uts/common/krtld/reloc.h BASEPLAT = sparc diff --git a/usr/src/cmd/sgs/rtld/sparcv9/Makefile b/usr/src/cmd/sgs/rtld/sparcv9/Makefile index d351ee66da..87593bc6d2 100644 --- a/usr/src/cmd/sgs/rtld/sparcv9/Makefile +++ b/usr/src/cmd/sgs/rtld/sparcv9/Makefile @@ -52,7 +52,7 @@ CRTI= pics/crti.o CRTN= pics/crtn.o CRTS= $(CRTI) $(CRTN) -CHKSRCS= $(SRCBASE)/uts/common/krtld/reloc.h +CHKSRCS= $(SRC)/uts/common/krtld/reloc.h BASEPLAT = sparc diff --git a/usr/src/cmd/sgs/size/Makefile.com b/usr/src/cmd/sgs/size/Makefile.com index bba1a33384..d835b55ce3 100644 --- a/usr/src/cmd/sgs/size/Makefile.com +++ b/usr/src/cmd/sgs/size/Makefile.com @@ -44,6 +44,6 @@ LLDFLAGS = '$(LDPASS)-R$$ORIGIN/../../lib' LLDFLAGS64 = '$(LDPASS)-R$$ORIGIN/../../../lib/$(MACH64)' LDFLAGS += $(LLDFLAGS) -LDLIBS += $(CONVLIBDIR) $(CONV_LIB) $(ELFLIBDIR) -lelf +LDLIBS += $(CONVLIBDIR) -lconv $(ELFLIBDIR) -lelf CLEANFILES += $(OBJS) diff --git a/usr/src/cmd/sgs/tools/Makefile b/usr/src/cmd/sgs/tools/Makefile index eacc1f10a8..0d65dff41f 100644 --- a/usr/src/cmd/sgs/tools/Makefile +++ b/usr/src/cmd/sgs/tools/Makefile @@ -38,20 +38,7 @@ include $(SRC)/Makefile.master -LSSRCS= info.sh \ - proto.sh - -SRCS= $(LSSRCS) - -LEXECS= $(LSSRCS:%.sh=%) - -ROOTDIR = $(ROOT)/opt/SUNWonld/bin -ROOTPROGS = $(GEXECS:%=$(ROOTDIR)/%) -ROOTPROGS += $(PSRCS:%=$(ROOTDIR)/%) - -$(ROOTPROGS) := FILEMODE=755 - -SUBDIRS= $(MACH) man +SUBDIRS= $(MACH) all:= TARGET= all install:= TARGET= install @@ -61,29 +48,11 @@ clobber:= TARGET= clobber .KEEP_STATE: -all: $(EXECS) $(SUBDIRS) - -install: all $(ROOTPROGS) $(SUBDIRS) - -clean clobber: $(SUBDIRS) - $(RM) $(RMFLAGS) $(EXECS) +all install clean clobberall: $(SUBDIRS) delete: -%: %.ksh - $(RM) $@ - cat $< > $@ - chmod +x $@ - $(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(TARGET) -$(ROOTDIR)/%: % - $(INS.file) - -$(ROOTDIR)/%: scoping/% - $(INS.file) - FRC: - -execs: $(EXECS) diff --git a/usr/src/cmd/sgs/tools/Makefile.com b/usr/src/cmd/sgs/tools/Makefile.com index 91e4cfa27f..be05c9f0a3 100644 --- a/usr/src/cmd/sgs/tools/Makefile.com +++ b/usr/src/cmd/sgs/tools/Makefile.com @@ -29,8 +29,9 @@ # # Makefile to support tools used for linker development: # -# o sgsmsg creates message headers/arrays/catalogs (a native tool). +# piglatin - generates phone message catalogs for testing # + # Note, these tools are not part of the product. # # cmd/sgs/tools/Makefile.com @@ -39,29 +40,12 @@ include $(SRC)/cmd/Makefile.cmd include $(SRC)/cmd/sgs/Makefile.com -SGSPROTO= ../../proto/$(MACH) - -COMOBJS= - -NATOBJS= piglatin.o - -OBJECTS= $(COMOBJS) $(NATOBJS) - -AVLOBJ= avl.o -TOOL_OBJS= sgsmsg.o string_table.o findprime.o assfail.o -SGSMSG_OBJS= $(TOOL_OBJS) $(AVLOBJ) -SGSMSG_SRCS= $(TOOL_OBJS:%.o=../common/%.c) \ - $(AVLOBJ:%.o=$(VAR_AVLDIR)/%.c) - -$(SGSMSG_OBJS) := NATIVE_CFLAGS += -I../../include $(VAR_TOOLS_CPPFLAGS) +OBJECTS= piglatin.o -PROGS= $(COMOBJS:%.o=%) -NATIVE= $(NATOBJS:%.o=%) sgsmsg -SRCS= $(COMOBJS:%.o=../common/%.c) $(NATOBJS:%.o=../common/%.c) +NATIVE= $(OBJECTS:%.o=%) +SRCS= $(OBJECTS:%.o=../common/%.c) CPPFLAGS += $(VAR_TOOLS_CPPFLAGS) -LDFLAGS += $(CC_USE_PROTO) -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 2bde89ba1b..5d37f9bb65 100644 --- a/usr/src/cmd/sgs/tools/Makefile.targ +++ b/usr/src/cmd/sgs/tools/Makefile.targ @@ -33,21 +33,6 @@ $(ROOTDIR)/bin/%: % $(ROOTDIR)/lib/%: % $(INS.file) -sgsmsg: $(SGSMSG_OBJS) - $(NATIVECC) $(DEBUG) $(NATIVE_CFLAGS) \ - -o $@ $(SGSMSG_OBJS) - -sgsmsg.o: ../common/sgsmsg.c - $(NATIVECC) $(DEBUG) $(NATIVE_CFLAGS) -c ../common/sgsmsg.c - -string_table.o: ../common/string_table.c - $(NATIVECC) $(DEBUG) $(NATIVE_CFLAGS) -c \ - ../common/string_table.c - -avl.o: $(VAR_AVLDIR)/avl.c - $(NATIVECC) $(DEBUG) $(NATIVE_CFLAGS) -c \ - $(VAR_AVLDIR)/avl.c - piglatin: ../common/piglatin.c $(NATIVECC) $(NATIVE_CFLAGS) -o $@ ../common/piglatin.c @@ -59,8 +44,6 @@ piglatin: ../common/piglatin.c $(COMPILE.c) -o $@ $< $(POST_PROCESS_O) -catalog: sgsmsg - clobber: clean $(RM) $(PROGS) $(NATIVE) $(CLOBBERFILES) diff --git a/usr/src/cmd/sgs/packages/common/SUNWonld-README b/usr/src/cmd/sgs/tools/SUNWonld-README index 731e52c973..731e52c973 100644 --- a/usr/src/cmd/sgs/packages/common/SUNWonld-README +++ b/usr/src/cmd/sgs/tools/SUNWonld-README diff --git a/usr/src/cmd/sgs/tools/bld_lint.sh b/usr/src/cmd/sgs/tools/bld_lint.sh deleted file mode 100644 index 730a3fb9ee..0000000000 --- a/usr/src/cmd/sgs/tools/bld_lint.sh +++ /dev/null @@ -1,94 +0,0 @@ -#! /usr/bin/sh -# -# 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. -# -# ident "%Z%%M% %I% %E% SMI" -# - -DASHES="============================================================" - -MACH= `uname -p` - -if [ $MACH = "sparc" ] -then - MACH64="sparcv9" -elif [ $MACH = "i386" ] -then - MACH64="amd64" -else - MACH64="unknown" -fi - -LOG=lint.$MACH.log - -# -# Keep the first run as a backup, so that subsequent runs can diff against it. -# -if [ -f $LOG ] -then - if [ ! -f $LOG.bak ] - then - mv $LOG $LOG.bak - else - rm -f $LOG - fi -fi - -# -# Grab the lint.out from all of our directories. -# -for ii in $* -do - if [ $ii = ".WAIT" ] - then - continue - fi - - # Concatinate the lint.out to our log file. -# echo $ii/$MACH >> $LOG - echo $DASHES >> $LOG - cat $ii/$MACH/lint.out >> $LOG - echo "\n" >> $LOG - - # If there is a 64-bit directory, tack that on as well. - if [ -f $ii/$MACH64/lint.out ] - then -# echo $ii/$MACH64 >> $LOG - echo $DASHES >> $LOG - cat $ii/$MACH64/lint.out >> $LOG - echo "\n" >> $LOG - fi -done - -# -# If there is a backup log, diff the current one against it. -# -if [ -f $LOG.bak ] -then - echo "Running diff on log file..." - diff $LOG.bak $LOG -fi - -exit 0 diff --git a/usr/src/cmd/sgs/tools/man/chkmsg.1l b/usr/src/cmd/sgs/tools/chkmsg.1l index cfe5f1ee7f..47d56dd3a1 100644 --- a/usr/src/cmd/sgs/tools/man/chkmsg.1l +++ b/usr/src/cmd/sgs/tools/chkmsg.1l @@ -1,4 +1,3 @@ -.\" ident "%Z%%M% %I% %E% SMI" .\" Copyright 2005 Sun Microsystems, Inc. All rights reserved. .\" Use is subject to license terms. .\" @@ -23,9 +22,9 @@ .\" CDDL HEADER END .\" .if n .tr \-- -.TH chkmsg 1l "5 Apr 1997" +.TH chkmsg 1l "Apr 5, 1997" .SH NAME -chkmsg \- cross check messages +chkmsg \- cross check messages .SH SYNOPSIS .B chkmsg .BI [ -64 ] @@ -38,7 +37,7 @@ chkmsg checks the message identifiers defined in the input file and the message identifyer used in the input source_files. The input file is the input file which is used by the sgsmsg command. .P -The chkmsg command reads the input file and +The chkmsg command reads the input file and generates two sets of message identifiers. The first set is the identifiers defined in between the _START_ and _END_ key words. @@ -83,8 +82,8 @@ directly passed to MSG_INTL() or MSG_ORIG(). Therefore, for example: .RE the identifyer MSG_ERROR_01 will not be included in MSG_INTL_FROM_SRC set. .P -There are two key words which can be used in the input file -to control whether the identifier will be extracted into +There are two key words which can be used in the input file +to control whether the identifier will be extracted into MSG_{INTL,ORIG}_FROM_ORIG or not. If the identifyer are surrounded by _CHKMSG_SKIP_BEGIN_ {sparc,i386} and _CHKMSG_SKIP_END_ {sparc,i386}, then @@ -114,8 +113,6 @@ Note that this option must be specified first on the command line. .BR ld (1), .BR msgfmt (1), .BR catgets (3C), -.BR gettext (3I). -.BR sgsmsg (1l). -.br -.TZ LLM +.BR gettext (3C). +.BR sgsmsg (1ONBLD). .if n .tr \-\- diff --git a/usr/src/cmd/sgs/tools/chkmsg.sh b/usr/src/cmd/sgs/tools/chkmsg.sh index 04d7be141f..31c5261e84 100644 --- a/usr/src/cmd/sgs/tools/chkmsg.sh +++ b/usr/src/cmd/sgs/tools/chkmsg.sh @@ -24,7 +24,6 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" TOOLDIR="${SRC}/cmd/sgs/tools/" diff --git a/usr/src/cmd/sgs/tools/i386/Makefile b/usr/src/cmd/sgs/tools/i386/Makefile index 44cab67a8f..3076c8026e 100644 --- a/usr/src/cmd/sgs/tools/i386/Makefile +++ b/usr/src/cmd/sgs/tools/i386/Makefile @@ -19,9 +19,6 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1996 by Sun Microsystems, Inc. # All rights reserved. @@ -29,9 +26,7 @@ include $(SRC)/cmd/sgs/tools/Makefile.com .KEEP_STATE: -all: native $(PROGS) $(LIBS) - -native: $(NATIVE) +all: $(NATIVE) $(PROGS) $(LIBS) install: all $(ROOTPROGS) $(ROOTLIBS) diff --git a/usr/src/cmd/sgs/tools/man/Makefile b/usr/src/cmd/sgs/tools/man/Makefile deleted file mode 100644 index 3aca0b0af4..0000000000 --- a/usr/src/cmd/sgs/tools/man/Makefile +++ /dev/null @@ -1,50 +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 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. -# - -MAN1l= chkmsg.1l \ - sgsmsg.1l - -MANS= $(MAN1l) - -include ../../../../Makefile.master - -ROOTDIR= $(ROOT)/opt/SUNWonld/man -ROOT1lMAN= $(MAN1l:%=$(ROOTDIR)/man1l/%) - -ROOTMANS= $(ROOT1lMAN) - -FILEMODE= 0444 - -.KEEP_STATE: -all: $(MANS) - -install: all $(ROOTMANS) - -$(ROOTDIR)/man1l/%: % - $(INS.file) - -clobber clean: diff --git a/usr/src/cmd/sgs/tools/proto.sh b/usr/src/cmd/sgs/tools/proto.sh deleted file mode 100644 index 7c5f5cabbd..0000000000 --- a/usr/src/cmd/sgs/tools/proto.sh +++ /dev/null @@ -1,197 +0,0 @@ -#!/bin/sh -# -# 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 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" -# -# Generate a proto area suitable for the current architecture ($(MACH)) -# sufficient to support the sgs build. -# -# Currently, the following releases are supported: -# 5.11, 5.10, and 5.9. -# - -if [ "X$CODEMGR_WS" = "X" -o "X$MACH" = "X" ] ; then - echo "usage: CODEMGR_WS and MACH environment variables must be set" - exit 1 -fi - -RELEASE=$1 - -if [ "X$RELEASE" = "X" ] ; then - echo "usage: proto release" - exit 1; -fi - -IS_THIS_UNIFIED=1 - -case $RELEASE in - "5.11") break;; - "5.10") break;; - "5.9") IS_THIS_UNIFIED=0; break;; - *) - echo "usage: unsupported release $RELEASE specified" - exit 1;; -esac - -dirs=" $CODEMGR_WS/proto \ - $CODEMGR_WS/proto/root_$MACH \ - $CODEMGR_WS/proto/root_$MACH/lib \ - $CODEMGR_WS/proto/root_$MACH/usr \ - $CODEMGR_WS/proto/root_$MACH/usr/demo \ - $CODEMGR_WS/proto/root_$MACH/usr/lib \ - $CODEMGR_WS/proto/root_$MACH/usr/lib/abi \ - $CODEMGR_WS/proto/root_$MACH/usr/lib/link_audit \ - $CODEMGR_WS/proto/root_$MACH/usr/lib/mdb \ - $CODEMGR_WS/proto/root_$MACH/usr/lib/mdb/proc \ - $CODEMGR_WS/proto/root_$MACH/usr/lib/pics \ - $CODEMGR_WS/proto/root_$MACH/usr/4lib \ - $CODEMGR_WS/proto/root_$MACH/usr/bin \ - $CODEMGR_WS/proto/root_$MACH/usr/ccs \ - $CODEMGR_WS/proto/root_$MACH/usr/ccs/bin \ - $CODEMGR_WS/proto/root_$MACH/usr/include \ - $CODEMGR_WS/proto/root_$MACH/usr/include/sys \ - $CODEMGR_WS/proto/root_$MACH/usr/xpg4 \ - $CODEMGR_WS/proto/root_$MACH/usr/xpg4/bin \ - $CODEMGR_WS/proto/root_$MACH/etc \ - $CODEMGR_WS/proto/root_$MACH/etc/lib \ - $CODEMGR_WS/proto/root_$MACH/opt \ - $CODEMGR_WS/proto/root_$MACH/opt/SUNWonld \ - $CODEMGR_WS/proto/root_$MACH/opt/SUNWonld/bin \ - $CODEMGR_WS/proto/root_$MACH/opt/SUNWonld/doc \ - $CODEMGR_WS/proto/root_$MACH/opt/SUNWonld/lib \ - $CODEMGR_WS/proto/root_$MACH/opt/SUNWonld/man \ - $CODEMGR_WS/proto/root_$MACH/opt/SUNWonld/man/man1 \ - $CODEMGR_WS/proto/root_$MACH/opt/SUNWonld/man/man1l \ - $CODEMGR_WS/proto/root_$MACH/opt/SUNWonld/man/man3t \ - $CODEMGR_WS/proto/root_$MACH/opt/SUNWonld/man/man3l \ - $CODEMGR_WS/proto/root_$MACH/opt/SUNWonld/man/man3x" - -# -# Add 64bit directories -# -MACH64="" -if [ $MACH = "sparc" ]; then - MACH64="sparcv9"; -fi -if [ $MACH = "i386" ]; then - MACH64="amd64"; -fi -if [ "${MACH64}x" != x ]; then - - dirs="$dirs \ - $CODEMGR_WS/proto/root_$MACH/lib/$MACH64 \ - $CODEMGR_WS/proto/root_$MACH/usr/bin/$MACH64 \ - $CODEMGR_WS/proto/root_$MACH/usr/ccs/bin/$MACH64 \ - $CODEMGR_WS/proto/root_$MACH/usr/lib/$MACH64 \ - $CODEMGR_WS/proto/root_$MACH/usr/lib/abi/$MACH64 \ - $CODEMGR_WS/proto/root_$MACH/usr/lib/link_audit/$MACH64 \ - $CODEMGR_WS/proto/root_$MACH/usr/lib/mdb/proc/$MACH64 \ - $CODEMGR_WS/proto/root_$MACH/usr/lib/pics/$MACH64 \ - $CODEMGR_WS/proto/root_$MACH/opt/SUNWonld/bin/$MACH64 \ - $CODEMGR_WS/proto/root_$MACH/opt/SUNWonld/lib/$MACH64 \ - " -fi - -for dir in `echo $dirs` -do - if [ ! -d $dir ] ; then - echo $dir - mkdir $dir - chmod 777 $dir - fi -done - -# We need a local copy of libc_pic.a (we should get this from the parent -# workspace, but as we can't be sure how the proto area is constructed there -# simply take it from a stashed copy on the linkers server. If -# LINKERS_EXPORT is defined, we use it. Failing that, we fall over -# to linkers.central. -if [ "$LINKERS_EXPORT" = "" ]; then - LINKERS_EXPORT=/net/linkers.central/export -fi - -if [ $MACH = "sparc" ]; then - PLATS="sparc sparcv9" -elif [ $MACH = "i386" ]; then - PLATS="i386 amd64" -else - echo "Unknown Mach: $MACH - no libc_pic.a provided!" - PLATS="" -fi - -for p in $PLATS -do - SRCLIBCDIR=${SRC}/lib/libc/$p - if [ ! -d $SRCLIBCDIR ]; then - mkdir -p $SRCLIBCDIR - fi - if [ ! -f $SRCLIBCDIR/libc_pic.a ]; then - cp $LINKERS_EXPORT/big/libc_pic/$RELEASE/$p/libc_pic.a \ - $SRCLIBCDIR - fi -done - -SYSLIB=$CODEMGR_WS/proto/root_$MACH/lib -USRLIB=$CODEMGR_WS/proto/root_$MACH/usr/lib - -if [ ! -h $USRLIB/ld.so.1 ]; then - rm -f $USRLIB/ld.so.1 - ln -s ../../lib/ld.so.1 $USRLIB/ld.so.1 - echo "$USRLIB/ld.so.1 -> ../../lib/ld.so.1" -fi - -# -# In addition create some 64 symlinks so that dependencies referenced -# from our test environment will map back to the appropriate libraries. -# -if [ ! -h $SYSLIB/64 ] ; then - rm -f $SYSLIB/64 - ln -s $MACH64 $SYSLIB/64 - echo "$SYSLIB/64 -> $SYSLIB/$MACH64" -fi -if [ ! -h $USRLIB/64 ] ; then - rm -f $USRLIB/64 - ln -s $MACH64 $USRLIB/64 - echo "$USRLIB/64 -> $USRLIB/$MACH64" -fi -if [ ! -h $USRLIB/link_audit/64 ] ; then - rm -f $USRLIB/link_audit/64 - ln -s $MACH64 $USRLIB/link_audit/64 - echo "$USRLIB/link_audit/64 -> $USRLIB/link_audit/$MACH64" -fi -if [ ! -h $USRLIB/64/ld.so.1 ]; then - rm -f $USRLIB/64/ld.so.1 - ln -s ../../../lib/64/ld.so.1 $USRLIB/64/ld.so.1 - echo "$USRLIB/64/ld.so.1 -> ../../../lib/64/ld.so.1" -fi - -# -# -# -if [ $IS_THIS_UNIFIED = 0 ] ; then - rm -fr $CODEMGR_WS/proto/root_$MACH/lib - ln -s $CODEMGR_WS/proto/root_$MACH/usr/lib $CODEMGR_WS/proto/root_$MACH/lib -fi diff --git a/usr/src/cmd/sgs/packages/common/readme_revision b/usr/src/cmd/sgs/tools/readme_revision index 7cde955a9d..c2ea670186 100755 --- a/usr/src/cmd/sgs/packages/common/readme_revision +++ b/usr/src/cmd/sgs/tools/readme_revision @@ -22,12 +22,9 @@ # # CDDL HEADER END # -#pragma ident "%Z%%M% %I% %E% SMI" - - # # Generate a revision number for the sgs linker components, based -# on usr/src/cmd/sgs/packages/common/SUNWonld-README. +# on usr/src/cmd/sgs/tools/SUNWonld-README. # # usage: readme_revision [-d] [readme-file] # @@ -128,7 +125,6 @@ if ($debug == 0) { } # For debug mode, add diagnostic data -# ($wsname = $ENV{'CODEMGR_WS'}) ne '' || ($wsname = 'unknown'); @wsname = split /\//, $wsname; $wsname = $wsname[$#wsname]; diff --git a/usr/src/cmd/sgs/tools/sparc/Makefile b/usr/src/cmd/sgs/tools/sparc/Makefile index 44cab67a8f..3076c8026e 100644 --- a/usr/src/cmd/sgs/tools/sparc/Makefile +++ b/usr/src/cmd/sgs/tools/sparc/Makefile @@ -19,9 +19,6 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# # Copyright (c) 1996 by Sun Microsystems, Inc. # All rights reserved. @@ -29,9 +26,7 @@ include $(SRC)/cmd/sgs/tools/Makefile.com .KEEP_STATE: -all: native $(PROGS) $(LIBS) - -native: $(NATIVE) +all: $(NATIVE) $(PROGS) $(LIBS) install: all $(ROOTPROGS) $(ROOTLIBS) diff --git a/usr/src/tools/Makefile b/usr/src/tools/Makefile index 50a656c2e1..014464efe9 100644 --- a/usr/src/tools/Makefile +++ b/usr/src/tools/Makefile @@ -61,12 +61,19 @@ COMMON_SUBDIRS= \ onbld \ protocmp \ protolist \ - scripts + scripts \ + sgs # # special versions of commands for use only in build # UNSHIPPED_SUBDIRS = \ + $(SGSMSG) \ + $(SGSLIBCONV) \ + $(SGSLIBELF) \ + $(SGSLIBLDDBG) \ + $(SGSLIBLD) \ + $(SGSLD) \ localedef \ mandoc \ tic \ @@ -85,6 +92,8 @@ i386_SUBDIRS= \ mbh_patch \ btxld +$(INTEL_BLD)sgs: aw + SUBDIRS= \ $($(MACH)_SUBDIRS) \ $(COMMON_SUBDIRS) \ diff --git a/usr/src/tools/Makefile.tools b/usr/src/tools/Makefile.tools index cd38795b01..867c55b2f4 100644 --- a/usr/src/tools/Makefile.tools +++ b/usr/src/tools/Makefile.tools @@ -55,6 +55,10 @@ LDLIBS= LDFLAGS= $(MAPFILE.NES:%=-M%) $(MAPFILE.NED:%=-M%) \ $(MAPFILE.PGA:%=-M%) +# Unset CW_LINKER so we run the default. We don't set LD here to avoid taking +# the journey through LD_ALTEXEC unnecessarily. +CW_LINKER= + ROOTONBLDPROG= $(PROG:%=$(ROOTONBLDBIN)/%) ROOTONBLDMACHPROG= $(PROG:%=$(ROOTONBLDBINMACH)/%) ROOTONBLDSHFILES= $(SHFILES:%=$(ROOTONBLDBIN)/%) diff --git a/usr/src/tools/chk4ubin/Makefile b/usr/src/tools/chk4ubin/Makefile index a251d49ca7..5da362350e 100644 --- a/usr/src/tools/chk4ubin/Makefile +++ b/usr/src/tools/chk4ubin/Makefile @@ -28,6 +28,7 @@ include ../Makefile.tools PROG = chk4ubin +DYNFLAGS += '-R$$ORIGIN/../../lib/$(MACH)' LDLIBS += -lelf LINTFLAGS += -ux diff --git a/usr/src/tools/ctf/dwarf/Makefile.com b/usr/src/tools/ctf/dwarf/Makefile.com index 67ffd64a62..52aedda3a7 100644 --- a/usr/src/tools/ctf/dwarf/Makefile.com +++ b/usr/src/tools/ctf/dwarf/Makefile.com @@ -68,7 +68,7 @@ OBJECTS=dwarf_abbrev.o \ pro_weaks.o include $(SRC)/lib/Makefile.lib - +include $(SRC)/tools/Makefile.tools FILEMODE = 0755 SRCDIR = $(SRC)/lib/libdwarf/common/ @@ -81,6 +81,7 @@ CERRWARN += -_gcc=-Wno-implicit-function-declaration # libdwarf not clean SMATCH=off +DYNFLAGS += '-R$$ORIGIN/../../lib/$(MACH)' LDLIBS = -lelf -lc .KEEP_STATE: diff --git a/usr/src/tools/cw/cw.1onbld b/usr/src/tools/cw/cw.1onbld index 62800bb727..465c4b590d 100644 --- a/usr/src/tools/cw/cw.1onbld +++ b/usr/src/tools/cw/cw.1onbld @@ -36,6 +36,7 @@ .Op Fl -noecho .Fl -primary Ar compiler .Op Fl -shadow Ar compiler ... +.Op Fl -linker Ar linker .Fl - .Ar compiler args ... .Sh DESCRIPTION @@ -77,6 +78,11 @@ and pre-processing, and whos objects we deliver). .It Fl -shadow Ar compiler Specify a shadow compiler, which builds sources for the sake of checking code quality and compatibility, but has its output discarded. +.It Fl -linker Ar linker +Specify a link-editor to use in place of +.Pa /usr/bin/ld . +.Xr ld 1 +itself arranges for this to be executed by any subprocesses. .It Fl -noecho Do not echo the actual command line of any compilers invoked. .It Fl -versions @@ -210,7 +216,8 @@ exit status. .Sh SEE ALSO .Xr cc 1 , .Xr CC 1 , -.Xr gcc 1 +.Xr gcc 1 , +.Xr ld 1 .Sh BUGS The translations provided for gcc are not always exact and in some cases reflect local policy rather than actual equivalence. diff --git a/usr/src/tools/cw/cw.c b/usr/src/tools/cw/cw.c index 3763e8298e..31ba40cb85 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 "4.0" +#define CW_VERSION "5.0" /* * -# Verbose mode @@ -306,6 +306,7 @@ typedef struct { typedef struct cw_ictx { struct cw_ictx *i_next; cw_compiler_t *i_compiler; + char *i_linker; struct aelist *i_ae; uint32_t i_flags; int i_oldargc; @@ -423,7 +424,7 @@ newae(struct aelist *ael, const char *arg) { struct ae *ae; - if ((ae = calloc(sizeof (*ae), 1)) == NULL) + if ((ae = calloc(1, sizeof (*ae))) == NULL) nomem(); ae->ae_arg = strdup(arg); if (ael->ael_tail == NULL) @@ -437,9 +438,9 @@ newae(struct aelist *ael, const char *arg) static cw_ictx_t * newictx(void) { - cw_ictx_t *ctx = calloc(sizeof (cw_ictx_t), 1); + cw_ictx_t *ctx = calloc(1, sizeof (cw_ictx_t)); if (ctx) - if ((ctx->i_ae = calloc(sizeof (struct aelist), 1)) == NULL) { + if ((ctx->i_ae = calloc(1, sizeof (struct aelist))) == NULL) { free(ctx); return (NULL); } @@ -495,7 +496,7 @@ Xsmode(struct aelist *h) } static void -usage() +usage(void) { extern char *__progname; (void) fprintf(stderr, @@ -1209,14 +1210,6 @@ do_gcc(cw_ictx_t *ctx) /* Just ignore -YS,... for now */ if (strncmp(arg, "S,", 2) == 0) break; - if (strncmp(arg, "l,", 2) == 0) { - char *s = strdup(arg); - s[0] = '-'; - s[1] = 'B'; - newae(ctx->i_ae, s); - free(s); - break; - } if (strncmp(arg, "I,", 2) == 0) { char *s = strdup(arg); s[0] = '-'; @@ -1468,6 +1461,14 @@ prepctx(cw_ictx_t *ctx) (void) fflush(stdout); } + /* + * If LD_ALTEXEC is already set, the expectation would be that that + * link-editor is run, as such we need to leave it the environment + * alone and let that happen. + */ + if ((ctx->i_linker != NULL) && (getenv("LD_ALTEXEC") == NULL)) + setenv("LD_ALTEXEC", ctx->i_linker, 1); + if (!(ctx->i_flags & CW_F_XLATE)) return; @@ -1727,6 +1728,7 @@ main(int argc, char **argv) static struct option longopts[] = { { "compiler", no_argument, NULL, 'c' }, + { "linker", required_argument, NULL, 'l' }, { "noecho", no_argument, NULL, 'n' }, { "primary", required_argument, NULL, 'p' }, { "shadow", required_argument, NULL, 's' }, @@ -1746,6 +1748,10 @@ main(int argc, char **argv) case 'C': Cflg = B_TRUE; break; + case 'l': + if ((main_ctx->i_linker = strdup(optarg)) == NULL) + nomem(); + break; case 'n': nflg = B_TRUE; break; diff --git a/usr/src/tools/findunref/exception_list.open b/usr/src/tools/findunref/exception_list.open index a1c421cceb..6c432c78c1 100644 --- a/usr/src/tools/findunref/exception_list.open +++ b/usr/src/tools/findunref/exception_list.open @@ -143,7 +143,6 @@ # Ignore internal packages, scripts, and tools that are intentionally not # built or used during a nightly. # -./usr/src/cmd/sgs/packages ./usr/src/cmd/sgs/rtld.4.x ./usr/src/prototypes ./usr/src/cmd/pools/poold/com/sun/solaris/*/*/package.html diff --git a/usr/src/tools/make/lib/makestate/Makefile.com b/usr/src/tools/make/lib/makestate/Makefile.com index 1bf0d1d89a..338cdf7a27 100644 --- a/usr/src/tools/make/lib/makestate/Makefile.com +++ b/usr/src/tools/make/lib/makestate/Makefile.com @@ -18,6 +18,7 @@ VERS = .1 OBJECTS = ld_file.o lock.o include $(SRC)/lib/Makefile.lib +include $(SRC)/tools/Makefile.tools include ../../../Makefile.com LIBS = $(DYNLIB) diff --git a/usr/src/tools/sgs/Makefile b/usr/src/tools/sgs/Makefile new file mode 100644 index 0000000000..cd407f0709 --- /dev/null +++ b/usr/src/tools/sgs/Makefile @@ -0,0 +1,39 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# Copyright 2019, Richard Lowe. + +SUBDIRS = \ + include \ + ld \ + libconv \ + libelf \ + libld \ + liblddbg \ + sgsmsg + +all := TARGET= install +install := TARGET= install +clean := TARGET= clean +clobber := TARGET= clobber + +ld: sgsmsg include libconv libelf libld +libconv: sgsmsg include +libelf: sgsmsg include +libld: sgsmsg libelf libconv liblddbg include +liblddbg: sgsmsg libconv include + +all install clean clobber: $(SUBDIRS) + +$(SUBDIRS): FRC + @cd $@; pwd; $(MAKE) $(TARGET) + +FRC: diff --git a/usr/src/tools/sgs/Makefile.com b/usr/src/tools/sgs/Makefile.com new file mode 100644 index 0000000000..e3be3840f7 --- /dev/null +++ b/usr/src/tools/sgs/Makefile.com @@ -0,0 +1,18 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# Copyright 2019, Richard Lowe. + +include $(SRC)/cmd/sgs/Makefile.com + +NATIVE_CPPFLAGS = -I. -I$(SRCDIR) -I$(SRCDIR)/common \ + -I$(SGSHOME)/include -I$(SGSHOME)/include/$(MACH) \ + -I../include $(CPPFLAGS.native) -I$(ELFCAP) -DNATIVE_BUILD diff --git a/usr/src/tools/sgs/include/Makefile b/usr/src/tools/sgs/include/Makefile new file mode 100644 index 0000000000..e97e7564b3 --- /dev/null +++ b/usr/src/tools/sgs/include/Makefile @@ -0,0 +1,68 @@ +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# + +# Copyright 2019, Richard Lowe. + +include ../../../Makefile.master + +# +# To build a proper 'tools' version of the link-editor is not possible, as +# we'll always depend on the ELF-related headers from the workspace, not the +# system. +# +# We pull in the minimum amount of headers using an explicit list of "ELF-y" +# headers to populate this directory, which we then search while building. +# +# This may not be enough on all occasions, judgement must be used to decide +# between providing extra headers, and wrapping problematic code in conditions +# on NATIVE_BUILD for a period of time. +# + +ROOTHDRS= dlfcn.h \ + gelf.h \ + libelf.h \ + proc_service.h \ + rtld_db.h \ + link.h + +SYSHDRS= sys/elf.h \ + sys/elf_386.h \ + sys/elf_SPARC.h \ + sys/elf_notes.h \ + sys/elf_amd64.h \ + sys/elftypes.h \ + sys/auxv.h \ + sys/auxv_SPARC.h \ + sys/auxv_386.h \ + sys/avl.h \ + sys/link.h \ + sys/machelf.h \ + sys/note.h \ + sys/systeminfo.h + +sys: + $(MKDIR) -p sys + +%: $(SRC)/head/% + $(INS.file) + +sys/%: sys $(SRC)/uts/common/sys/% + $(INS.file) + +all install: $(SYSHDRS) $(ROOTHDRS) + +clean: + +clobber: clean + $(RM) $(SYSHDRS) $(ROOTHDRS) + + + diff --git a/usr/src/cmd/sgs/packages/sparc/Makefile b/usr/src/tools/sgs/ld/Makefile index 6158a1c608..fc802dea0e 100644 --- a/usr/src/cmd/sgs/packages/sparc/Makefile +++ b/usr/src/tools/sgs/ld/Makefile @@ -19,18 +19,23 @@ # # CDDL HEADER END # -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright (c) 1993 by Sun Microsystems, Inc. -# +# Copyright (c) 1996 by Sun Microsystems, Inc. +# All rights reserved. +include ../Makefile.com +include ../../Makefile.tools +include $(SGSHOME)/ld/Makefile.com -include ../Makefile.com +LDLIBS = -L../libconv -L$(ROOTONBLDLIBMACH) -lld -lelf -lconv +CPPFLAGS = $(NATIVE_CPPFLAGS) +CFLAGS = $(NATIVE_CFLAGS) +MAPFILES = $(SRCDIR)/common/mapfile-intf +CW_LINKER = +VAR_LD_LLDFLAGS= '-R$$ORIGIN/../../lib/$(MACH)' +VAR_LD_LLDFLAGS64 = '-R$$ORIGIN/../../../lib/$(MACH64)' -.KEEP_STATE: +install: $(ROOTONBLDMACHPROG) -all: $(FILES) -install: all $(ROOTREADME) .WAIT pkg +.KEEP_STATE: -include ../Makefile.targ +include $(SGSHOME)/ld/Makefile.targ diff --git a/usr/src/cmd/sgs/packages/Makefile.com b/usr/src/tools/sgs/libconv/Makefile index 376264ef1b..a4423c8304 100644 --- a/usr/src/cmd/sgs/packages/Makefile.com +++ b/usr/src/tools/sgs/libconv/Makefile @@ -18,31 +18,26 @@ # # CDDL HEADER END # + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # -# Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. -# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. # -include $(SRC)/Makefile.master +include ../Makefile.com +include $(SGSHOME)/libconv/Makefile.com + +CPPFLAGS = $(NATIVE_CPPFLAGS) -I$(SRC)/lib/libc/inc -I$(ELFCAP) \ + -I$(SRC)/common/sgsrtcid \ + -I$(SRC)/lib/libdemangle/common +CFLAGS = $(NATIVE_CFLAGS) +CW_LINKER = -PKGARCHIVE= . -DATAFILES= copyright prototype_com prototype_$(MACH) postinstall \ - preremove depend checkinstall -README= SUNWonld-README -FILES= $(DATAFILES) pkginfo -PACKAGE= SUNWonld -ROOTONLD= $(ROOT)/opt/SUNWonld -ROOTREADME= $(README:%=$(ROOTONLD)/%) +.PARALLEL: $(PICS) +.KEEP_STATE: -CLEANFILES= $(FILES) awk_pkginfo ../bld_awk_pkginfo -CLOBBERFILES= $(PACKAGE) +install all: $(LIBRARY) -../%: ../common/%.ksh - $(RM) $@ - cp $< $@ - chmod +x $@ +include $(SGSHOME)/libconv/Makefile.targ -$(ROOTONLD)/%: ../common/% - $(RM) $@ - cp $< $@ - chmod +x $@ diff --git a/usr/src/cmd/sgs/packages/common/pkginfo.tmpl b/usr/src/tools/sgs/libelf/Makefile index e253c2066b..2ee8dfeb48 100644 --- a/usr/src/cmd/sgs/packages/common/pkginfo.tmpl +++ b/usr/src/tools/sgs/libelf/Makefile @@ -1,4 +1,3 @@ -# Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. # # CDDL HEADER START # @@ -19,26 +18,31 @@ # # CDDL HEADER END # -# -# This required package information file describes characteristics of the -# package, such as package abbreviation, full package name, package version, -# and package architecture. -# -PKG="SUNWonld" -SGSDIR=/opt/SUNWonld/base/ -SGSBACKUPDIR=/var/ld/SUNWonld_backup -LIBDIR=lib -NAME="Solaris Link-Editors" -ARCH="ISA" -VERSION="2.4.2,REV=0.0.0" -PRODNAME="SunOS" -PRODVERS="RELEASE/VERSION" -SUNW_PKGTYPE="usr" -MAXINST="1000" -CATEGORY="internal" -DESC="OS-Net Static/Dynamic linker package" -VENDOR="Oracle Corporation" -HOTLINE="see email" -EMAIL="Rod.Evans@Oracle.COM Ali.Bahrami@Oracle.COM" -CLASSES="none" -BASEDIR=/ + +# +# Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. +# + +include ../Makefile.com +include ../../Makefile.tools +include $(SGSHOME)/libelf/Makefile.com + +CONVLIBDIR = -L../libconv +CPPFLAGS = $(NATIVE_CPPFLAGS) +CFLAGS = $(NATIVE_CFLAGS) +SGSMSGTARG += $(SGSMSG32) +CW_LINKER = + +.KEEP_STATE: + +install: all $(ROOTONBLDLIBMACH)/$(DYNLIB) $(ROOTONBLDLIBMACH)/$(LIBLINKS) + +$(ROOTONBLDLIBMACH)/$(DYNLIB): $(PICS) $(ROOTONBLDLIBMACH) + $(BUILD.SO) + $(POST_PROCESS_SO) + +$(ROOTONBLDLIBMACH)/$(LIBLINKS): $(ROOTONBLDLIBMACH)/$(DYNLIB) + @$(RM) $(ROOTONBLDLIBMACH)/$(LIBLINKS) + $(SYMLINK) $(DYNLIB) $(ROOTONBLDLIBMACH)/$(LIBLINKS) + +include $(SGSHOME)/libelf/Makefile.targ diff --git a/usr/src/tools/sgs/libld/Makefile b/usr/src/tools/sgs/libld/Makefile new file mode 100644 index 0000000000..bc5ebb73e8 --- /dev/null +++ b/usr/src/tools/sgs/libld/Makefile @@ -0,0 +1,56 @@ +# +# 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. +# +# + +include ../Makefile.com +include ../../Makefile.tools +include $(SGSHOME)/libld/Makefile.com + +.KEEP_STATE: + +CW_LINKER = + +CPPFLAGS = $(NATIVE_CPPFLAGS) -DUSE_LIBLD_MALLOC -I$(SRC)/lib/libc/inc \ + -I$(SRC)/uts/common/krtld -I$(SRC)/uts/sparc \ + $(VAR_LIBLD_CPPFLAGS) +LDLIBS += -L$(ROOTONBLDLIBMACH) -L../libconv -lconv -llddbg -lelf -lc + +DYNFLAGS += $(VERSREF) '-R$$ORIGIN' +CFLAGS = $(NATIVE_CFLAGS) + +all: $(DYNLIB) $(LIBLINKS) + +install: all $(ROOTONBLDLIBMACH)/$(DYNLIB) $(ROOTONBLDLIBMACH)/$(LIBLINKS) + +$(ROOTONBLDLIBMACH)/$(DYNLIB): $(PICS) $(ROOTONBLDLIBMACH) + $(BUILD.SO) + $(POST_PROCESS_SO) + +$(ROOTONBLDLIBMACH)/$(LIBLINKS): $(ROOTONBLDLIBMACH)/$(DYNLIB) + @$(RM) $(ROOTONBLDLIBMACH)/$(LIBLINKS) + $(SYMLINK) $(DYNLIB) $(ROOTONBLDLIBMACH)/$(LIBLINKS) + +include $(SGSHOME)/libld/Makefile.targ diff --git a/usr/src/cmd/sgs/packages/common/preremove b/usr/src/tools/sgs/liblddbg/Makefile index ec1348051a..f2bdd55c81 100644 --- a/usr/src/cmd/sgs/packages/common/preremove +++ b/usr/src/tools/sgs/liblddbg/Makefile @@ -18,43 +18,34 @@ # # CDDL HEADER END # + # -# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +include ../Makefile.com +include ../../Makefile.tools +include $(SGSHOME)/liblddbg/Makefile.com -# -# Remove any new files that SUNWonld added to the system -# -if [ -f $BASEDIR/${SGSBACKUPDIR}.newfiles ]; then - echo "Removing new files added by SUNWonld" - cat $BASEDIR/${SGSBACKUPDIR}.newfiles | while read file - do - if [ -d $BASEDIR/$file ]; then - rmdir $BASEDIR/$file - else - rm $BASEDIR/$file - fi - done - rm $BASEDIR/${SGSBACKUPDIR}.newfiles -fi +.KEEP_STATE: +CPPFLAGS = $(NATIVE_CPPFLAGS) -I$(SRC)/lib/libc/inc +CFLAGS = $(NATIVE_CFLAGS) +DYNFLAGS += -L../libconv +SGSMSGTARG += $(SGSMSG32) +CW_LINKER= -# -# Restore previous SGSTOOLS -# -if [ \( -d $BASEDIR/$SGSBACKUPDIR \) -a \ - \( -f $BASEDIR/${SGSBACKUPDIR}.origfiles \) ]; then - prev_bindnow=$LD_BIND_NOW - LD_BIND_NOW=1 - export LD_BIND_NOW - echo "Restoring SGSTOOLS from $BASEDIR$SGSBACKUPDIR" - cd $BASEDIR/$SGSBACKUPDIR - cpio -pdmu $BASEDIR < $BASEDIR/${SGSBACKUPDIR}.origfiles - rm -rf * - rm $BASEDIR/${SGSBACKUPDIR}.origfiles - LD_BIND_NOW=$prev_bindnow -fi +all: $(DYNLIB) $(LIBLINKS) + +install: all $(ROOTONBLDLIBMACH)/$(DYNLIB) $(ROOTONBLDLIBMACH)/$(LIBLINKS) + +$(ROOTONBLDLIBMACH)/$(DYNLIB): $(PICS) $(ROOTONBLDLIBMACH) + $(BUILD.SO) + $(POST_PROCESS_SO) + +$(ROOTONBLDLIBMACH)/$(LIBLINKS): $(ROOTONBLDLIBMACH)/$(DYNLIB) + @$(RM) $(ROOTONBLDLIBMACH)/$(LIBLINKS) + $(SYMLINK) $(DYNLIB) $(ROOTONBLDLIBMACH)/$(LIBLINKS) -cd $BASEDIR +include $(SGSHOME)/liblddbg/Makefile.targ diff --git a/usr/src/tools/sgs/sgsmsg/Makefile b/usr/src/tools/sgs/sgsmsg/Makefile new file mode 100644 index 0000000000..e808245030 --- /dev/null +++ b/usr/src/tools/sgs/sgsmsg/Makefile @@ -0,0 +1,79 @@ +# +# 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) 2018, Joyent, Inc. +# Copyright 2019 OmniOS Community Edition (OmniOSce) Association. + +# +# Copyright 2010 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# Makefile to support tools used for linker development: +# +# o sgsmsg creates message headers/arrays/catalogs (a native tool). +# +# Note, these tools are not part of the product. +# + +include ../Makefile.com +include ../../Makefile.tools +include $(SRC)/cmd/Makefile.cmd + + +PROG= sgsmsg + +MAN1ONBLDFILES = sgsmsg.1onbld +$(ROOTONBLDMAN1ONBLDFILES) := FILEMODE= 644 + +OBJS= assfail.o \ + avl.o \ + findprime.o \ + sgsmsg.o \ + string_table.o + +FILEMODE= 0755 + +CPPFLAGS = $(NATIVE_CPPFLAGS) +CFLAGS = $(NATIVE_CFLAGS) +CW_LINKER = + +# not linted +SMATCH= off + +all: $(PROG) + +install: $(ROOTONBLDMACHPROG) $(ROOTONBLDMAN1ONBLDFILES) + +$(PROG): $(OBJS) + $(LINK.c) $(OBJS) -o $@ $(LDLIBS) + +%.o: $(SGSCOMMON)/%.c + $(NATIVECC) $(DEBUG) $(NATIVE_CFLAGS) $(CPPFLAGS) -c $< + +avl.o: $(SRC)/common/avl/avl.c + $(NATIVECC) $(DEBUG) $(NATIVE_CFLAGS) $(CPPFLAGS) -c \ + $(SRC)/common/avl/avl.c + +clean: + $(RM) $(OBJS) + +include $(SRC)/cmd/Makefile.targ diff --git a/usr/src/cmd/sgs/tools/man/sgsmsg.1l b/usr/src/tools/sgs/sgsmsg/sgsmsg.1onbld index 88937580a7..abd8d3b318 100644 --- a/usr/src/cmd/sgs/tools/man/sgsmsg.1l +++ b/usr/src/tools/sgs/sgsmsg/sgsmsg.1onbld @@ -1,4 +1,3 @@ -.\" ident "%Z%%M% %I% %E% SMI" .\" Copyright 2005 Sun Microsystems, Inc. All rights reserved. .\" Use is subject to license terms. .\" @@ -23,7 +22,7 @@ .\" CDDL HEADER END .\" .if n .tr \-- -.TH sgsmsg 1l "2 Jun 1999" +.TH sgsmsg 1ONBLD "Jun 2, 1999" .SH NAME sgsmsg \- generate message strings for SGS subsystem. .SH SYNOPSIS @@ -69,7 +68,6 @@ translated into a form suitable for .BR catgets (3C) manipulation. .SH OPERANDS -.LP One of more input \f2file\f1s contains a definition for each character string used by a particular code group. The interpretation of a definition is determined by the first character of each line within @@ -229,9 +227,6 @@ strings used by .ft 1 .if t .sp 0.35 .if n .sp -# ident "%Z%%M% %I% %E% SMI" -.if t .sp 0.35 -.if n .sp @ _START_ .if t .sp 0.35 .if n .sp @@ -417,17 +412,15 @@ _ld_msg(int mid) { return (gettext(MSG_ORIG(mid))); } +.RE .sp .SH "EXIT STATUS" A non-zero error return indicates a processing error. -.RE .PD .SH "SEE ALSO" .BR gencat (1), .BR ld (1), .BR msgfmt (1), .BR catgets (3C), -.BR gettext (3I). -.br -.TZ LLM +.BR gettext (3C). .if n .tr \-\- diff --git a/usr/src/cmd/sgs/tools/common/sgsmsg.c b/usr/src/tools/sgs/sgsmsg/sgsmsg.c index 203a7569a5..203a7569a5 100644 --- a/usr/src/cmd/sgs/tools/common/sgsmsg.c +++ b/usr/src/tools/sgs/sgsmsg/sgsmsg.c |