summaryrefslogtreecommitdiff
path: root/usr/src/cmd/sgs
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2019-09-09 11:26:45 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2019-09-09 11:26:45 +0000
commitb36aca9fee0db2b4336b9f6ee7835a8f3fbfe9c9 (patch)
tree029c95d18101ff3839ddd942d4ed90ff16fd8fe7 /usr/src/cmd/sgs
parent1cc204b97b9317e681958da0e91abeb27bcc6f82 (diff)
parent793ac993be490bb7c16673e5f2588c6d18672894 (diff)
downloadillumos-joyent-b36aca9fee0db2b4336b9f6ee7835a8f3fbfe9c9.tar.gz
[illumos-gate merge]
commit 793ac993be490bb7c16673e5f2588c6d18672894 11654 libipmi/Makefile.com has an invalid and unused variable substitution commit d8109ce4330e1b8ad6c29f9fccacec969066bb9d 11653 tools/make/bin/Makefile has an invalid and unused variable substitution commit bdf3516c67ac96d42da6a8adc5bf9a0a5b72b060 11652 Remove unused archive library rules from cmd/sgs commit 2b1ff28bbd88f04a83e6ca2d284eb7be0959c43c 11647 6026 regressed after 5980 commit 21ec5af72097881ccdcd81ebfd26e1c85b609ad6 11662 nss_ldap: group members are not comma separated commit aa5636e518a7c706134caf5072a16f9f85f7497a 11633 SPARC NULL pointer errors in libprtdiag_psr commit 3f8c0768c028803de6022c542bbd9e9e6f08289f 11632 SPARC NULL pointer error in libtsalarm commit 53bfe442a2e3c2938be0ac7b2b05d096689c2ea6 11631 SPARC NULL pointer error in libds commit 9cb0a1d4446fe891a01d01e07b2e27f0177c84cd 11630 remove checks for 64-bit capable hardware commit 95bfa623bf6336d9476ba272ebda6e2c2a305e6f 10852 libficl-sys: implement loader emulator commands with linker set commit 90ce8b937724b0472efa92ca9911002383cf25a2 10851 want sys/linker_set.h commit bfa93d3911fd4856c353c9b190c18cdb98fc36b4 11610 PCI ID ambiguity leads to driver induced mayhem 11611 pchtemp driver should use new IPD 9 aliases commit 96fc3fdf646c403f7896ecd3e9657d0474025bba 11617 esc fails with /usr/bin/cpp present commit 5711d3938643272e5ca2aaf5d868e612e7bc97b6 11640 add zpool ashift property tunable commit 2c54ade085d70dd5a2914f0fa5cf7fe208cd36a6 11603 smbadm has wrong exit code while listing SMB group properties commit 69b1fd3f24d0ee2e682883606201c61f52085805 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 commit d58ceae2ed78dc65ab682a0281ce523d6c4116fe 11646 fbt entry probes incorrectly placed due to -fshrink-wrap Conflicts: usr/src/uts/Makefile.uts
Diffstat (limited to 'usr/src/cmd/sgs')
-rw-r--r--usr/src/cmd/sgs/Makefile30
-rw-r--r--usr/src/cmd/sgs/Makefile.com41
-rw-r--r--usr/src/cmd/sgs/Makefile.targ15
-rw-r--r--usr/src/cmd/sgs/Makefile.var6
-rw-r--r--usr/src/cmd/sgs/ar/Makefile.com4
-rw-r--r--usr/src/cmd/sgs/common/alist.c (renamed from usr/src/cmd/sgs/tools/common/alist.c)0
-rw-r--r--usr/src/cmd/sgs/common/assfail.c (renamed from usr/src/cmd/sgs/tools/common/assfail.c)4
-rw-r--r--usr/src/cmd/sgs/common/findprime.c (renamed from usr/src/cmd/sgs/tools/common/findprime.c)2
-rw-r--r--usr/src/cmd/sgs/common/leb128.c (renamed from usr/src/cmd/sgs/tools/common/leb128.c)0
-rw-r--r--usr/src/cmd/sgs/common/strhash.c (renamed from usr/src/cmd/sgs/tools/common/strhash.c)2
-rw-r--r--usr/src/cmd/sgs/common/string_table.c (renamed from usr/src/cmd/sgs/tools/common/string_table.c)0
-rw-r--r--usr/src/cmd/sgs/crle/Makefile.com13
-rw-r--r--usr/src/cmd/sgs/crle/Makefile.targ2
-rw-r--r--usr/src/cmd/sgs/dump/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/elfdump/Makefile.com14
-rw-r--r--usr/src/cmd/sgs/elfdump/Makefile.targ2
-rw-r--r--usr/src/cmd/sgs/elfedit/Makefile.com8
-rw-r--r--usr/src/cmd/sgs/elfedit/Makefile.targ2
-rw-r--r--usr/src/cmd/sgs/elfedit/modules/Makefile.com8
-rw-r--r--usr/src/cmd/sgs/elfedit/modules/Makefile.targ4
-rw-r--r--usr/src/cmd/sgs/elfwrap/Makefile.com10
-rw-r--r--usr/src/cmd/sgs/elfwrap/Makefile.targ2
-rw-r--r--usr/src/cmd/sgs/gprof/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/include/conv.h9
-rw-r--r--usr/src/cmd/sgs/ld/Makefile.com19
-rw-r--r--usr/src/cmd/sgs/ld/Makefile.targ14
-rw-r--r--usr/src/cmd/sgs/ld/amd64/Makefile6
-rw-r--r--usr/src/cmd/sgs/ld/i386/Makefile5
-rw-r--r--usr/src/cmd/sgs/ld/sparc/Makefile5
-rw-r--r--usr/src/cmd/sgs/ld/sparcv9/Makefile7
-rw-r--r--usr/src/cmd/sgs/ldd/Makefile.com12
-rw-r--r--usr/src/cmd/sgs/ldd/Makefile.targ3
-rw-r--r--usr/src/cmd/sgs/ldprof/Makefile.com7
-rw-r--r--usr/src/cmd/sgs/lex/Makefile.com1
-rw-r--r--usr/src/cmd/sgs/lex/Makefile.targ4
-rw-r--r--usr/src/cmd/sgs/libconv/Makefile.com8
-rw-r--r--usr/src/cmd/sgs/libconv/Makefile.targ24
-rw-r--r--usr/src/cmd/sgs/libcrle/Makefile.com4
-rw-r--r--usr/src/cmd/sgs/libelf/Makefile.com19
-rw-r--r--usr/src/cmd/sgs/libelf/Makefile.targ39
-rw-r--r--usr/src/cmd/sgs/libelf/Makefile.targ.6410
-rw-r--r--usr/src/cmd/sgs/libelf/amd64/Makefile2
-rw-r--r--usr/src/cmd/sgs/libelf/i386/Makefile3
-rw-r--r--usr/src/cmd/sgs/libelf/sparc/Makefile3
-rw-r--r--usr/src/cmd/sgs/libelf/sparcv9/Makefile2
-rw-r--r--usr/src/cmd/sgs/libld/Makefile.com49
-rw-r--r--usr/src/cmd/sgs/libld/Makefile.targ21
-rw-r--r--usr/src/cmd/sgs/liblddbg/Makefile.com24
-rw-r--r--usr/src/cmd/sgs/liblddbg/Makefile.targ21
-rw-r--r--usr/src/cmd/sgs/libldmake/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/libldstab/Makefile.com5
-rw-r--r--usr/src/cmd/sgs/libldstab/Makefile.targ9
-rw-r--r--usr/src/cmd/sgs/librtld/Makefile.com10
-rw-r--r--usr/src/cmd/sgs/librtld/Makefile.targ12
-rw-r--r--usr/src/cmd/sgs/librtld_db/Makefile.com4
-rw-r--r--usr/src/cmd/sgs/librtld_db/demo/Makefile1
-rw-r--r--usr/src/cmd/sgs/librtld_db/demo/Makefile.com1
-rw-r--r--usr/src/cmd/sgs/librtld_db/demo/Makefile.targ15
-rw-r--r--usr/src/cmd/sgs/librtld_db/demo/amd64/Makefile2
-rw-r--r--usr/src/cmd/sgs/librtld_db/demo/i386/Makefile2
-rw-r--r--usr/src/cmd/sgs/librtld_db/demo/sparc/Makefile2
-rw-r--r--usr/src/cmd/sgs/librtld_db/demo/sparcv9/Makefile2
-rw-r--r--usr/src/cmd/sgs/link_audit/Makefile.com3
-rw-r--r--usr/src/cmd/sgs/link_audit/Makefile.targ15
-rw-r--r--usr/src/cmd/sgs/link_audit/amd64/Makefile4
-rw-r--r--usr/src/cmd/sgs/link_audit/i386/Makefile5
-rw-r--r--usr/src/cmd/sgs/link_audit/sparc/Makefile5
-rw-r--r--usr/src/cmd/sgs/link_audit/sparcv9/Makefile5
-rw-r--r--usr/src/cmd/sgs/mcs/Makefile.com8
-rw-r--r--usr/src/cmd/sgs/mcs/Makefile.targ2
-rw-r--r--usr/src/cmd/sgs/moe/Makefile.com4
-rw-r--r--usr/src/cmd/sgs/nm/amd64/Makefile4
-rw-r--r--usr/src/cmd/sgs/nm/i386/Makefile4
-rw-r--r--usr/src/cmd/sgs/nm/sparc/Makefile4
-rw-r--r--usr/src/cmd/sgs/nm/sparcv9/Makefile4
-rw-r--r--usr/src/cmd/sgs/packages/Makefile154
-rw-r--r--usr/src/cmd/sgs/packages/Makefile.com48
-rw-r--r--usr/src/cmd/sgs/packages/Makefile.targ51
-rw-r--r--usr/src/cmd/sgs/packages/common/bld_awk_pkginfo.ksh119
-rw-r--r--usr/src/cmd/sgs/packages/common/checkinstall60
-rw-r--r--usr/src/cmd/sgs/packages/common/copyright2
-rw-r--r--usr/src/cmd/sgs/packages/common/depend46
-rw-r--r--usr/src/cmd/sgs/packages/common/pkginfo.tmpl44
-rw-r--r--usr/src/cmd/sgs/packages/common/postinstall173
-rw-r--r--usr/src/cmd/sgs/packages/common/preremove60
-rw-r--r--usr/src/cmd/sgs/packages/common/prototype_com300
-rw-r--r--usr/src/cmd/sgs/packages/common/prototype_i386119
-rw-r--r--usr/src/cmd/sgs/packages/common/prototype_sparc120
-rw-r--r--usr/src/cmd/sgs/packages/i386/Makefile36
-rw-r--r--usr/src/cmd/sgs/packages/sparc/Makefile36
-rw-r--r--usr/src/cmd/sgs/prof/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/pvs/Makefile.com14
-rw-r--r--usr/src/cmd/sgs/pvs/Makefile.targ2
-rw-r--r--usr/src/cmd/sgs/rtld/Makefile.com22
-rw-r--r--usr/src/cmd/sgs/rtld/Makefile.targ6
-rw-r--r--usr/src/cmd/sgs/rtld/mdbmod/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/rtld/sparc/Makefile2
-rw-r--r--usr/src/cmd/sgs/rtld/sparcv9/Makefile2
-rw-r--r--usr/src/cmd/sgs/size/Makefile.com2
-rw-r--r--usr/src/cmd/sgs/tools/Makefile35
-rw-r--r--usr/src/cmd/sgs/tools/Makefile.com26
-rw-r--r--usr/src/cmd/sgs/tools/Makefile.targ17
-rw-r--r--usr/src/cmd/sgs/tools/SUNWonld-README (renamed from usr/src/cmd/sgs/packages/common/SUNWonld-README)0
-rw-r--r--usr/src/cmd/sgs/tools/bld_lint.sh94
-rw-r--r--usr/src/cmd/sgs/tools/chkmsg.1l (renamed from usr/src/cmd/sgs/tools/man/chkmsg.1l)17
-rw-r--r--usr/src/cmd/sgs/tools/chkmsg.sh1
-rw-r--r--usr/src/cmd/sgs/tools/common/sgsmsg.c1237
-rw-r--r--usr/src/cmd/sgs/tools/i386/Makefile7
-rw-r--r--usr/src/cmd/sgs/tools/man/Makefile50
-rw-r--r--usr/src/cmd/sgs/tools/man/sgsmsg.1l433
-rw-r--r--usr/src/cmd/sgs/tools/proto.sh197
-rwxr-xr-xusr/src/cmd/sgs/tools/readme_revision (renamed from usr/src/cmd/sgs/packages/common/readme_revision)6
-rw-r--r--usr/src/cmd/sgs/tools/sparc/Makefile7
-rw-r--r--usr/src/cmd/sgs/yacc/Makefile.com1
-rw-r--r--usr/src/cmd/sgs/yacc/Makefile.targ4
115 files changed, 276 insertions, 3906 deletions
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 bef356bb28..48bbbbbb87 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 7fc4c026d5..2c78d95b04 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/lex/Makefile.com b/usr/src/cmd/sgs/lex/Makefile.com
index ea2224b2d0..9a24765ceb 100644
--- a/usr/src/cmd/sgs/lex/Makefile.com
+++ b/usr/src/cmd/sgs/lex/Makefile.com
@@ -76,7 +76,6 @@ objs/%_e.o:= DEFLIST = -DEUC -DJLSLEX -DEOPTION -D$*=$*_e
pics/%_e.o:= DEFLIST = -DEUC -DJLSLEX -DEOPTION -D$*=$*_e
CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master)
-BUILD.AR= $(AR) $(ARFLAGS) $@ `$(LORDER) $(OBJS) | $(TSORT)`
$(ROOTPROG):= FILEMODE = 0555
diff --git a/usr/src/cmd/sgs/lex/Makefile.targ b/usr/src/cmd/sgs/lex/Makefile.targ
index c4653c5d75..7755dd804b 100644
--- a/usr/src/cmd/sgs/lex/Makefile.targ
+++ b/usr/src/cmd/sgs/lex/Makefile.targ
@@ -60,10 +60,6 @@ $(ROOTLIBDIR64)/$(LIBLINKSCCC): $(ROOTLIBDIR64)/$(LIBLINKSCCC)$(VERS)
objs pics:
-@mkdir -p $@
-$(LIBRARY): objs .WAIT $$(OBJS)
- $(BUILD.AR)
- $(POST_PROCESS_A)
-
$(DYNLIB): pics .WAIT $$(PICS)
$(BUILD.SO)
$(POST_PROCESS_SO)
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..7791333dc6 100644
--- a/usr/src/cmd/sgs/libelf/Makefile.com
+++ b/usr/src/cmd/sgs/libelf/Makefile.com
@@ -52,39 +52,36 @@ 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)
SMOFF += indenting
-BUILD.AR= $(RM) $@ ; \
- $(AR) q $@ `$(LORDER) $(OBJECTS:%=$(DIR)/%)| $(TSORT)`
- $(POST_PROCESS_A)
-
-
BLTDEFS= msg.h
BLTDATA= msg.c
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 +89,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.com b/usr/src/cmd/sgs/packages/Makefile.com
deleted file mode 100644
index 376264ef1b..0000000000
--- a/usr/src/cmd/sgs/packages/Makefile.com
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
-#
-
-include $(SRC)/Makefile.master
-
-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)/%)
-
-CLEANFILES= $(FILES) awk_pkginfo ../bld_awk_pkginfo
-CLOBBERFILES= $(PACKAGE)
-
-../%: ../common/%.ksh
- $(RM) $@
- cp $< $@
- chmod +x $@
-
-$(ROOTONLD)/%: ../common/%
- $(RM) $@
- cp $< $@
- chmod +x $@
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/pkginfo.tmpl b/usr/src/cmd/sgs/packages/common/pkginfo.tmpl
deleted file mode 100644
index e253c2066b..0000000000
--- a/usr/src/cmd/sgs/packages/common/pkginfo.tmpl
+++ /dev/null
@@ -1,44 +0,0 @@
-# Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-# 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
-#
-#
-# 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=/
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/preremove b/usr/src/cmd/sgs/packages/common/preremove
deleted file mode 100644
index ec1348051a..0000000000
--- a/usr/src/cmd/sgs/packages/common/preremove
+++ /dev/null
@@ -1,60 +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.
-#
-
-
-#
-# 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
-
-
-#
-# 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
-
-cd $BASEDIR
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/packages/sparc/Makefile b/usr/src/cmd/sgs/packages/sparc/Makefile
deleted file mode 100644
index 6158a1c608..0000000000
--- a/usr/src/cmd/sgs/packages/sparc/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/common/sgsmsg.c b/usr/src/cmd/sgs/tools/common/sgsmsg.c
deleted file mode 100644
index 203a7569a5..0000000000
--- a/usr/src/cmd/sgs/tools/common/sgsmsg.c
+++ /dev/null
@@ -1,1237 +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) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
- *
- * sgsmsg generates several message files from an input template file. Messages
- * are constructed for use with gettext(3i) - the default - or catgets(3c). The
- * files generate are:
- *
- * msg.h a header file containing definitions for each message. The -h
- * option triggers the creation of these definitions and specifies
- * the name to use.
- *
- * msg.c a data array of message strings. The msg.h definitions are
- * offsets into this array. The -d option triggers the creation of
- * these definitions and specifies the name to use.
- *
- * messages a message file suitable for catgets(3c) or gettext(3i) use. The
- * -m option triggers this output and specifies the filename to be
- * used.
- *
- * The template file is processed based on the first character of each line:
- *
- * # or $ entries are copied (as is) to the message file (messages).
- *
- * @ token(s) entries are translated. Two translations are possible dependent
- * on whether one or more tokens are supplied:
- *
- * A single token is interpreted as one of two reserved message
- * output indicators, or a message identifier. The reserved output
- * indicator _START_ enables output to the message file - Note that
- * the occurance of any other @ token will also enable message
- * output. The reserved output indicator _END_ disables output to
- * the message file. The use of these two indicators provides for
- * only those message strings that require translation to be output
- * to the message file.
- *
- * Besides the reserved output indicators, a single token is taken
- * to be a message identifier which will be subsituted for a
- * `setid' for catgets(3c) output, or a `domain' name for
- * gettext(3i) output. This value is determine by substituting the
- * token for the associated definition found in the message
- * identifier file (specified with the -i option).
- *
- * Multiple tokens are taken to be a message definition followed by
- * the associated message string. The message string is copied to
- * the data array being built in msg.c. The index into this array
- * becomes the `message' identifier created in the msg.h file.
- */
-
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <limits.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <sys/param.h>
-
-#include <sgs.h>
-#include <_string_table.h>
-
-/*
- * Define any error message strings.
- */
-static const char
- * Errmsg_malt = "sgsmsg: file %s: line %d: malformed input "
- "at line\n",
- * Errmsg_nmem = "sgsmsg: memory allocation failed: %s\n",
- * Errmsg_opne = "sgsmsg: file %s: open failed: %s\n",
- * Errmsg_wrte = "sgsmsg: file %s: write failed: %s\n",
- * Errmsg_read = "sgsmsg: file %s: read failed %s\n",
- * Errmsg_stnw = "sgsmsg: st_new(): failed: %s\n",
- * Errmsg_stin = "sgsmsg: Str_tbl insert failed: %s\n",
- * Errmsg_mnfn = "sgsmsg: message not found in Str_tbl: %s\n",
- * Errmsg_use = "usage: sgsmsg [-clv] [-d mesgdata] [-h mesgdefs] "
- "[-m messages] [-n name] [-i mesgident] file ...\n";
-
-/*
- * Define all output filenames and associated descriptors.
- */
-static FILE *fddefs, *fddata, *fdmsgs, *fdmids, *fddesc;
-static char *fldefs, *fldata, *flmsgs, *flmids, *fldesc;
-static FILE *fdlint;
-static char fllint[MAXPATHLEN];
-
-static uint_t vflag; /* verbose flag */
-static Str_tbl *stp; /* string table */
-
-/*
- * Define any default strings.
- */
-static const char
- *nmlint = "/tmp/sgsmsg.lint",
- *interface = "sgs_msg",
- *start = "_START_",
- *end = "_END_";
-
-/*
- * Define any default flags and data items.
- */
-static int cflag = 0, lflag = 0, prtmsgs = 0, line, ptr = 1, msgid = 0;
-static char *mesgid = 0, *setid = 0, *domain = 0;
-
-typedef struct msg_string {
- char *ms_defn;
- char *ms_message;
- struct msg_string *ms_next;
-} msg_string;
-
-static msg_string *msg_head;
-static msg_string *msg_tail;
-
-/*
- * message_append() is responsible for both inserting strings into
- * the master Str_tbl as well as maintaining a list of the
- * DEFINITIONS associated with each string.
- *
- * The list of strings is traversed at the end once the full
- * Str_tbl has been constructed - and string offsets can be
- * assigned.
- */
-static void
-message_append(const char *defn, const char *message)
-{
- msg_string *msg;
- if ((msg = calloc(sizeof (msg_string), 1)) == 0) {
- (void) fprintf(stderr, Errmsg_nmem, strerror(errno));
- exit(1);
- }
-
- /*
- * Initialize the string table.
- */
- if ((stp == 0) && ((stp = st_new(FLG_STNEW_COMPRESS)) == NULL)) {
- (void) fprintf(stderr, Errmsg_stnw, strerror(errno));
- exit(1);
- }
-
-
- if ((msg->ms_defn = strdup(defn)) == 0) {
- (void) fprintf(stderr, Errmsg_nmem, strerror(errno));
- exit(1);
- }
- if ((msg->ms_message = strdup(message)) == 0) {
- (void) fprintf(stderr, Errmsg_nmem, strerror(errno));
- exit(1);
- }
-
- if (st_insert(stp, msg->ms_message) == -1) {
- (void) fprintf(stderr, Errmsg_stin,
- message);
- exit(1);
- }
-
- if (msg_head == 0) {
- msg_head = msg_tail = msg;
- return;
- }
- msg_tail->ms_next = msg;
- msg_tail = msg;
-}
-
-/*
- * Initialize a setid value. Given a setid definition determine its numeric
- * value from the specified message identifier file (specified with the -i
- * option). Return a pointer to the numeric string.
- */
-static int
-getmesgid(char *id)
-{
- char *buffer, *token, *_mesgid = 0, *_setid = 0, *_domain = 0;
-
- /*
- * If we're being asked to interpret a message id but the user didn't
- * provide the required message identifier file (-i option) we're in
- * trouble.
- */
- if (flmids == 0) {
- (void) fprintf(stderr, "sgsmsg: file %s: line %d: mesgid %s: "
- "unable to process mesgid\n\t"
- "no message identifier file specified "
- "(see -i option)\n", fldesc, line, id);
- return (1);
- }
-
- if ((buffer = malloc(LINE_MAX)) == 0) {
- (void) fprintf(stderr, Errmsg_nmem, strerror(errno));
- return (1);
- }
-
- /*
- * Read the message identifier file and locate the required mesgid.
- */
- rewind(fdmids);
- while (fgets(buffer, LINE_MAX, fdmids) != NULL) {
- if ((token = strstr(buffer, id)) == NULL)
- continue;
-
- /*
- * Establish individual strings for the mesgid, setid and domain
- * values.
- */
- _mesgid = token;
- while (!(isspace(*token)))
- token++;
- *token++ = 0;
-
- while (isspace(*token))
- token++;
- _setid = token;
- while (!(isspace(*token)))
- token++;
- *token++ = 0;
-
- while (isspace(*token))
- token++;
- _domain = token;
- while (!(isspace(*token)))
- token++;
- *token = 0;
- break;
- }
-
- /*
- * Did we find a match?
- */
- if ((_mesgid == 0) || (_setid == 0) || (_domain == 0)) {
- (void) fprintf(stderr, "sgsmsg: file %s: line %d: mesgid %s: "
- "unable to process mesgid\n\t"
- "identifier does not exist in file %s\n",
- fldesc, line, id, flmids);
- return (1);
- }
-
- /*
- * Have we been here before?
- */
- if (mesgid) {
- if (cflag == 1) {
- /*
- * If we're being asked to process more than one mesgid
- * warn the user that only one mesgid can be used for
- * the catgets(3c) call.
- */
- (void) fprintf(stderr, "sgsmsg: file %s: line %d: "
- "setid %s: warning: multiple mesgids "
- "encountered\n\t"
- "last setting used in messaging code\n",
- fldesc, line, id);
- }
- }
-
- mesgid = _mesgid;
- setid = _setid;
- domain = _domain;
-
- /*
- * Generate the message file output (insure output flag is enabled).
- */
- if (prtmsgs != -1)
- prtmsgs = 1;
- if (fdmsgs && (prtmsgs == 1)) {
- if (cflag == 1) {
- if (fprintf(fdmsgs, "$quote \"\n$set %s\n",
- setid) < 0) {
- (void) fprintf(stderr, Errmsg_wrte, flmsgs,
- strerror(errno));
- return (1);
- }
- } else {
- if (fprintf(fdmsgs, "domain\t\"%s\"\n", domain) < 0) {
- (void) fprintf(stderr, Errmsg_wrte, flmsgs,
- strerror(errno));
- return (1);
- }
- }
- }
-
- /*
- * For catgets(3c) output generate a setid definition in the message
- * definition file.
- */
- if (fddefs && (cflag == 1) &&
- (fprintf(fddefs, "#define\t%s\t%s\n\n", mesgid, setid) < 0)) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- return (0);
-}
-
-/*
- * Dump contents of String Table to standard out
- */
-static void
-dump_stringtab(Str_tbl *stp)
-{
- uint_t cnt;
-
- if ((stp->st_flags & FLG_STTAB_COMPRESS) == 0) {
- (void) printf("string table full size: %ld: uncompressed\n",
- stp->st_fullstrsize);
- return;
- }
-
- (void) printf("string table full size: %ld compressed down to: %ld\n\n",
- stp->st_fullstrsize, stp->st_strsize);
- (void) printf("string table compression information [%d buckets]:\n",
- stp->st_hbckcnt);
-
- for (cnt = 0; cnt < stp->st_hbckcnt; cnt++) {
- Str_hash *sthash = stp->st_hashbcks[cnt];
-
- if (sthash == 0)
- continue;
-
- (void) printf(" bucket: [%d]\n", cnt);
-
- while (sthash) {
- size_t stroff = sthash->hi_mstr->sm_strlen -
- sthash->hi_strlen;
-
- if (stroff == 0) {
- (void) printf(" [%ld]: '%s' <master>\n",
- sthash->hi_refcnt, sthash->hi_mstr->sm_str);
- } else {
- (void) printf(" [%ld]: '%s' <suffix of: "
- "'%s'>\n", sthash->hi_refcnt,
- &sthash->hi_mstr->sm_str[stroff],
- sthash->hi_mstr->sm_str);
- }
- sthash = sthash->hi_next;
- }
- }
-}
-
-/*
- * Initialize the message definition header file stream.
- */
-static int
-init_defs(void)
-{
- static char guard[FILENAME_MAX + 6];
- char *optr;
- const char *iptr, *_ptr;
-
- /*
- * Establish a header guard name using the files basename.
- */
- for (iptr = 0, _ptr = fldefs; _ptr && (*_ptr != '\0'); _ptr++) {
- if (*_ptr == '/')
- iptr = _ptr + 1;
- }
- if (iptr == 0)
- iptr = fldefs;
-
- optr = guard;
- for (*optr++ = '_'; iptr && (*iptr != '\0'); iptr++, optr++) {
- if (*iptr == '.') {
- *optr++ = '_';
- *optr++ = 'D';
- *optr++ = 'O';
- *optr++ = 'T';
- *optr = '_';
- } else
- *optr = toupper(*iptr);
- }
-
- if (fprintf(fddefs, "#ifndef\t%s\n#define\t%s\n\n", guard, guard) < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- if (fprintf(fddefs, "#include <sgsmsg.h>\t/* Msg typedef */\n\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- if (fprintf(fddefs, "#ifndef\t__lint\n\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- /*
- * The MSG_SGS_ARRAY_NAME macro supplies a generic way to
- * reference the string table regardless of its name.
- */
- if (fprintf(fddefs, "#define\tMSG_SGS_LOCAL_ARRAY\t__%s\n\n",
- interface) < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- /*
- * If the associated data array is global define a prototype.
- * Define a macro to access the array elements.
- */
- if (lflag == 0) {
- if (fprintf(fddefs, "extern\tconst char\t__%s[];\n\n",
- interface) < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs,
- strerror(errno));
- return (1);
- }
- }
- if (fprintf(fddefs,
- "#define\tMSG_ORIG_STRTAB(_x, _s)\t&_s[_x]\n\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
- if (fprintf(fddefs,
- "#define\tMSG_ORIG(x)\tMSG_ORIG_STRTAB(x, __%s)\n\n",
- interface) < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- /*
- * Generate a prototype to access the associated data array.
- */
- if (fprintf(fddefs, "extern\tconst char *\t_%s(Msg);\n\n",
- interface) < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
- if (fprintf(fddefs, "#define\tMSG_INTL(x)\t_%s(x)\n\n",
- interface) < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- return (0);
-}
-
-
-/*
- * Finish the message definition header file.
- */
-static int
-fini_defs(void)
-{
- if (fprintf(fddefs, "\n#else\t/* __lint */\n\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- if (fprintf(fddefs, "extern\tconst char *\t_%s(Msg);\n\n",
- interface) < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- if (fprintf(fddefs, "#ifndef MSG_SGS_LOCAL_ARRAY\n"
- "#define\tMSG_SGS_LOCAL_ARRAY\t\"\"\n#endif\n\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- if (lflag == 0) {
- if (fprintf(fddefs, "extern\tconst char\t__%s[];\n\n",
- interface) < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs,
- strerror(errno));
- return (1);
- }
- }
-
- if (fprintf(fddefs,
- "#define MSG_ORIG_STRTAB(_x, _s)\t_x\n"
- "#define MSG_ORIG(x)\tx\n#define MSG_INTL(x)\tx\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- /*
- * Provide a way to get the array and function declarations above
- * without also getting the actual messages. This is useful in
- * our lintsup.c files that include more than one message header.
- * lintsup doesn't need the actual messages, and this prevents
- * macro name collisions.
- */
- if (fprintf(fddefs, "\n#ifndef LINTSUP_SUPPRESS_STRINGS\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- /*
- * Copy the temporary lint defs file into the new header.
- */
- if (fdlint) {
- long size;
- char *buf;
-
- size = ftell(fdlint);
- (void) rewind(fdlint);
-
- if ((buf = malloc(size)) == 0) {
- (void) fprintf(stderr, Errmsg_nmem, strerror(errno));
- return (1);
- }
- if (fread(buf, size, 1, fdlint) == 0) {
- (void) fprintf(stderr, Errmsg_read, fllint,
- strerror(errno));
- return (1);
- }
- if (fwrite(buf, size, 1, fddefs) == 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs,
- strerror(errno));
- return (1);
- }
- (void) free(buf);
- }
-
- if (fprintf(fddefs, "\n#endif\t/* LINTSUP_SUPPRESS_STRINGS */\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- if (fprintf(fddefs, "\n#endif\t/* __lint */\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- if (fprintf(fddefs, "\n#endif\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldefs, strerror(errno));
- return (1);
- }
-
- return (0);
-}
-
-/*
- * The entire messaging file has been scanned - and all strings have been
- * inserted into the string_table. We can now walk the message queue
- * and create the '#define <DEFN>' for each string - with the strings
- * assigned offset into the string_table.
- */
-static int
-output_defs(void)
-{
- msg_string *msg;
- size_t stbufsize;
- char *stbuf;
-
- stbufsize = st_getstrtab_sz(stp);
- if ((stbuf = malloc(stbufsize)) == 0) {
- (void) fprintf(stderr, Errmsg_nmem, strerror(errno));
- exit(1);
- }
- (void) st_setstrbuf(stp, stbuf, stbufsize);
- for (msg = msg_head; msg; msg = msg->ms_next) {
- size_t stoff;
- if ((st_setstring(stp, msg->ms_message, &stoff)) == -1) {
- (void) fprintf(stderr, Errmsg_mnfn, msg->ms_message);
- return (1);
- }
- if (fprintf(fddefs, "\n#define\t%s\t%ld\n",
- msg->ms_defn, stoff) < 0) {
- (void) fprintf(stderr, Errmsg_wrte,
- fldefs, strerror(errno));
- return (1);
- }
- if (fddefs && fprintf(fddefs, "#define\t%s_SIZE\t%d\n",
- msg->ms_defn, strlen(msg->ms_message)) < 0) {
- (void) fprintf(stderr, Errmsg_wrte,
- fldefs, strerror(errno));
- return (1);
- }
- }
- return (0);
-}
-
-
-/*
- * Finish off the data structure definition.
- */
-static int
-output_data(void)
-{
- size_t stbufsize;
- size_t ndx;
- size_t column = 1;
- const char *stbuf;
- const char *fmtstr;
-
- stbufsize = st_getstrtab_sz(stp);
- stbuf = st_getstrbuf(stp);
-
- assert(stbuf);
-
- /*
- * Determine from the local flag whether the data declaration should
- * be static.
- */
- if (lflag)
- fmtstr = (const char *)"static const";
- else
- fmtstr = (const char *)"const";
-
- if (fprintf(fddata, "\n%s char __%s[%ld] __attribute__((unused)) = { ",
- fmtstr, interface, stbufsize) < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldata, strerror(errno));
- return (1);
- }
-
- for (ndx = 0; ndx < (stbufsize - 1); ndx++) {
- if (column == 1) {
- if (fddata && fprintf(fddata,
- "\n/* %4ld */ 0x%.2x,", ndx,
- (unsigned char)stbuf[ndx]) < 0) {
- (void) fprintf(stderr, Errmsg_wrte,
- fldata, strerror(errno));
- return (1);
- }
- } else {
- if (fddata && fprintf(fddata, " 0x%.2x,",
- (unsigned char)stbuf[ndx]) < 0) {
- (void) fprintf(stderr, Errmsg_wrte,
- fldata, strerror(errno));
- return (1);
- }
- }
-
- if (column++ == 10)
- column = 1;
- }
-
- if (column == 1)
- fmtstr = "\n\t0x%.2x };\n";
- else
- fmtstr = " 0x%.2x };\n";
-
- if (fprintf(fddata, fmtstr, (unsigned char)stbuf[stbufsize - 1]) < 0) {
- (void) fprintf(stderr, Errmsg_wrte, fldata, strerror(errno));
- return (1);
- }
-
- return (0);
-}
-
-static int
-file()
-{
- char buffer[LINE_MAX], * token;
- uint_t bufsize;
- char *token_buffer;
- int escape = 0;
- int len = 0;
-
- if ((token_buffer = malloc(LINE_MAX)) == 0) {
- (void) fprintf(stderr, Errmsg_nmem, strerror(errno));
- return (1);
- }
- bufsize = LINE_MAX;
-
- line = 1;
-
- while ((token = fgets(buffer, LINE_MAX, fddesc)) != NULL) {
- char defn[PATH_MAX], * _defn, * str;
-
- switch (*token) {
- case '#':
- case '$':
- if (escape) {
- (void) fprintf(stderr, Errmsg_malt, fldesc,
- line);
- return (1);
- }
-
- /*
- * If a msgid has been output a msgstr must follow
- * before we digest the new token. A msgid is only set
- * if fdmsgs is in use.
- */
- if (msgid) {
- msgid = 0;
- if (fprintf(fdmsgs, "msgstr\t\"\"\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte,
- flmsgs, strerror(errno));
- return (1);
- }
- }
-
- /*
- * Pass lines directly through to the output message
- * file.
- */
- if (fdmsgs && (prtmsgs == 1)) {
- char comment;
-
- if (cflag == 0)
- comment = '#';
- else
- comment = '$';
-
- if (fprintf(fdmsgs, "%c%s", comment,
- ++token) < 0) {
- (void) fprintf(stderr, Errmsg_wrte,
- flmsgs, strerror(errno));
- return (1);
- }
- }
- break;
-
- case '@':
- if (escape) {
- (void) fprintf(stderr, Errmsg_malt, fldesc,
- line);
- return (1);
- }
-
- /*
- * If a msgid has been output a msgstr must follow
- * before we digest the new token.
- */
- if (msgid) {
- msgid = 0;
- if (fprintf(fdmsgs, "msgstr\t\"\"\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte,
- flmsgs, strerror(errno));
- return (1);
- }
- }
-
- /*
- * Determine whether we have one or more tokens.
- */
- token++;
- while (isspace(*token)) /* rid any whitespace */
- token++;
- _defn = token; /* definition start */
- while (!(isspace(*token)))
- token++;
- *token++ = 0;
-
- while (isspace(*token)) /* rid any whitespace */
- token++;
-
- /*
- * Determine whether the single token is one of the
- * reserved message output delimiters otherwise
- * translate it as a message identifier.
- */
- if (*token == 0) {
- if (strcmp(_defn, start) == 0)
- prtmsgs = 1;
- else if (strcmp(_defn, end) == 0)
- prtmsgs = -1;
- else if (getmesgid(_defn) == 1)
- return (1);
- break;
- }
-
- /*
- * Multiple tokens are translated by taking the first
- * token as the message definition, and the rest of the
- * line as the message itself. A message line ending
- * with an escape ('\') is expected to be continued on
- * the next line.
- */
- if (prtmsgs != -1)
- prtmsgs = 1;
- if (fdmsgs && (prtmsgs == 1)) {
- /*
- * For catgets(3c) make sure a message
- * identifier has been established (this is
- * normally a domain for gettext(3i), but for
- * sgsmsg use this could be argued as being
- * redundent). Also make sure that the message
- * definitions haven't exceeeded the maximum
- * value allowed by gencat(1) before generating
- * any message file entries.
- */
- if (cflag == 1) {
- if (setid == 0) {
- (void) fprintf(stderr, "file "
- "%s: no message identifier "
- "has been established\n",
- fldesc);
- return (1);
- }
- if (ptr > NL_MSGMAX) {
- (void) fprintf(stderr, "file "
- "%s: message definition "
- "(%d) exceeds allowable "
- "limit (NL_MSGMAX)\n",
- fldesc, ptr);
- return (1);
- }
- }
-
- /*
- * For catgets(3c) write the definition and the
- * message string to the message file. For
- * gettext(3i) write the message string as a
- * mesgid - indicate a mesgid has been output
- * so that a msgstr can follow.
- */
- if (cflag == 1) {
- if (fprintf(fdmsgs, "%d\t%s", ptr,
- token) < 0) {
- (void) fprintf(stderr,
- Errmsg_wrte, flmsgs,
- strerror(errno));
- return (1);
- }
- } else {
- if (fprintf(fdmsgs, "msgid\t\"") < 0) {
- (void) fprintf(stderr,
- Errmsg_wrte, flmsgs,
- strerror(errno));
- return (1);
- }
- msgid = 1;
- }
- }
-
- /*
- * The message itself is a quoted string as this makes
- * embedding spaces at the start (or the end) of the
- * string very easy.
- */
- if (*token != '"') {
- (void) fprintf(stderr, Errmsg_malt, fldesc,
- line);
- return (1);
- }
-
- (void) strcpy(defn, _defn);
-
- /*
- * Write the tag to the lint definitions.
- */
- if (fdlint) {
- if (fprintf(fdlint, "\n#define\t%s\t",
- _defn) < 0) {
- (void) fprintf(stderr, Errmsg_wrte,
- fllint, strerror(errno));
- return (1);
- }
- }
-
- len = 0;
-
- /*
- * Write each character of the message string to the
- * data array. Translate any escaped characters - use
- * the same specially recognized characters as defined
- * by gencat(1).
- */
-message:
- if (*token == '"') {
- if (fdlint &&
- (fprintf(fdlint, "%c", *token) < 0)) {
- (void) fprintf(stderr, Errmsg_wrte,
- fllint, strerror(errno));
- return (1);
- }
- token++;
- }
- while (*token) {
- char _token;
-
- if ((*token == '\\') && (escape == 0)) {
- escape = 1;
- if (fdlint && (*(token + 1) != '\n') &&
- fprintf(fdlint, "%c", *token) < 0) {
- (void) fprintf(stderr,
- Errmsg_wrte, fllint,
- strerror(errno));
- return (1);
- }
- token++;
- continue;
- }
- if (escape) {
- if (*token == 'n')
- _token = '\n';
- else if (*token == 't')
- _token = '\t';
- else if (*token == 'v')
- _token = '\v';
- else if (*token == 'b')
- _token = '\b';
- else if (*token == 'f')
- _token = '\f';
- else if (*token == '\\')
- _token = '\\';
- else if (*token == '"')
- _token = '"';
- else if (*token == '\n')
- break;
- else
- _token = *token;
-
- if (fdmsgs && (prtmsgs == 1) &&
- (fprintf(fdmsgs, "\\") < 0)) {
- (void) fprintf(stderr,
- Errmsg_wrte, flmsgs,
- strerror(errno));
- return (1);
- }
- } else {
- /*
- * If this is the trailing quote then
- * thats the last of the message string.
- * Eat up any remaining white space and
- * unless an escape character is found
- * terminate the data string with a 0.
- */
- /* BEGIN CSTYLED */
- if (*token == '"') {
- if (fdlint && (fprintf(fdlint,
- "%c", *token) < 0)) {
- (void) fprintf(stderr,
- Errmsg_wrte, fllint,
- strerror(errno));
- return (1);
- }
-
- if (fdmsgs && (prtmsgs == 1) &&
- (fprintf(fdmsgs, "%c",
- *token) < 0)) {
- (void) fprintf(stderr,
- Errmsg_wrte, flmsgs,
- strerror(errno));
- return (1);
- }
-
- while (*++token) {
- if (*token == '\n')
- break;
- }
- _token = '\0';
- } else
- _token = *token;
- /* END CSTYLED */
- }
-
- if (fdmsgs && (prtmsgs == 1) &&
- (fprintf(fdmsgs, "%c", *token) < 0)) {
- (void) fprintf(stderr, Errmsg_wrte,
- flmsgs, strerror(errno));
- return (1);
- }
-
- if (fdlint && fprintf(fdlint,
- "%c", *token) < 0) {
- (void) fprintf(stderr, Errmsg_wrte,
- fllint, strerror(errno));
- return (1);
- }
-
- if (len >= bufsize) {
- bufsize += LINE_MAX;
- if ((token_buffer = realloc(
- token_buffer, bufsize)) == 0) {
- (void) fprintf(stderr,
- Errmsg_nmem,
- strerror(errno));
- return (1);
- }
- }
- token_buffer[len] = _token;
- ptr++, token++, len++;
- escape = 0;
-
- if (_token == '\0')
- break;
- }
-
- /*
- * After the complete message string has been processed
- * (including its continuation beyond one line), create
- * a string size definition.
- */
- if (escape == 0) {
- const char *form = "#define\t%s_SIZE\t%d\n";
-
- token_buffer[len] = '\0';
-
- message_append(defn, token_buffer);
-
- if (fdlint && fprintf(fdlint, form, defn,
- (len - 1)) < 0) {
- (void) fprintf(stderr, Errmsg_wrte,
- fllint, strerror(errno));
- return (1);
- }
- }
- break;
-
- default:
- /*
- * Empty lines are passed through to the message file.
- */
- while (isspace(*token))
- token++;
-
- if (*token == 0) {
- if (msgid || (fdmsgs && (prtmsgs == 1))) {
- /*
- * If a msgid has been output a msgstr
- * must follow before we digest the new
- * token.
- */
- if (msgid) {
- msgid = 0;
- str = "msgstr\t\"\"\n\n";
- } else
- str = "\n";
-
- if (fprintf(fdmsgs, str) < 0) {
- (void) fprintf(stderr,
- Errmsg_wrte, flmsgs,
- strerror(errno));
- return (1);
- }
- }
- break;
- }
-
- /*
- * If an escape is in effect then any tokens are taken
- * to be message continuations.
- */
- if (escape) {
- escape = 0;
- goto message;
- }
-
- (void) fprintf(stderr, "file %s: line %d: invalid "
- "input does not start with #, $ or @\n", fldesc,
- line);
- return (1);
- }
- line++;
- }
-
- free(token_buffer);
-
- return (0);
-}
-
-int
-main(int argc, char ** argv)
-{
- opterr = 0;
- while ((line = getopt(argc, argv, "cd:h:lm:n:i:v")) != EOF) {
- switch (line) {
- case 'c': /* catgets instead of gettext */
- cflag = 1;
- break;
- case 'd': /* new message data filename */
- fldata = optarg; /* (msg.c is default) */
- break;
- case 'h': /* new message defs filename */
- fldefs = optarg; /* (msg.h is default) */
- break;
- case 'i': /* input message ids from */
- flmids = optarg; /* from this file */
- break;
- case 'l': /* define message data arrays */
- lflag = 1; /* to be local (static) */
- break;
- case 'm': /* generate message database */
- flmsgs = optarg; /* to this file */
- break;
- case 'n': /* new data array and func */
- interface = optarg; /* name (msg is default) */
- break;
- case 'v':
- vflag = 1; /* set verbose flag */
- break;
- case '?':
- (void) fprintf(stderr, Errmsg_use, argv[0]);
- exit(1);
- default:
- break;
- }
- }
-
- /*
- * Validate the we have been given at least one input file.
- */
- if ((argc - optind) < 1) {
- (void) fprintf(stderr, Errmsg_use);
- exit(1);
- }
-
- /*
- * Open all the required output files.
- */
- if (fldefs) {
- if ((fddefs = fopen(fldefs, "w+")) == NULL) {
- (void) fprintf(stderr, Errmsg_opne, fldefs,
- strerror(errno));
- return (1);
- }
- }
- if (fldata) {
- if (fldefs && (strcmp(fldefs, fldata) == 0))
- fddata = fddefs;
- else if ((fddata = fopen(fldata, "w+")) == NULL) {
- (void) fprintf(stderr, Errmsg_opne, fldata,
- strerror(errno));
- return (1);
- }
- }
- if (fddefs && fddata) {
- (void) sprintf(fllint, "%s.%d.XXXXXX", nmlint, (int)getpid());
- if ((mkstemp(fllint) == -1) ||
- ((fdlint = fopen(fllint, "w+")) == NULL)) {
- (void) fprintf(stderr, Errmsg_opne, fllint,
- strerror(errno));
- return (1);
- }
- }
- if (flmsgs) {
- if ((fdmsgs = fopen(flmsgs, "w+")) == NULL) {
- (void) fprintf(stderr, Errmsg_opne, flmsgs,
- strerror(errno));
- return (1);
- }
- }
- if (flmids) {
- if ((fdmids = fopen(flmids, "r")) == NULL) {
- (void) fprintf(stderr, Errmsg_opne, flmids,
- strerror(errno));
- return (1);
- }
- }
-
-
- /*
- * Initialize the message definition and message data streams.
- */
- if (fddefs) {
- if (init_defs())
- return (1);
- }
-
- /*
- * Read the input message file, and for each line process accordingly.
- */
- for (; optind < argc; optind++) {
- int err;
-
- fldesc = argv[optind];
-
- if ((fddesc = fopen(fldesc, "r")) == NULL) {
- (void) fprintf(stderr, Errmsg_opne, fldesc,
- strerror(errno));
- return (1);
- }
- err = file();
- (void) fclose(fddesc);
-
- if (err != 0)
- return (1);
- }
-
- /*
- * If a msgid has been output a msgstr must follow before we end the
- * file.
- */
- if (msgid) {
- msgid = 0;
- if (fprintf(fdmsgs, "msgstr\t\"\"\n") < 0) {
- (void) fprintf(stderr, Errmsg_wrte, flmsgs,
- strerror(errno));
- return (1);
- }
- }
-
- if (fdmids)
- (void) fclose(fdmids);
- if (fdmsgs)
- (void) fclose(fdmsgs);
-
- if (fddefs) {
- if (output_defs())
- return (1);
- }
-
- /*
- * Finish off any generated data and header file.
- */
- if (fldata) {
- if (output_data())
- return (1);
- }
- if (fddefs) {
- if (fini_defs())
- return (1);
- }
-
- if (vflag)
- dump_stringtab(stp);
-
- /*
- * Close up everything and go home.
- */
- if (fddata)
- (void) fclose(fddata);
- if (fddefs && (fddefs != fddata))
- (void) fclose(fddefs);
- if (fddefs && fddata) {
- (void) fclose(fdlint);
- (void) unlink(fllint);
- }
-
- if (stp)
- st_destroy(stp);
-
- return (0);
-}
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/man/sgsmsg.1l b/usr/src/cmd/sgs/tools/man/sgsmsg.1l
deleted file mode 100644
index 88937580a7..0000000000
--- a/usr/src/cmd/sgs/tools/man/sgsmsg.1l
+++ /dev/null
@@ -1,433 +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
-.\"
-.if n .tr \--
-.TH sgsmsg 1l "2 Jun 1999"
-.SH NAME
-sgsmsg \- generate message strings for SGS subsystem.
-.SH SYNOPSIS
-.B sgsmsg
-[
-.B \-cl
-] [
-.BI \-d\0 "data"
-] [
-.BI \-h\0 "defs"
-] [
-.BI \-i\0 "ident"
-]
-.if n .ti +5n
-[
-.BI \-m\0 "messages"
-] [
-.BI \-n\0 "name"
-]
-.I file \.\.\.
-.SH AVAILABILITY
-SUNWonld
-.SH DESCRIPTION
-\f3sgsmsg\f1 generates several message files from an input string definition
-\f2file\f1. \f3sgsmsg\f1 provides a flexible, centralized, mechanism
-of collecting character strings within a code group such as an executable or
-shared object. All character strings are captured into a single data array
-within the \f2data\f1 file.
-The data array is similar to that produced by
-.BR xstr (1)),
-and helps reduce the relocation overhead incurred by string pointers.
-.LP
-Indexes into the data array are generated as
-definitions within the \f2defs\f1 file. The code group can reference each
-character string via predefined macros.
-.LP
-The character strings may also be translated into an internationalized
-format and captured in the
-\f2messages\f1 file. By default these message strings are suitable for
-.BR gettext (3I)
-manipulation. The \f3\-c\f1 option provides for these message strings to be
-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
-the input \f2file\f1:
-.LP
-.PD 0
-.RS +4
-.IP \(bu 3
-Entries that begin with a \f3#\fI, \f3$\f1 or a newline are treated as
-comments and are copied (as is) to the \f2messages\f1 file.
-.IP \(bu 3
-Entries that begin with a \f3@\f1 are translated and will be written to
-one or more of the output files. Two translations are possible dependent upon
-whether one or more tokens follow the \f3@\f1 character.
-.RE
-.PD
-.sp
-.LP
-An \f4@\f1 character followed by a single token is interpreted as one of
-two reserved message output
-\f2indicators\f1, or a message \f2identifier\f1. The reserved output
-indicator \f4_START_\f1 enables output to the \f2messages\f1 file (note that
-the occurrence of any \f4@\f1 token will also enable message output).
-The reserved output indicator \f4_END_\f1 disables output to the
-\f2messages\f1 file. These two indicators provides a means of isolating
-only those character strings that require translation into the \f2messages\f1
-file.
-.LP
-Besides the reserved output indicators, an \f4@\f1 character followed by a
-single token is taken to be a
-message \f2identifier\f1. This identifier will be translated into a
-\f2domain\f1 name for
-.BR gettext (3I)
-output, or a \f2setid\f1 for
-.BR catgets (3C)
-output. This translated value is determine by substituting the message
-\f2identifier\f1 token
-for the associated definition from in the \f2ident\f1 file. Note that
-a message \f2identifier\f1 is required for
-.BR catgets (3C)
-use but is optional for
-.BR gettext (3I).
-.LP
-An \f4@\f1 character followed by multiple tokens is taken to be a
-string \f2definition\f1 followed by a quoted character string. Character
-strings can be continued over multiple lines by ending the preceding
-line with a backslash - all initial whitespace on the continuation line will
-is ignored. Character strings can contain the escape sequences
-.B \en
-for newline,
-.B \et
-for tab,
-.B \ev
-for vertical tab,
-.B \eb
-for backspace,
-.B \er
-for carriage return,
-.B \ef
-for formfeed,
-.B \e\e
-for backslash, and
-\e"
-for double quote.
-.LP
-The character string is copied to the \f2data\f1 array
-and an index into this array is generated as the \f2definition\f1 within
-the string
-\f2defs\f1 file. The character string is also translated to the appropriate
-message format and written to the \f2messages\f1 file.
-.SH OPTIONS
-.TP 12
-.B \-c
-By default, strings generated in the \f2messages\f1 file are suitable for
-.BR msgfmt (1)
-processing, which provides for message extraction via
-.BR gettext (3I).
-This option causes the formatting of the message strings to be suitable for
-.BR gencat (1)
-processing, which provides for message extraction via
-.BR catgets (3C).
-.TP
-.BI \-d\0 data
-Specify a \f2data\f1 file is to be created.
-This file contains a single data array, by default named (\f2__name\f1[]),
-containing all the strings
-defined in the string definition \f2file\f1.
-.TP
-.BI \-h\0 defs
-Specify a \f2defs\f1 file is to be created.
-This file contains definitions for each character string contained in
-the data array within the \f2data\f1 file. These definitions represent
-offsets in the data array for each string. Reference to individual strings
-should use one of the two defined macros \f4MSG_INTL\f1 (which specifies
-a user defined message extraction function), or \f4MSG_ORIG\f1
-(which specifies a direct access to the \f2__name\f1[] array).
-.TP
-.BI \-i\0 ident
-Specify an \f2ident\f1 file from which to interpret a message identifier
-token.
-.TP
-.B \-l
-Indicate that the \f2data\f1 array be defined local (\f2static\f1). This
-is useful for establishing individual string arrays on a per-object basis.
-.TP
-.BI \-m\0 messages
-Specify a \f2messages\f1 file is to be created. This
-contain message strings suitable for delivery to a localization group.
-.TP
-.BI \-n\0 name
-Specify an alternative interface \f2name\f1. This name is used to label
-the message data array (\f2__name\f1[]) and the user defined message
-extraction function (const char * \f2_name\f1(int)) which will interface
-with this array.
-.SH EXAMPLES
-The following examples provide a simplified guide to using the \f3sgsmsg\fP
-command, including sample input files and generated output files.
-.LP
-The following \f2ident\f1 file provides message \f2identifiers\f1 for
-the link-editor utilities
-.BR ld (1),
-.BR libld.so.2 ,
-and
-.BR liblddbg.so.3 .
-These identifiers are referenced from the input string definition files
-of the respective code groups:
-.if n .ta 1.8i 2.2i
-.if t .ta 1.6i 2.2i
-.RS
-.nf
-.ft 3
-
-% cat sgs.ident
-.ft 1
-.if t .sp 0.35
-.if n .sp
-# mesgid setid domain
-.if t .sp 0.35
-.if n .sp
-MSG_ID_LD 1 SUNW_OST_SGS
-MSG_ID_LIBLD 2 SUNW_OST_SGS
-MSG_ID_LIBLDDBG 3 SUNW_OST_SGS
-
-.fi
-.RE
-.if t .bp
-.LP
-The following string definition \f2file\f1 defines a small number of
-strings used by
-.BR libld.so.2 :
-.ta 2.2i
-.RS
-.nf
-.ft 3
-
-% cat libld.msg
-.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
-# Message file for cmd/sgs/libld.
-.if t .sp 0.35
-.if n .sp
-@ MSG_ID_LIBLD
-
-# System call messages
-.if t .sp 0.35
-.if n .sp
-@ MSG_SYS_OPEN "file %s: cannot open file: %s"
-@ MSG_SYS_MMAP "file %s: cannot mmap file: %s"
-
-# Symbol processing errors
-.if t .sp 0.35
-.if n .sp
-@ MSG_SYM_DIFFTYPE "symbol `%s' has differing types:"
-@ MSG_SYM_DIFFATTR "symbol `%s' has differing %s:\\n\\
- \ \\t(file %s value=0x%x; file %s value=0x%x);"
-.if t .sp 0.35
-.if n .sp
-@ _END_
-
-# The following strings represent reserved names. Reference to
-# these strings is via the MSG_ORIG() macro, and thus no
-# translations are required.
-.if t .sp 0.35
-.if n .sp
-@ MSG_STR_EMPTY ""
-@ MSG_PTH_DEVZERO "/dev/zero"
-@ MSG_SUNW_OST_SGS "SUNW_OST_SGS"
-
-.fi
-.RE
-.LP
-Using the above input files, the following string and message data files can be
-generated:
-.if t .ta 0.5i 2.2i
-.if n .ta 0.5i 0.8i 3.0i
-.RS
-.nf
-.ft 3
-
-% sgsmsg\ \ \-i sgs.ident\ \ \-m\ messages\ \ \-d\ msg.c\ \ \-h\ msg.h \\
-\ \ \ \ \-n\ libld_msg\ \ libld.msg
-% cat msg.c
-.ft 1
-.if t .sp 0.35
-.if n .sp
-const char __libld_msg[] = { 0x00,
- 0x66, 0x69, 0x6c, 0x65, 0x20, 0x25, 0x73, 0x3a, \.\.\.\.
- 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x6f, 0x70, \.\.\.\.
- \.\.\.\.
- 0x00
-};
-
-.if t .bp
-.ft 3
-% cat msg.h
-.ft 1
-.if t .sp 0.35
-.if n .sp
-extern const char __libld_msg[];
-.if t .sp 0.35
-.if n .sp
-#define MSG_ORIG(x) &__libld_msg[x]
-.if t .sp 0.35
-.if n .sp
-extern const char * _libld_msg(int);
-.if t .sp 0.35
-.if n .sp
-#define MSG_INTL(x) _libld_msg(x)
-.if t .sp 0.35
-.if n .sp
-#define MSG_SYS_OPEN 1
-#define MSG_SYS_MMAP 31
-#define MSG_SYM_DIFFTYPE 61
-#define MSG_SYM_DIFFATTR 94
-#define MSG_STR_EMPTY 167
-#define MSG_PTH_DEVZERO 168
-#define MSG_SUNW_OST_SGS 178
-
-.ft 3
-% cat messages
-.ft 1
-.if t .sp 0.35
-.if n .sp
-# Message file for cmd/sgs/libld.
-.if t .sp 0.35
-.if n .sp
-domain "SUNW_OST_SGS"
-.if t .sp 0.35
-.if n .sp
-# System call messages
-.if t .sp 0.35
-.if n .sp
-msgid "file %s: cannot open file: %s"
-msgstr ""
-msgid "file %s: cannot mmap file: %s"
-msgstr ""
-.if t .sp 0.35
-.if n .sp
-# Symbol processing errors
-.if t .sp 0.35
-.if n .sp
-msgid "symbol `%s' has differing types:"
-msgstr ""
-msgid "symbol `%s' has differing %s:\\n\\t(file %s value=0x%x; file %s value=0x%x);"
-msgstr ""
-
-.fi
-.RE
-.LP
-References to the string data from the code group
-should use one of the two defined macros
-depending upon whether an original or localized string is required.
-For example, the simple
-.BR open (2)
-of a file would use the original string, however its associated
-error message should be localized:
-.if n .ta 0.75i
-.if t .ta 0.5i 2.2i
-.RS
-.nf
-.ft 3
-
-const char * file = MSG_ORIG(MSG_PTH_DEVZERO);
-.if t .sp 0.35
-.if n .sp
-if ((fd = open(file, O_RDWR, 0)) == -1) {
- int err = errno;
- (void) fprintf(stderr, MSG_INTL(MSG_SYS_OPEN), file,
- strerror(err));
- return (1);
-}
-
-.fi
-.RE
-.if t .bp
-.LP
-The \f3MSG_INTL\f1 definition provides for a user defined message
-extraction function
-that allows the greatest flexibility in providing an objects localization.
-Normally this interface is quite simple. For a code group that resides
-in a shared object the following interface can be provided by the user:
-.RS
-.nf
-.ft 3
-
-extern char * _dgettext(const char *, const char *);
-.if t .sp 0.35
-.if n .sp
-const char *
-_libld_msg(int mid)
-{
- return (_dgettext(MSG_ORIG(MSG_SUNW_OST_SGS),
- MSG_ORIG(mid)));
-}
-
-.fi
-.RE
-.LP
-For a code group that resides in an executable the following interface,
-and initialization can be provided by the user:
-.RS
-.nf
-.ft 3
-
-#include <locale.h>
-
-int
-main(int argc, char ** argv)
-{
- \&\.\.\.\.\.\.
- (void) setlocale(LC_MESSAGES, MSG_ORIG(MSG_STR_EMPTY));
- (void) textdomain(MSG_ORIG(MSG_SUNW_OST_SGS));
- \&\.\.\.\.\.\.
-}
-
-const char *
-_ld_msg(int mid)
-{
- return (gettext(MSG_ORIG(mid)));
-}
-.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
-.if n .tr \-\-
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/cmd/sgs/yacc/Makefile.com b/usr/src/cmd/sgs/yacc/Makefile.com
index 17a509ca87..2172234f49 100644
--- a/usr/src/cmd/sgs/yacc/Makefile.com
+++ b/usr/src/cmd/sgs/yacc/Makefile.com
@@ -61,7 +61,6 @@ $(DYNLIBCCC):= ZDEFS = $(ZNODEFS)
INCLIST= -I../../include -I../../include/$(MACH)
CPPFLAGS= $(INCLIST) $(DEFLIST) $(CPPFLAGS.master)
$(PROG):= LDLIBS = $(LDLIBS.cmd)
-BUILD.AR= $(AR) $(ARFLAGS) $@ `$(LORDER) $(OBJS) | $(TSORT)`
CSTD= $(CSTD_GNU99)
CFLAGS += $(CCVERBOSE)
diff --git a/usr/src/cmd/sgs/yacc/Makefile.targ b/usr/src/cmd/sgs/yacc/Makefile.targ
index baa615514c..a7932225e0 100644
--- a/usr/src/cmd/sgs/yacc/Makefile.targ
+++ b/usr/src/cmd/sgs/yacc/Makefile.targ
@@ -60,10 +60,6 @@ $(ROOTLIBDIR64)/$(LIBLINKSCCC): $(ROOTLIBDIR64)/$(LIBLINKSCCC)$(VERS)
objs pics:
-@mkdir -p $@
-$(LIBRARY): objs .WAIT $$(OBJS)
- $(BUILD.AR)
- $(POST_PROCESS_A)
-
$(DYNLIB): pics .WAIT $$(PICS)
$(BUILD.SO)
$(POST_PROCESS_SO)