Print this page
8411 Build should warn when linking against libraries outside proto area

@@ -18,10 +18,11 @@
 #
 # CDDL HEADER END
 #
 #
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2017 RackTop Systems.
 #
 
 LIBRARY=        libzonecfg.a
 VERS=           .1
 OBJECTS=        libzonecfg.o getzoneent.o scratchops.o

@@ -32,10 +33,13 @@
 LDLIBS +=       -lc -lsocket -lnsl -luuid -lnvpair -lsysevent -lsec -lbrand \
                 -lpool -lscf -lproc -luutil -lbsm -lsecdb
 # DYNLIB libraries do not have lint libs and are not linted
 $(DYNLIB) :=    LDLIBS += -lxml2
 
+# Allow libxml2 to be taken from outside the proto area.
+$(ADJUNCT_PROTO_NOT_SET)DYNFLAGS += $(ZASSERTDEFLIB)=libxml2.so
+
 SRCDIR =        ../common
 CPPFLAGS +=     -I$(ADJUNCT_PROTO)/usr/include/libxml2 -I$(SRCDIR) -D_REENTRANT
 CERRWARN +=     -_gcc=-Wno-uninitialized
 CERRWARN +=     -_gcc=-Wno-parentheses
 $(LINTLIB) := SRCS=     $(SRCDIR)/$(LINTSRC)