--- old/usr/src/Makefile.master	2016-01-11 15:36:58.059666969 -0500
+++ new/usr/src/Makefile.master	2016-01-11 15:36:58.081902082 -0500
@@ -42,7 +42,7 @@
 #
 # Adjunct for building things that run on the build machine.
 #
-NATIVE_ADJUNCT=	/usr
+NATIVE_ADJUNCT=	/
 
 #
 # RELEASE_BUILD should be cleared for final release builds.
@@ -559,7 +559,7 @@
 	$(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) \
 	$(ADJUNCT_PROTO:%=-I%/usr/include)
 CPPFLAGS.native=$(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) \
-		$(ENVCPPFLAGS4) -I$(NATIVE_ADJUNCT)/include
+		$(ENVCPPFLAGS4) -I$(NATIVE_ADJUNCT)/usr/include
 CPPFLAGS=	$(CPPFLAGS.first) $(CPPFLAGS.master)
 AS_CPPFLAGS=	$(CPPFLAGS.first) $(CPPFLAGS.master)
 JAVAFLAGS=	-source 1.6 -target 1.6 -Xlint:deprecation,-options
--- old/usr/src/cmd/hal/Makefile.hal	2016-01-11 15:36:58.619037882 -0500
+++ new/usr/src/cmd/hal/Makefile.hal	2016-01-11 15:36:58.631468243 -0500
@@ -70,3 +70,7 @@
 CERRWARN +=		-_gcc=-Wno-parentheses
 CERRWARN +=		-_gcc=-Wno-address
 CERRWARN +=		-_gcc=-Wno-unused-function
+
+# This is, unfortunately, from the glib headers.  Studio provides no
+# equivalent to -isystem
+CERRWARN +=	-_cc=-erroff=E_INTEGER_OVERFLOW_DETECTED
--- old/usr/src/cmd/latencytop/Makefile.com	2016-01-11 15:36:59.036134590 -0500
+++ new/usr/src/cmd/latencytop/Makefile.com	2016-01-11 15:36:59.048218376 -0500
@@ -42,12 +42,13 @@
 
 LINTFLAGS += -erroff=E_NAME_USED_NOT_DEF2
 LINTFLAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2
+LINTFLAGS += -erroff=E_STATIC_UNUSED
 LINTFLAGS64 += -erroff=E_NAME_USED_NOT_DEF2
 LINTFLAGS64 += -erroff=E_FUNC_RET_ALWAYS_IGNOR2
+LINTFLAGS64 += -erroff=E_STATIC_UNUSED
 
 FILEMODE = 0555
 
-ELFWRAP = elfwrap
 WRAPOBJ = latencytop_wrap.o
 
 CLEANFILES += $(OBJS) $(WRAPOBJ) ./latencytop_d ./latencytop_trans
--- old/usr/src/cmd/mdb/intel/ia32/libpython2.6/Makefile	2016-01-11 15:36:59.453960587 -0500
+++ new/usr/src/cmd/mdb/intel/ia32/libpython2.6/Makefile	2016-01-11 15:36:59.466250384 -0500
@@ -36,6 +36,10 @@
 
 %.o := CPPFLAGS +=	-_gcc=-isystem -_gcc=$(ADJUNCT_PROTO)/usr/include
 
+# Studio provides no equivalent to -isystem, so we have to be heavy handed
+CERRWARN +=	-_cc=-erroff=E_MACRO_REDEFINED
+LINTFLAGS +=	-erroff=E_MACRO_REDEFINED
+
 dmod/$(MODULE) := LDLIBS += -lproc
 
 %.o: $(MODSRCS_DIR)/%.c
--- old/usr/src/cmd/rmmount/Makefile	2016-01-11 15:36:59.865580267 -0500
+++ new/usr/src/cmd/rmmount/Makefile	2016-01-11 15:36:59.877846643 -0500
@@ -47,6 +47,10 @@
 CERRWARN += -_gcc=-Wno-unused-function
 CERRWARN += -_gcc=-Wno-uninitialized
 
+# This is, unfortunately, from the glib headers.  Studio provides no
+# equivalent to -isystem
+CERRWARN +=	-_cc=-erroff=E_INTEGER_OVERFLOW_DETECTED
+
 .KEEP_STATE:
 
 all: $(PROG)
