Print this page
11461 should use a native link-editor during the build
11463 SUNWonld has passed its use-by date
11464 cmd/sgs/tools should contain tools, not common code
11465 sgsmsg should be built with the rest of the build tools
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/sgs/libld/Makefile.targ
+++ new/usr/src/cmd/sgs/libld/Makefile.targ
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 #
↓ open down ↓ |
18 lines elided |
↑ open up ↑ |
19 19 # CDDL HEADER END
20 20 #
21 21 #
22 22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25 # Copyright 2016 RackTop Systems.
26 26 # Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
27 27 #
28 28
29 -pics/%.o: ../common/%.c
29 +pics/%.o: $(SRCDIR)/common/%.c
30 30 $(COMPILE.c) -o $@ $<
31 31 $(POST_PROCESS_O)
32 32
33 -pics/%32.o: ../common/%.c
33 +pics/%32.o: $(SRCDIR)/common/%.c
34 34 $(COMPILE.c) -o $@ $<
35 35 $(POST_PROCESS_O)
36 36
37 -pics/%64.o: ../common/%.c
37 +pics/%64.o: $(SRCDIR)/common/%.c
38 38 $(COMPILE.c) -o $@ -D_ELF64 $<
39 39 $(POST_PROCESS_O)
40 40
41 41 pics/%32.o: %.c
42 42 $(COMPILE.c) -o $@ $<
43 43 $(POST_PROCESS_O)
44 44
45 45 pics/%64.o: %.c
46 46 $(COMPILE.c) -o $@ -D_ELF64 $<
47 47 $(POST_PROCESS_O)
48 48
49 -pics/%.o: $(SGSTOOLS)/common/%.c
49 +pics/%.o: $(SGSCOMMON)/%.c
50 50 $(COMPILE.c) -o $@ $<
51 51 $(POST_PROCESS_O)
52 52
53 53 pics/%.o: $(VAR_AVLDIR)/%.c
54 54 $(COMPILE.c) -o $@ $<
55 55 $(POST_PROCESS_O)
56 56
57 57 #
58 58 # We use the shared elfcap code under usr/src/common/elfcap
59 59 #
60 60 pics/elfcap.o: $(ELFCAP)/elfcap.c
61 61 $(COMPILE.c) -o $@ $(ELFCAP)/elfcap.c
62 62 $(POST_PROCESS_O)
63 63
64 64 # Rules for compiling the shared relocation engines (doreloc.c) maintained
65 65 # under usr/src/uts. To support cross linking, We compile and link
66 66 # all of these into every copy of libld. Each one requires a separate rule:
67 67 # - The source files are in different subtrees under usr/src/uts
68 68 # - The output file needs to include the platform name to
69 69 # keep the object files from colliding
70 70 # The DO_RELOC_LIBLD definition is needed to generate the libld version
71 71 # of the doreloc code.
72 72 #
73 73 pics/%_x86_32.o: $(KRTLD_I386)/%.c
74 74 $(COMPILE.c) -o $@ -DDO_RELOC_LIBLD $<
75 75 $(POST_PROCESS_O)
76 76
77 77 pics/%_x86_64.o: $(KRTLD_AMD64)/%.c
78 78 $(COMPILE.c) -o $@ -D_ELF64 -DDO_RELOC_LIBLD $<
79 79 $(POST_PROCESS_O)
80 80
81 81 pics/%_sparc_32.o: $(KRTLD_SPARC)/%.c
82 82 $(COMPILE.c) -o $@ -DDO_RELOC_LIBLD $<
83 83 $(POST_PROCESS_O)
84 84
85 85 pics/%_sparc_64.o: \
86 86 $(KRTLD_SPARC)/%.c
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
87 87 $(COMPILE.c) -o $@ -D_ELF64 -DDO_RELOC_LIBLD $<
88 88 $(POST_PROCESS_O)
89 89
90 90
91 91 $(LIBLINKS):
92 92 $(RM) $@; $(SYMLINK) $(DYNLIB) $@
93 93
94 94 delete:
95 95 $(RM) $(DYNLIB)
96 96
97 -# Special target for native builds (ie. when we need to build a version of ld
98 -# to build a version of ld :-).
99 -
100 -native: $(SGSLIBDIR)/$(LIBLINKS)
101 -
102 97 $(PICS): pics
103 -
104 -$(SGSLIBDIR)/$(DYNLIB): $(PICS) $(SGSLIBDIR)
105 - $(BUILD.SO)
106 - $(POST_PROCESS_SO)
107 -
108 -$(SGSLIBDIR)/$(LIBLINKS): $(SGSLIBDIR)/$(DYNLIB)
109 - @$(RM) $(SGSLIBDIR)/$(LIBLINKS)
110 - $(SYMLINK) $(DYNLIB) $(SGSLIBDIR)/$(LIBLINKS)
111 98
112 99 include $(SRC)/lib/Makefile.targ
113 100 include $(SRC)/cmd/sgs/Makefile.targ
114 101
115 102 # Derived source and header files (messaging).
116 103
117 104 catalog: $(BLTMESG)
118 105
119 106 chkmsg: $(LIBSRCS) $(CHKSRCS)
120 107 sh $(CHKMSG) $(CHKMSGFLAGS) $(LIBSRCS) $(CHKSRCS)
121 108
122 109 $(BLTDEFS) + \
123 110 $(BLTDATA): $(SGSMSGTARG)
124 111 $(SGSMSG) $(SGSMSGFLAGS2) $(SGSMSGTARG)
125 112
126 113 $(BLTMESG): $(SGSMSGALL)
127 114 $(SGSMSG) $(SGSMSGFLAGS1) $(SGSMSGALL)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX