diff options
author | Andrew Stormont <astormont@racktopsystems.com> | 2016-11-21 06:55:12 +0000 |
---|---|---|
committer | Dan McDonald <danmcd@omniti.com> | 2016-11-27 16:53:39 -0500 |
commit | 396aa62085ffd432d59ad504f1ac0827512580f4 (patch) | |
tree | 8ffb863f51d1a3740eed4f1b503cf3af01511b2a | |
parent | 218912f6649942e736d5234e96f1a5c6367713d1 (diff) | |
download | illumos-joyent-396aa62085ffd432d59ad504f1ac0827512580f4.tar.gz |
7612 SGSPROTO lacks structure
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Dan McDonald <danmcd@omniti.com>
-rw-r--r-- | usr/src/cmd/sgs/Makefile | 4 | ||||
-rw-r--r-- | usr/src/cmd/sgs/Makefile.com | 13 | ||||
-rw-r--r-- | usr/src/cmd/sgs/ld/Makefile.com | 4 | ||||
-rw-r--r-- | usr/src/cmd/sgs/ld/Makefile.targ | 6 | ||||
-rw-r--r-- | usr/src/cmd/sgs/ldprof/Makefile.com | 2 | ||||
-rw-r--r-- | usr/src/cmd/sgs/libelf/Makefile.targ | 12 | ||||
-rw-r--r-- | usr/src/cmd/sgs/libld/Makefile.targ | 13 | ||||
-rw-r--r-- | usr/src/cmd/sgs/liblddbg/Makefile.targ | 13 | ||||
-rw-r--r-- | usr/src/cmd/sgs/libldmake/Makefile.com | 2 | ||||
-rw-r--r-- | usr/src/cmd/sgs/libldstab/Makefile.targ | 7 | ||||
-rw-r--r-- | usr/src/cmd/sgs/librtld/Makefile.targ | 13 | ||||
-rw-r--r-- | usr/src/cmd/sgs/link_audit/Makefile.com | 2 |
12 files changed, 51 insertions, 40 deletions
diff --git a/usr/src/cmd/sgs/Makefile b/usr/src/cmd/sgs/Makefile index a583a83fb5..f2128aaaa2 100644 --- a/usr/src/cmd/sgs/Makefile +++ b/usr/src/cmd/sgs/Makefile @@ -20,6 +20,7 @@ # # # Copyright (c) 1991, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2016 RackTop Systems. # include $(SRC)/cmd/Makefile.cmd @@ -173,6 +174,9 @@ native-clobber: native-proto: -@mkdir -p proto/$(MACH) + -@mkdir -p proto/$(MACH)/lib + -@mkdir -p proto/$(MACH)/usr + -@mkdir -p proto/$(MACH)/usr/bin FRC: diff --git a/usr/src/cmd/sgs/Makefile.com b/usr/src/cmd/sgs/Makefile.com index 328ccde722..650a93e967 100644 --- a/usr/src/cmd/sgs/Makefile.com +++ b/usr/src/cmd/sgs/Makefile.com @@ -84,6 +84,12 @@ 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 # @@ -121,12 +127,13 @@ 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$(SGSPROTO) -L$(SGSPROTO) $(ZNOVERSION) $(HSONAME) +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,$(SGSPROTO) -LD_USE_PROTO = $(SGSPROTO)/ +CC_USE_PROTO = -Yl,$(SGSBINDIR) +LD_USE_PROTO = $(SGSBINDIR)/ # # lint-related stuff diff --git a/usr/src/cmd/sgs/ld/Makefile.com b/usr/src/cmd/sgs/ld/Makefile.com index 01ba9c1ff1..277b62c95b 100644 --- a/usr/src/cmd/sgs/ld/Makefile.com +++ b/usr/src/cmd/sgs/ld/Makefile.com @@ -50,8 +50,8 @@ LINTFLAGS64 += -x $(VAR_LINTFLAGS64) CLEANFILES += $(LINTOUTS) -native := LDFLAGS = -R$(SGSPROTO) $(ZNOVERSION) -native := LDLIBS = -L$(SGSPROTO) $(LD_LIB) -lelf $(CONVLIBDIR) \ +native := LDFLAGS = -R$(SGSLIBDIR) $(ZNOVERSION) +native := LDLIBS = -L$(SGSLIBDIR) $(LD_LIB) -lelf $(CONVLIBDIR) \ $(CONV_LIB) native := CPPFLAGS += -DNATIVE_BUILD diff --git a/usr/src/cmd/sgs/ld/Makefile.targ b/usr/src/cmd/sgs/ld/Makefile.targ index debb091dae..42ee9938d6 100644 --- a/usr/src/cmd/sgs/ld/Makefile.targ +++ b/usr/src/cmd/sgs/ld/Makefile.targ @@ -23,7 +23,7 @@ # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2016 RackTop Systems. # all: $(PROG) @@ -51,9 +51,9 @@ 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: $(SGSPROTO)/$(PROG) +native: $(SGSBINDIR)/$(PROG) -$(SGSPROTO)/$(PROG) \ +$(SGSBINDIR)/$(PROG) \ $(PROG): $$(OBJS) $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(POST_PROCESS) diff --git a/usr/src/cmd/sgs/ldprof/Makefile.com b/usr/src/cmd/sgs/ldprof/Makefile.com index f9406e08fc..1e7a111101 100644 --- a/usr/src/cmd/sgs/ldprof/Makefile.com +++ b/usr/src/cmd/sgs/ldprof/Makefile.com @@ -34,8 +34,6 @@ include ../../Makefile.com ROOTLIBDIR= $(ROOT)/usr/lib/link_audit -SGSPROTO= ../../proto/$(MACH) - MAPFILES = ../common/mapfile-vers DYNFLAGS += $(CC_USE_PROTO) diff --git a/usr/src/cmd/sgs/libelf/Makefile.targ b/usr/src/cmd/sgs/libelf/Makefile.targ index 0c5f3ce0a7..3c70014e0e 100644 --- a/usr/src/cmd/sgs/libelf/Makefile.targ +++ b/usr/src/cmd/sgs/libelf/Makefile.targ @@ -20,6 +20,7 @@ # # # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright 2016 RackTop Systems. # objs/%.o \ @@ -131,14 +132,15 @@ 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: $(SGSPROTO)/$(DYNLIB) +native: $(SGSLIBDIR)/$(LIBLINKS) -$(SGSPROTO)/$(DYNLIB): \ - pics .WAIT $$(PICS) +$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS) $(BUILD.SO) $(POST_PROCESS_SO) - -@$(RM) $(SGSPROTO)/$(LIBLINKS) - $(SYMLINK) $(DYNLIB) $(SGSPROTO)/$(LIBLINKS) + +$(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB) + -@$(RM) $(SGSLIBDIR)/$(LIBLINKS) + $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS) # Derived source and header files (messaging). Make sure that the sgsmsg diff --git a/usr/src/cmd/sgs/libld/Makefile.targ b/usr/src/cmd/sgs/libld/Makefile.targ index b23215ce80..85f71e63c7 100644 --- a/usr/src/cmd/sgs/libld/Makefile.targ +++ b/usr/src/cmd/sgs/libld/Makefile.targ @@ -22,7 +22,7 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2016 RackTop Systems. # pics/%.o: ../common/%.c @@ -101,14 +101,15 @@ lint: $(LINTLIB32) $(LINTOUT32) $(LINTLIB64) $(LINTOUT64) \ # Special target for native builds (ie. when we need to build a version of ld # to build a version of ld :-). -native: $(SGSPROTO)/$(DYNLIB) +native: $(SGSLIBDIR)/$(LIBLINKS) -$(SGSPROTO)/$(DYNLIB): \ - pics .WAIT $$(PICS) +$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS) $(BUILD.SO) $(POST_PROCESS_SO) - @$(RM) $(SGSPROTO)/$(LIBLINKS) - $(SYMLINK) $(DYNLIB) $(SGSPROTO)/$(LIBLINKS) + +$(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.targ b/usr/src/cmd/sgs/liblddbg/Makefile.targ index 71c17d0bae..d5a7e8f6dd 100644 --- a/usr/src/cmd/sgs/liblddbg/Makefile.targ +++ b/usr/src/cmd/sgs/liblddbg/Makefile.targ @@ -22,7 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2016 RackTop Systems. # pics/%.o: ../common/%.c @@ -55,14 +55,15 @@ lint: $(LINTLIB32) $(LINTOUT32) $(LINTLIB64) $(LINTOUT64) \ # Special target for native builds (ie. when we need to build a version of ld # to build a version of ld :-). -native: $(SGSPROTO)/$(DYNLIB) +native: $(SGSLIBDIR)/$(LIBLINKS) -$(SGSPROTO)/$(DYNLIB): \ - pics .WAIT $$(PICS) +$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS) $(BUILD.SO) $(POST_PROCESS_SO) - -@$(RM) $(SGSPROTO)/$(LIBLINKS) - $(SYMLINK) $(DYNLIB) $(SGSPROTO)/$(LIBLINKS) + +$(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 a8ab393d8a..6333a7b795 100644 --- a/usr/src/cmd/sgs/libldmake/Makefile.com +++ b/usr/src/cmd/sgs/libldmake/Makefile.com @@ -34,8 +34,6 @@ include $(SRC)/cmd/sgs/Makefile.com ROOTLIBDIR= $(ROOT)/opt/SUNWonld/lib ROOTLIBDIR64= $(ROOT)/opt/SUNWonld/lib/$(MACH64) -SGSPROTO= ../../proto/$(MACH) - SRCDIR = ../common DYNFLAGS += $(CC_USE_PROTO) diff --git a/usr/src/cmd/sgs/libldstab/Makefile.targ b/usr/src/cmd/sgs/libldstab/Makefile.targ index b20710f983..6b47b4ae2b 100644 --- a/usr/src/cmd/sgs/libldstab/Makefile.targ +++ b/usr/src/cmd/sgs/libldstab/Makefile.targ @@ -22,6 +22,8 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # +# Copyright 2016 RackTop Systems. +# pics/%.o: ../common/%.c $(COMPILE.c) -o $@ $< @@ -39,10 +41,9 @@ delete: # Special target for native builds (ie. when we need to build a version of ld # to build a version of ld :-). -native: $(SGSPROTO)/$(DYNLIB) +native: $(SGSLIBDIR)/$(DYNLIB) -$(SGSPROTO)/$(DYNLIB): \ - pics .WAIT $$(PICS) +$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS) $(BUILD.SO) $(POST_PROCESS_SO) diff --git a/usr/src/cmd/sgs/librtld/Makefile.targ b/usr/src/cmd/sgs/librtld/Makefile.targ index 134daba96a..71a73947c8 100644 --- a/usr/src/cmd/sgs/librtld/Makefile.targ +++ b/usr/src/cmd/sgs/librtld/Makefile.targ @@ -22,7 +22,7 @@ # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" +# Copyright 2016 RackTop Systems. # pics/%.o: ../common/%.c @@ -38,14 +38,15 @@ delete: # Special target for native builds (ie. when we need to build a version of ld # to build a version of ld :-). -native: $(SGSPROTO)/$(DYNLIB) +native: $(SGSLIBDIR)/$(LIBLINKS) -$(SGSPROTO)/$(DYNLIB): \ - pics .WAIT $$(PICS) +$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS) $(BUILD.SO) $(POST_PROCESS_SO) - -@$(RM) $(SGSPROTO)/$(LIBLINKS) - $(SYMLINK) $(DYNLIB) $(SGSPROTO)/$(LIBLINKS) + +$(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/link_audit/Makefile.com b/usr/src/cmd/sgs/link_audit/Makefile.com index c15aa1e204..b5de5f5be8 100644 --- a/usr/src/cmd/sgs/link_audit/Makefile.com +++ b/usr/src/cmd/sgs/link_audit/Makefile.com @@ -28,8 +28,6 @@ include ../../Makefile.com NO_ASM_WARN= -erroff=E_ASM_DISABLES_OPTIMIZATION -SGSPROTO= ../../proto/$(MACH) - TRUSSLIB= truss.so.1 TRUSSSRC= truss.c |