Print this page
crt: Need a position-independent CRT for PIE
- Implement the greatest possible part of the crt1 in C
- Implement SPARC versions of the ASM sections of crt1
- Build crt1 position-independently, minor ASM updates to be position
independent
- Implement crt1 with the hook expected by modern GCC to support
profiling, make gcrt1 a symlink for source compatibility (older GCC
initializes profiling at firsnt use of _mcount if necessary, so
doesn't need the gcrt)
- Split the CRT out of developer/library/lint into a separate c-runtime package
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/ed/Makefile
+++ new/usr/src/cmd/ed/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 2008 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 #
25 25
26 26 PROG= ed
27 27 XPG4PROG= ed
28 28 XPG6PROG= ed
29 29
30 30 EDOBJ= ed.o compile.o
31 31 XPG4EDOBJ= edobjs.xpg4/ed.o edobjs.xpg4/compile.o values-xpg4.o
32 32 XPG6EDOBJ= edobjs.xpg6/ed.o edobjs.xpg6/compile.o values-xpg6.o
33 33 OBJS= $(EDOBJ) $(XPG4EDOBJ) $(XPG6EDOBJ)
34 34 SRCS= ./ed.c ../expr/compile.c
35 35
36 36 POFILES= $(EDOBJ:%.o=%.po)
37 37
38 38 include ../Makefile.cmd
39 39
40 40 CFLAGS += $(CCVERBOSE)
41 41 CERRWARN += -_gcc=-Wno-parentheses
42 42 CERRWARN += -_gcc=-Wno-unused-variable
43 43 CERRWARN += -_gcc=-Wno-unused-function
44 44 CERRWARN += -_gcc=-Wno-uninitialized
45 45 $(XPG4) := CFLAGS += -DXPG4
46 46 $(XPG6) := CFLAGS += -DXPG6 -I$(SRC)/lib/libc/inc
47 47 lint := LDLIBS += -lgen -lcrypt
48 48 LDLIBS += -lmapmalloc -lgen -lcrypt_i
49 49 XGETFLAGS += -a -x ed.xcl
50 50
51 51 MAPFILE.INT = ../expr/mapfile-intf
52 52 LDFLAGS += $(MAPFILE.INT:%=-M%)
53 53
54 54 POFILE= ed_cmd.po
55 55
56 56 %.po: ../expr/%.c
57 57 $(COMPILE.cpp) $< > $*.c.i
58 58 $(XGETTEXT) $(XGETFLAGS) $*.c.i
59 59 $(MV) messages.po $@
60 60
61 61 .KEEP_STATE:
62 62
63 63 all: $(PROG) $(XPG4) $(XPG6)
64 64
65 65 $(PROG): $(EDOBJ) $(MAPFILE.INT)
66 66 $(LINK.c) $(EDOBJ) -o $@ $(LDLIBS)
67 67 $(POST_PROCESS)
68 68
69 69 $(XPG4): edobjs.xpg4 $(XPG4EDOBJ) $(MAPFILE.INT)
70 70 $(LINK.c) $(XPG4EDOBJ) -o $@ $(LDLIBS)
71 71 $(POST_PROCESS)
72 72
73 73 $(XPG6): edobjs.xpg6 $(XPG6EDOBJ) $(MAPFILE.INT)
74 74 $(LINK.c) $(XPG6EDOBJ) -o $@ $(LDLIBS)
75 75 $(POST_PROCESS)
76 76
77 77 compile.o: ../expr/compile.c
78 78 $(COMPILE.c) -o $@ ../expr/compile.c
79 79
80 80 edobjs.xpg4/%.o: %.c
81 81 $(COMPILE.c) -o $@ $<
82 82
83 83 edobjs.xpg4/%.o: ../expr/compile.c
84 84 $(COMPILE.c) -o $@ $<
85 85
86 86 edobjs.xpg6/%.o: %.c
87 87 $(COMPILE.c) -o $@ $<
88 88
89 89 edobjs.xpg6/%.o: ../expr/compile.c
90 90 $(COMPILE.c) -o $@ $<
91 91
92 92 edobjs.xpg4:
93 93 -@mkdir -p $@
94 94
95 95 edobjs.xpg6:
↓ open down ↓ |
95 lines elided |
↑ open up ↑ |
96 96 -@mkdir -p $@
97 97
98 98 $(POFILE): $(POFILES)
99 99 $(RM) $@
100 100 cat $(POFILES) > $@
101 101
102 102 install: all $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTXPG6PROG)
103 103 $(RM) $(ROOTBIN)/red
104 104 $(LN) $(ROOTBIN)/ed $(ROOTBIN)/red
105 105
106 -values-xpg4.o: ../../lib/common/common/values-xpg4.c
107 - $(COMPILE.c) -o $@ ../../lib/common/common/values-xpg4.c
106 +values-xpg4.o: ../../lib/crt/common/values-xpg4.c
107 + $(COMPILE.c) -o $@ ../../lib/crt/common/values-xpg4.c
108 108
109 -values-xpg6.o: ../../lib/common/common/values-xpg6.c
110 - $(COMPILE.c) -o $@ ../../lib/common/common/values-xpg6.c
109 +values-xpg6.o: ../../lib/crt/common/values-xpg6.c
110 + $(COMPILE.c) -o $@ ../../lib/crt/common/values-xpg6.c
111 111
112 112 clean:
113 113 -@rm -rf $(OBJS) $(XPG4) $(XPG6) edobjs.xpg4 edobjs.xpg6 \
114 114 compile.c.i
115 115
116 116 lint: lint_PROG
117 117
118 118 include ../Makefile.targ
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX