summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stormont <astormont@racktopsystems.com>2016-11-25 00:03:49 +0000
committerDan McDonald <danmcd@omniti.com>2016-11-30 11:04:00 -0500
commit25b5cdf490cfb7bdfcb7a5e9d28355fdd92cba88 (patch)
tree7dfdd03b0626cea7894c62c1ea9feed4f94f50dd
parent8d548c7a31fe6a4eabd5617c37fbd3aafdbe15ee (diff)
downloadillumos-gate-25b5cdf490cfb7bdfcb7a5e9d28355fdd92cba88.tar.gz
7627 Build should be smarter about how SGSPROTO is created
Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Kim Shrier <kshrier@racktopsystems.com> Approved by: Dan McDonald <danmcd@omniti.com>
-rw-r--r--usr/src/cmd/sgs/Makefile8
-rw-r--r--usr/src/cmd/sgs/Makefile.targ16
-rw-r--r--usr/src/cmd/sgs/ld/Makefile.targ7
-rw-r--r--usr/src/cmd/sgs/libelf/Makefile.targ4
-rw-r--r--usr/src/cmd/sgs/libld/Makefile.targ4
-rw-r--r--usr/src/cmd/sgs/liblddbg/Makefile.targ4
-rw-r--r--usr/src/cmd/sgs/libldstab/Makefile.targ4
-rw-r--r--usr/src/cmd/sgs/librtld/Makefile.targ4
8 files changed, 36 insertions, 15 deletions
diff --git a/usr/src/cmd/sgs/Makefile b/usr/src/cmd/sgs/Makefile
index f2128aaaa2..6dfa9f91d9 100644
--- a/usr/src/cmd/sgs/Makefile
+++ b/usr/src/cmd/sgs/Makefile
@@ -159,7 +159,7 @@ $(SUBDIRS): FRC
# itself and ld.so.1. Once this new functionality appears in the standard ld
# this target can be disabled.
-native-add: native-proto FRC
+native-add: FRC
@ cd tools/$(MACH); pwd; $(MAKE) native
@ cd libconv/$(MACH); pwd; $(MAKE)
@ cd libelf/$(MACH); pwd; $(MAKE) native
@@ -172,12 +172,6 @@ native-clobber:
@ cd tools; pwd; $(MAKE) $(TARGET)
$(RM) -r proto/$(MACH)
-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.targ b/usr/src/cmd/sgs/Makefile.targ
index 7d70c71b85..4940367e99 100644
--- a/usr/src/cmd/sgs/Makefile.targ
+++ b/usr/src/cmd/sgs/Makefile.targ
@@ -21,6 +21,7 @@
#
# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2016 RackTop Systems.
#
# Standard install rules
@@ -231,4 +232,19 @@ $(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/ld/Makefile.targ b/usr/src/cmd/sgs/ld/Makefile.targ
index 42ee9938d6..8b1131d9e3 100644
--- a/usr/src/cmd/sgs/ld/Makefile.targ
+++ b/usr/src/cmd/sgs/ld/Makefile.targ
@@ -35,7 +35,9 @@ install: all $(VAR_SGSBINPROG) $(VAR_SGSCCSLINK)
$(COMPILE.c) $<
$(POST_PROCESS_O)
-$(PROG): $(MAPFILES)
+$(PROG): $(OBJS) $(MAPFILES)
+ $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
+ $(POST_PROCESS)
clean:
$(RM) $(OBJS) $(CLEANFILES)
@@ -53,8 +55,7 @@ include $(SRC)/cmd/sgs/Makefile.targ
native: $(SGSBINDIR)/$(PROG)
-$(SGSBINDIR)/$(PROG) \
-$(PROG): $$(OBJS)
+$(SGSBINDIR)/$(PROG): $(OBJS) $(SGSBINDIR)
$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
$(POST_PROCESS)
diff --git a/usr/src/cmd/sgs/libelf/Makefile.targ b/usr/src/cmd/sgs/libelf/Makefile.targ
index 3c70014e0e..22f6c261e8 100644
--- a/usr/src/cmd/sgs/libelf/Makefile.targ
+++ b/usr/src/cmd/sgs/libelf/Makefile.targ
@@ -134,7 +134,9 @@ pics/xlate.o: xlate.c
native: $(SGSLIBDIR)/$(LIBLINKS)
-$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS)
+$(PICS): pics
+
+$(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR)
$(BUILD.SO)
$(POST_PROCESS_SO)
diff --git a/usr/src/cmd/sgs/libld/Makefile.targ b/usr/src/cmd/sgs/libld/Makefile.targ
index 85f71e63c7..c8f514cd2f 100644
--- a/usr/src/cmd/sgs/libld/Makefile.targ
+++ b/usr/src/cmd/sgs/libld/Makefile.targ
@@ -103,7 +103,9 @@ lint: $(LINTLIB32) $(LINTOUT32) $(LINTLIB64) $(LINTOUT64) \
native: $(SGSLIBDIR)/$(LIBLINKS)
-$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS)
+$(PICS): pics
+
+$(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR)
$(BUILD.SO)
$(POST_PROCESS_SO)
diff --git a/usr/src/cmd/sgs/liblddbg/Makefile.targ b/usr/src/cmd/sgs/liblddbg/Makefile.targ
index d5a7e8f6dd..68978ceefa 100644
--- a/usr/src/cmd/sgs/liblddbg/Makefile.targ
+++ b/usr/src/cmd/sgs/liblddbg/Makefile.targ
@@ -57,7 +57,9 @@ lint: $(LINTLIB32) $(LINTOUT32) $(LINTLIB64) $(LINTOUT64) \
native: $(SGSLIBDIR)/$(LIBLINKS)
-$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS)
+$(PICS): pics
+
+$(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR)
$(BUILD.SO)
$(POST_PROCESS_SO)
diff --git a/usr/src/cmd/sgs/libldstab/Makefile.targ b/usr/src/cmd/sgs/libldstab/Makefile.targ
index 6b47b4ae2b..c9ba1b7467 100644
--- a/usr/src/cmd/sgs/libldstab/Makefile.targ
+++ b/usr/src/cmd/sgs/libldstab/Makefile.targ
@@ -43,7 +43,9 @@ delete:
native: $(SGSLIBDIR)/$(DYNLIB)
-$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS)
+$(PICS): pics
+
+$(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR)
$(BUILD.SO)
$(POST_PROCESS_SO)
diff --git a/usr/src/cmd/sgs/librtld/Makefile.targ b/usr/src/cmd/sgs/librtld/Makefile.targ
index 71a73947c8..30e03221a5 100644
--- a/usr/src/cmd/sgs/librtld/Makefile.targ
+++ b/usr/src/cmd/sgs/librtld/Makefile.targ
@@ -40,7 +40,9 @@ delete:
native: $(SGSLIBDIR)/$(LIBLINKS)
-$(SGSLIBDIR)/$(DYNLIB): pics .WAIT $$(PICS)
+$(PICS): pics
+
+$(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR)
$(BUILD.SO)
$(POST_PROCESS_SO)