--- old/usr/src/cmd/rmvolmgr/Makefile	2016-01-11 15:37:00.282756123 -0500
+++ new/usr/src/cmd/rmvolmgr/Makefile	2016-01-11 15:37:00.295355338 -0500
@@ -48,6 +48,10 @@
 CERRWARN += 	-_gcc=-Wno-parentheses
 CERRWARN += 	-_gcc=-Wno-unused-function
 
+# This is, unfortunately, from the glib headers.  Studio provides no
+# equivalent to -isystem
+CERRWARN +=	-_cc=-erroff=E_INTEGER_OVERFLOW_DETECTED
+
 ROOTCMDDIR =		$(ROOTLIB)
 ROOTMANIFESTDIR =	$(ROOTSVCSYSTEMFILESYSTEM)
 $(ROOTMANIFEST) :=	FILEMODE = 444
--- old/usr/src/cmd/svc/configd/Makefile	2016-01-11 15:37:00.698050988 -0500
+++ new/usr/src/cmd/svc/configd/Makefile	2016-01-11 15:37:00.710153944 -0500
@@ -79,7 +79,8 @@
 $(NATIVE_BUILD)CPPFLAGS = $(MYCPPFLAGS) -I$(LIBUUTIL)/common -I$(LIBSCF)/inc
 $(NATIVE_BUILD)CPPFLAGS += -DNATIVE_BUILD
 $(NATIVE_BUILD)LDFLAGS =
-$(NATIVE_BUILD)LDLIBS = -L$(ADJUNCT_PROTO)/usr/lib -R$(ADJUNCT_PROTO)/usr/lib \
+$(NATIVE_BUILD)LDLIBS = -L$(NATIVE_ADJUNCT)/usr/lib \
+			-R$(NATIVE_ADJUNCT)/usr/lib \
 			-L$(LIBUUTIL)/native -R $(LIBUUTIL)/native $(MYLDLIBS)
 
 DIRMODE = 0755
--- old/usr/src/cmd/svc/svccfg/Makefile	2016-01-11 15:37:01.155791874 -0500
+++ new/usr/src/cmd/svc/svccfg/Makefile	2016-01-11 15:37:01.172589769 -0500
@@ -70,6 +70,8 @@
 MAPOPTS =	$(MAPFILES:%=-M%)
 
 MYCPPFLAGS =	-I ../common -I$(ADJUNCT_PROTO)/usr/include/libxml2
+$(NATIVE_BUILD)MYCPPFLAGS =	-I ../common \
+		-I$(NATIVE_ADJUNCT)/usr/include/libxml2
 CPPFLAGS +=	$(MYCPPFLAGS)
 LDFLAGS +=	$(MAPOPTS)
 
@@ -113,7 +115,7 @@
 $(NATIVE_BUILD)LDLIBS = \
 	-L$(LIBUUTIL)/native -R $(LIBUUTIL)/native \
 	-L$(LIBSCF)/native -R $(LIBSCF)/native \
-	-L$(ADJUNCT_PROTO)/usr/lib -R$(ADJUNCT_PROTO)/usr/lib \
+	-L$(NATIVE_ADJUNCT)/usr/lib -R$(NATIVE_ADJUNCT)/usr/lib \
 	$(SVCCFG_EXTRA_LIBS)
 
 svccfg_lex.o svccfg_grammar.o := CCVERBOSE =
--- old/usr/src/cmd/volrmmount/Makefile	2016-01-11 15:37:01.607386460 -0500
+++ new/usr/src/cmd/volrmmount/Makefile	2016-01-11 15:37:01.619668186 -0500
@@ -47,6 +47,10 @@
 CERRWARN +=	-_gcc=-Wno-uninitialized
 CERRWARN +=	-_gcc=-Wno-unused-function
 
+# This is, unfortunately, from the glib headers.  Studio provides no
+# equivalent to -isystem
+CERRWARN +=	-_cc=-erroff=E_INTEGER_OVERFLOW_DETECTED
+
 .KEEP_STATE:
 
 all: $(PROG)
--- old/usr/src/lib/libscf/Makefile.com	2016-01-11 15:37:02.026398339 -0500
+++ new/usr/src/lib/libscf/Makefile.com	2016-01-11 15:37:02.038675516 -0500
@@ -70,8 +70,9 @@
 MY_NATIVE_CPPFLAGS =\
 		-DNATIVE_BUILD $(DTEXTDOM) \
 		-I../inc -I$(COMDIR) -I$(LIBUUTIL)/common -I$(ROOTHDRDIR)
-MY_NATIVE_LDLIBS = -L$(LIBUUTIL)/native -R$(LIBUUTIL)/native -luutil -lc -lgen \
-		   -lnsl -lnvpair
+MY_NATIVE_LDLIBS = -L$(LIBUUTIL)/native -R$(LIBUUTIL)/native \
+		   -L$(NATIVE_ADJUNCT)/usr/lib -R$(NATIVE_ADJUNCT)/usr/lib \
+		   -luutil -lc -lgen -lnsl -lnvpair
 MY_NATIVE_LDLIBS_i386 = -lsmbios
 MY_NATIVE_LDLIBS += $(MY_NATIVE_LDLIBS_$(MACH))
 
--- old/usr/src/lib/policykit/Makefile.com	2016-01-11 15:37:02.446320458 -0500
+++ new/usr/src/lib/policykit/Makefile.com	2016-01-11 15:37:02.458532890 -0500
@@ -30,6 +30,10 @@
 
 CERRWARN +=	-_gcc=-Wno-unused-variable
 
+# This is, unfortunately, from the glib headers.  Studio provides no
+# equivalent to -isystem
+CERRWARN +=	-_cc=-erroff=E_INTEGER_OVERFLOW_DETECTED
+
 C99MODE =	$(C99_ENABLE)
 
 ROOTLIBPCDIR =	$(ROOT)/usr/lib/pkgconfig
--- old/usr/src/pkg/Makefile	2016-01-11 15:37:02.857078918 -0500
+++ new/usr/src/pkg/Makefile	2016-01-11 15:37:02.869603510 -0500
@@ -250,10 +250,16 @@
 PROC_SYNTH_PKGS= $(SYNTH_PKGS:%=$(PDIR)/%.mog)
 
 #
-# Root of pkg image to use for dependency resolution
-# Normally / on the machine used to build the binaries
+# Root of pkg image to use for dependency resolution Normally / on the machine
+# used to build the binaries, or the ADJUNCT_PROTO
 #
-PKGDEP_RESOLVE_IMAGE = /
+PKG_ADJUNCT.cmd= if [[ -d $${ADJUNCT_PROTO}/var/pkg ]]; then \
+		echo $$ADJUNCT_PROTO; \
+	else	\
+		echo /;	\
+	fi
+
+PKGDEP_RESOLVE_IMAGE = $(PKG_ADJUNCT.cmd:sh)
 
 #
 # For each package, we determine the target repository based on
--- old/usr/src/tools/ctf/Makefile.ctf	2016-01-11 15:37:03.321659002 -0500
+++ new/usr/src/tools/ctf/Makefile.ctf	2016-01-11 15:37:03.334193799 -0500
@@ -41,7 +41,7 @@
 	-I$(SRC) \
 	-I/usr/include \
 	-I$(SRC)/uts/common \
-	-I$(NATIVE_ADJUNCT)/include
+	-I$(NATIVE_ADJUNCT)/usr/include
 
 CPPFLAGS += $(HDRDIRS)
 CFLAGS += $(CCVERBOSE)
--- old/usr/src/tools/ctf/cvt/Makefile.com	2016-01-11 15:37:03.735712947 -0500
+++ new/usr/src/tools/ctf/cvt/Makefile.com	2016-01-11 15:37:03.748209524 -0500
@@ -73,7 +73,7 @@
 	-ldwarf
 DWARFCPPFLAGS	= -I../../dwarf/common
 
-LDFLAGS		+= -L$(NATIVE_ADJUNCT)/lib
+LDFLAGS		+= -L$(NATIVE_ADJUNCT)/usr/lib
 LDLIBS		+= -lz -lelf
 CPPFLAGS	+= -D_REENTRANT
 CFLAGS		+= $(CTF_FLAGS)
--- old/usr/src/tools/ctf/dump/Makefile.com	2016-01-11 15:37:04.155773030 -0500
+++ new/usr/src/tools/ctf/dump/Makefile.com	2016-01-11 15:37:04.168042109 -0500
@@ -31,7 +31,7 @@
 
 include ../../Makefile.ctf
 
-LDFLAGS += -L$(NATIVE_ADJUNCT)/lib
+LDFLAGS += -L$(NATIVE_ADJUNCT)/usr/lib
 LDLIBS += -lelf -lz
 
 OBJS = $(SRCS:%.c=%.o)
