Print this page
native tools must reliably use a native adjunct, even if that's inconvenient
While it is perhaps convenient for native tools to use updated versions
of certain things like libxml it is imperative that those versions are
_also_ build for the build machine. Thus they need to be in the native
adjunct (even if that native adjunct is thus not /).
Fix the native adjunct to be rooted similarly to the adjunct proto (that
is, at /), and fix SMF to use it correctly
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/svc/configd/Makefile
+++ new/usr/src/cmd/svc/configd/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25
26 26 MYPROG = svc.configd
27 27 MYOBJS = \
28 28 backend.o \
29 29 configd.o \
30 30 client.o \
31 31 file_object.o \
32 32 maindoor.o \
33 33 object.o \
34 34 rc_node.o \
35 35 snapshot.o
36 36
37 37 PROG = $(MYPROG)
38 38 OBJS = $(MYOBJS)
39 39
40 40 SRCS = $(MYOBJS:%.o=%.c)
41 41
42 42 include ../../Makefile.cmd
43 43 include ../../Makefile.ctf
44 44
45 45 NATIVE_BUILD=$(POUND_SIGN)
46 46 $(NATIVE_BUILD)PROG = $(MYPROG:%=%-native)
47 47 $(NATIVE_BUILD)OBJS = $(MYOBJS:%.o=%-native.o)
48 48
49 49 ROOTCMDDIR= $(ROOT)/lib/svc/bin
50 50
51 51 MYCPPFLAGS = -I. -I../common -I../../../common/svc \
52 52 -I$(ROOT)/usr/include/sqlite-sys -D_REENTRANT
53 53 CPPFLAGS += $(MYCPPFLAGS)
54 54 CFLAGS += $(CCVERBOSE)
55 55 CERRWARN += -_gcc=-Wno-parentheses
56 56 CERRWARN += -_gcc=-Wno-type-limits
57 57 CERRWARN += -_gcc=-Wno-unused-label
58 58 CERRWARN += -_gcc=-Wno-unused-variable
59 59 CERRWARN += -_gcc=-Wno-unused-function
60 60 CERRWARN += -_gcc=-Wno-uninitialized
61 61 MYLDLIBS = -lumem -luutil -lbsm
62 62 LDLIBS += -lsecdb $(MYLDLIBS)
63 63 LINTFLAGS += -errtags -erroff=E_BAD_FORMAT_ARG_TYPE2 -erroff=E_NAME_DEF_NOT_USED2
64 64
65 65 CLOBBERFILES += $(MYPROG:%=%-native)
66 66
67 67 LIBUUTIL = $(SRC)/lib/libuutil
68 68 LIBSCF = $(SRC)/lib/libscf
69 69
70 70 SCRIPTFILE = restore_repository
71 71 ROOTSCRIPTFILE = $(ROOTCMDDIR)/$(SCRIPTFILE)
↓ open down ↓ |
71 lines elided |
↑ open up ↑ |
72 72
73 73 #
74 74 # Native variant (used in ../seed)
75 75 #
76 76 $(NATIVE_BUILD)CC = $(NATIVECC)
77 77 $(NATIVE_BUILD)LD = $(NATIVELD)
78 78 $(NATIVE_BUILD)CFLAGS = $(NATIVE_CFLAGS)
79 79 $(NATIVE_BUILD)CPPFLAGS = $(MYCPPFLAGS) -I$(LIBUUTIL)/common -I$(LIBSCF)/inc
80 80 $(NATIVE_BUILD)CPPFLAGS += -DNATIVE_BUILD
81 81 $(NATIVE_BUILD)LDFLAGS =
82 -$(NATIVE_BUILD)LDLIBS = -L$(ADJUNCT_PROTO)/usr/lib -R$(ADJUNCT_PROTO)/usr/lib \
82 +$(NATIVE_BUILD)LDLIBS = -L$(NATIVE_ADJUNCT)/usr/lib \
83 + -R$(NATIVE_ADJUNCT)/usr/lib \
83 84 -L$(LIBUUTIL)/native -R $(LIBUUTIL)/native $(MYLDLIBS)
84 85
85 86 DIRMODE = 0755
86 87 FILEMODE = 0555
87 88
88 89 OBJSQLITE =
89 90 LIBSQLITE = -lsqlite-sys
90 91 $(NATIVE_BUILD)OBJSQLITE = $(ROOT)/lib/libsqlite-native.o
91 92 $(NATIVE_BUILD)LIBSQLITE =
92 93
93 94 OBJS += $(OBJSQLITE)
94 95 LDLIBS += $(LIBSQLITE)
95 96
96 97 install := TARGET = install
97 98 clobber := TARGET = clobber
98 99
99 100 .KEEP_STATE:
100 101 .PARALLEL: $(MYOBJS) $(MYOBJS:%.o=%-native.o)
101 102
102 103 all: $(PROG)
103 104
104 105 native: FRC
105 106 @cd $(LIBUUTIL)/native; pwd; $(MAKE) $(MFLAGS) install
106 107 @NATIVE_BUILD= $(MAKE) $(MFLAGS) all
107 108
108 109 $(PROG): $(OBJS)
109 110 $(LINK.c) -o $@ $(OBJS) $(LDLIBS)
110 111 $(POST_PROCESS)
111 112
112 113 %-native.o: %.c
113 114 $(COMPILE.c) -o $@ $<
114 115 $(POST_PROCESS_O)
115 116
116 117 $(ROOTCMDDIR)/%: %.sh
117 118 $(INS.rename)
118 119
119 120 install: all $(ROOTCMD) $(ROOTVARSADMFILE) $(ROOTSCRIPTFILE)
120 121
121 122 clean: FRC
122 123 $(RM) $(MYOBJS) $(MYOBJS:%.o=%-native.o)
123 124
124 125 clobber:
125 126
126 127 lint: lint_SRCS
127 128
128 129 lint_SRCS:
129 130
130 131 include ../../Makefile.targ
131 132
132 133 FRC:
↓ open down ↓ |
40 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX