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