Print this page
OS-7095 Want risc-v disassembler
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/lib/libdisasm/Makefile.com
+++ new/usr/src/lib/libdisasm/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
|
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
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 2007 Sun Microsystems, Inc. All rights reserved.
23 23 # Use is subject to license terms.
24 24 # Copyright 2012 Joshua M. Clulow <josh@sysmgr.org>
25 25 # Copyright 2015 Nexenta Systems, Inc. All rights reserved.
26 +# Copyright (c) 2018, Joyent, Inc.
26 27 #
27 28
28 29 #
29 30 # The build process for libdisasm is sightly different from that used by other
30 31 # libraries, because libdisasm must be built in two flavors - as a standalone
31 32 # for use by kmdb and as a normal library. We use $(CURTYPE) to indicate the
32 33 # current flavor being built.
33 34 #
34 35
35 36 LIBRARY= libdisasm.a
36 37 STANDLIBRARY= libstanddisasm.so
37 38 VERS= .1
38 39
39 40 # By default, we build the shared library. Construction of the standalone
40 41 # is specifically requested by architecture-specific Makefiles.
41 42 TYPES= library
42 43 CURTYPE= library
43 44
44 45 COMDIR= $(SRC)/lib/libdisasm/common
45 46
46 47 #
47 48 # Architecture-independent files
48 49 #
49 50 SRCS_common= $(COMDIR)/libdisasm.c
50 51 OBJECTS_common= libdisasm.o
|
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
51 52
52 53 #
53 54 # Architecture-dependent disassembly files
54 55 #
55 56 SRCS_i386= $(COMDIR)/dis_i386.c \
56 57 $(SRC)/common/dis/i386/dis_tables.c
57 58 SRCS_sparc= $(COMDIR)/dis_sparc.c \
58 59 $(COMDIR)/dis_sparc_fmt.c \
59 60 $(COMDIR)/dis_sparc_instr.c
60 61 SRCS_s390x= $(COMDIR)/dis_s390x.c
62 +SRCS_riscv= $(COMDIR)/dis_riscv.c
61 63
62 64 OBJECTS_i386= dis_i386.o \
63 65 dis_tables.o
64 66 OBJECTS_sparc= dis_sparc.o \
65 67 dis_sparc_fmt.o \
66 68 dis_sparc_instr.o
67 69 OBJECTS_s390x= dis_s390x.o
70 +OBJECTS_riscv= dis_riscv.o
68 71
69 72 #
70 73 # We build the regular shared library with support for all architectures.
71 74 # The standalone version should only contain code for the native
72 75 # architecture to reduce the memory footprint of kmdb.
73 76 #
74 77 OBJECTS_library= $(OBJECTS_common) \
75 78 $(OBJECTS_i386) \
76 79 $(OBJECTS_sparc) \
77 - $(OBJECTS_s390x)
80 + $(OBJECTS_s390x) \
81 + $(OBJECTS_riscv)
78 82 OBJECTS_standalone= $(OBJECTS_common) \
79 83 $(OBJECTS_$(MACH))
80 84 OBJECTS= $(OBJECTS_$(CURTYPE))
81 85
82 86 include $(SRC)/lib/Makefile.lib
83 87
84 88 SRCS_library= $(SRCS_common) \
85 89 $(SRCS_i386) \
86 90 $(SRCS_sparc) \
87 - $(SRCS_s390x)
91 + $(SRCS_s390x) \
92 + $(SRCS_riscv) \
88 93 SRCS_standalone= $(SRCS_common) \
89 94 $(SRCS_$(MACH))
90 95 SRCS= $(SRCS_$(CURTYPE))
91 96
92 97 #
93 98 # Used to verify that the standalone doesn't have any unexpected external
94 99 # dependencies.
95 100 #
96 101 LINKTEST_OBJ = objs/linktest_stand.o
97 102
98 103 CLOBBERFILES_standalone = $(LINKTEST_OBJ)
99 104 CLOBBERFILES += $(CLOBBERFILES_$(CURTYPE))
100 105
101 106 LIBS_standalone = $(STANDLIBRARY)
102 107 LIBS_library = $(DYNLIB) $(LINTLIB)
103 108 LIBS = $(LIBS_$(CURTYPE))
104 109
105 110 MAPFILES = $(COMDIR)/mapfile-vers
106 111
107 112 LDLIBS += -lc
108 113
109 114 LDFLAGS_standalone = $(ZNOVERSION) $(BREDUCE) -dy -r
110 115 LDFLAGS = $(LDFLAGS_$(CURTYPE))
111 116
112 117 ASFLAGS_standalone = -DDIS_STANDALONE
113 118 ASFLAGS_library =
114 119 ASFLAGS += -P $(ASFLAGS_$(CURTYPE)) -D_ASM
115 120
116 121 $(LINTLIB) := SRCS = $(COMDIR)/$(LINTSRC)
117 122
118 123 CERRWARN += -_gcc=-Wno-parentheses
119 124 CERRWARN += -_gcc=-Wno-uninitialized
120 125
121 126 # We want the thread-specific errno in the library, but we don't want it in
122 127 # the standalone. $(DTS_ERRNO) is designed to add -D_TS_ERRNO to $(CPPFLAGS),
123 128 # in order to enable this feature. Conveniently, -D_REENTRANT does the same
124 129 # thing. As such, we null out $(DTS_ERRNO) to ensure that the standalone
125 130 # doesn't get it.
126 131 DTS_ERRNO=
127 132
128 133 CPPFLAGS_standalone = -DDIS_STANDALONE -I$(SRC)/cmd/mdb/common
129 134 CPPFLAGS_library = -D_REENTRANT
130 135 CPPFLAGS += -I$(COMDIR) $(CPPFLAGS_$(CURTYPE))
131 136
132 137 # For the x86 disassembler we have to include sources from usr/src/common
133 138 CPPFLAGS += -I$(SRC)/common/dis/i386 -DDIS_TEXT
134 139
135 140 CFLAGS_standalone = $(STAND_FLAGS_32)
136 141 CFLAGS_common =
137 142 CFLAGS += $(CFLAGS_$(CURTYPE)) $(CFLAGS_common)
138 143
139 144 CFLAGS64_standalone = $(STAND_FLAGS_64)
140 145 CFLAGS64 += $(CCVERBOSE) $(CFLAGS64_$(CURTYPE)) $(CFLAGS64_common)
141 146
142 147 CSTD = $(CSTD_GNU99)
143 148
144 149 DYNFLAGS += $(ZINTERPOSE)
145 150
146 151 .KEEP_STATE:
|
↓ open down ↓ |
49 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX