Print this page
lib: move compat links from targetdirs to proper makefiles
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/sgs/rtld/Makefile.com
+++ new/usr/src/cmd/sgs/rtld/Makefile.com
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 #
23 23 # Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 # Copyright (c) 2018, Joyent, Inc.
25 25 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
26 26 #
27 27
28 28 RTLD= ld.so.1
29 29
30 30 AVLOBJ= avl.o
31 31 DTROBJ= dtrace_data.o
32 32 TOOLOBJS= alist.o strhash.o
33 33 BLTOBJ= msg.o
34 34 ELFCAPOBJ= elfcap.o
35 35 OBJECTS= $(BLTOBJ) \
36 36 $(AVLOBJ) \
37 37 $(DTROBJ) \
38 38 $(TOOLOBJS) \
39 39 $(ELFCAPOBJ) \
40 40 $(P_ASOBJS) $(P_COMOBJS) $(P_MACHOBJS) $(G_MACHOBJS) \
41 41 $(S_ASOBJS) $(S_COMOBJS) $(S_MACHOBJS) $(CP_MACHOBJS)
42 42
43 43 COMOBJS= $(P_COMOBJS) $(S_COMOBJS)
44 44 ASOBJS= $(P_ASOBJS) $(S_ASOBJS)
45 45 MACHOBJS= $(P_MACHOBJS) $(S_MACHOBJS)
46 46 NOCTFOBJS= $(ASOBJS)
47 47
48 48 include $(SRC)/lib/Makefile.lib
49 49 include $(SRC)/cmd/sgs/Makefile.com
50 50
51 51 SRCDIR = ../common
52 52 ELFCAP = $(SRC)/common/elfcap
53 53 PLAT = $(VAR_PLAT_$(BASEPLAT))
54 54
55 55 # DTrace needs an executable data segment.
56 56 MAPFILE.NED=
57 57
58 58 MAPFILES += $(MAPFILE-ORDER)
59 59
60 60 # For the libc/libthread unified world:
61 61 # This library needs to be placed in /lib to allow
62 62 # dlopen() functionality while in single-user mode.
63 63 ROOTFS_DYNLIB= $(RTLD:%=$(ROOTFS_LIBDIR)/%)
64 64 ROOTFS_DYNLIB64= $(RTLD:%=$(ROOTFS_LIBDIR64)/%)
↓ open down ↓ |
64 lines elided |
↑ open up ↑ |
65 65
66 66 # For the libc/libthread separated world:
67 67 # A version of this library needs to be placed in /etc/lib to allow
68 68 # dlopen() functionality while in single-user mode.
69 69 ETCLIBDIR= $(ROOT)/etc/lib
70 70 ETCDYNLIB= $(RTLD:%=$(ETCLIBDIR)/%)
71 71
72 72 ROOTDYNLIB= $(RTLD:%=$(ROOTFS_LIBDIR)/%)
73 73 ROOTDYNLIB64= $(RTLD:%=$(ROOTFS_LIBDIR64)/%)
74 74
75 +COMPATLINKS= /etc/lib/ld.so.1 /usr/lib/ld.so.1 /usr/lib/$(MACH64)/ld.so.1
76 +$(ROOT)/etc/lib/ld.so.1 := COMPATLINKTARGET= ../../lib/ld.so.1
77 +$(ROOT)/usr/lib/ld.so.1 := COMPATLINKTARGET= ../../lib/ld.so.1
78 +$(ROOT)/usr/lib/$(MACH64)/ld.so.1 := \
79 + COMPATLINKTARGET= ../../../lib/$(MACH64)/ld.so.1
80 +
81 +install: $(ROOTCOMPATLINKS)
75 82
76 83 FILEMODE = 755
77 84
78 85 CPPFLAGS += -I$(SRCBASE)/lib/libc/inc \
79 86 -I$(SRCBASE)/uts/common/krtld \
80 87 -I$(SRCBASE)/uts/$(PLAT) \
81 88 -I$(SRCBASE)/uts/$(PLAT)/krtld \
82 89 -I$(SRC)/common/sgsrtcid \
83 90 -I$(ELFCAP) \
84 91 $(CPPFEATUREMACROS)
85 92
86 93 ASFLAGS= -P -D_ASM $(CPPFLAGS)
87 94 LDLIB = -L ../../libld/$(MACH)
88 95 RTLDLIB = -L ../../librtld/$(MACH)
89 96
90 97 CERRWARN += -_gcc=-Wno-uninitialized
91 98 CERRWARN += -_gcc=-Wno-unused-variable
92 99 CERRWARN += -_gcc=-Wno-switch
93 100
94 101 # not linted
95 102 SMATCH=off
96 103
97 104 # These definitions require that libc be built in the same workspace
98 105 # as the run-time linker and before the run-time linker is built.
99 106 # This is required for the system's self-consistency in any case.
100 107 CPICLIB = $(VAR_RTLD_CPICLIB)
101 108 CPICLIB64 = $(VAR_RTLD_CPICLIB64)
102 109 CLIB = -lc_pic
103 110
104 111 LDLIBS += $(CONVLIBDIR) $(CONV_LIB) \
105 112 $(CPICLIB) $(CLIB) \
106 113 $(LDDBGLIBDIR) $(LDDBG_LIB) \
107 114 $(RTLDLIB) -lrtld \
108 115 $(LDLIB) $(LD_LIB)
109 116
110 117 DYNFLAGS += -i -e _rt_boot $(VERSREF) $(ZNODLOPEN) \
111 118 $(ZINTERPOSE) -zdtrace=dtrace_data '-R$$ORIGIN'
112 119
113 120 BUILD.s= $(AS) $(ASFLAGS) $< -o $@
114 121
115 122 BLTDEFS= msg.h
116 123 BLTDATA= msg.c
117 124 BLTMESG= $(SGSMSGDIR)/rtld
118 125
119 126 BLTFILES= $(BLTDEFS) $(BLTDATA) $(BLTMESG)
120 127
121 128 SGSMSGCOM= ../common/rtld.msg
122 129 SGSMSG32= ../common/rtld.32.msg
123 130 SGSMSG64= ../common/rtld.64.msg
124 131 SGSMSGSPARC= ../common/rtld.sparc.msg
125 132 SGSMSGSPARC32= ../common/rtld.sparc32.msg
126 133 SGSMSGSPARC64= ../common/rtld.sparc64.msg
127 134 SGSMSGINTEL= ../common/rtld.intel.msg
128 135 SGSMSGINTEL32= ../common/rtld.intel32.msg
129 136 SGSMSGINTEL64= ../common/rtld.intel64.msg
130 137 SGSMSGCHK= ../common/rtld.chk.msg
131 138 SGSMSGTARG= $(SGSMSGCOM)
132 139 SGSMSGALL= $(SGSMSGCOM) $(SGSMSG32) $(SGSMSG64) \
133 140 $(SGSMSGSPARC) $(SGSMSGSPARC32) $(SGSMSGSPARC64) \
134 141 $(SGSMSGINTEL) $(SGSMSGINTEL32) $(SGSMSGINTEL64)
135 142
136 143 SGSMSGFLAGS1= $(SGSMSGFLAGS) -m $(BLTMESG)
137 144 SGSMSGFLAGS2= $(SGSMSGFLAGS) -h $(BLTDEFS) -d $(BLTDATA) -n rtld_msg
138 145
139 146 SRCS= $(AVLOBJ:%.o=$(VAR_AVLDIR)/%.c) \
140 147 $(DTROBJ:%.o=$(VAR_DTRDIR)/%.c) \
141 148 $(TOOLOBJS:%.o=$(SGSTOOLS)/common/%.c) \
142 149 $(COMOBJS:%.o=../common/%.c) $(MACHOBJS:%.o=%.c) $(BLTDATA) \
143 150 $(G_MACHOBJS:%.o=$(SRCBASE)/uts/$(PLAT)/krtld/%.c) \
144 151 $(CP_MACHOBJS:%.o=../$(MACH)/%.c) \
145 152 $(ASOBJS:%.o=%.s)
146 153
147 154 CLEANFILES += $(CRTS) $(BLTFILES)
148 155 CLOBBERFILES += $(RTLD)
↓ open down ↓ |
64 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX