annotate libstdc++-v3/libsupc++/Makefile.am @ 144:8f4e72ab4e11

fix segmentation fault caused by nothing next cur_op to end
author Takahiro SHIMIZU <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Sun, 23 Dec 2018 21:23:56 +0900
parents 84e7813d76e9
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ## Makefile for the GNU C++ Support library.
kono
parents:
diff changeset
2 ##
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
3 ## Copyright (C) 2000-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
4 ##
kono
parents:
diff changeset
5 ## Process this file with automake to produce Makefile.in.
kono
parents:
diff changeset
6 ##
kono
parents:
diff changeset
7 ## This file is part of GCC.
kono
parents:
diff changeset
8 ##
kono
parents:
diff changeset
9 ## GCC is free software; you can redistribute it and/or modify
kono
parents:
diff changeset
10 ## it under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
11 ## the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
12 ## any later version.
kono
parents:
diff changeset
13 ##
kono
parents:
diff changeset
14 ## GCC is distributed in the hope that it will be useful,
kono
parents:
diff changeset
15 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
16 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
17 ## GNU General Public License for more details.
kono
parents:
diff changeset
18 ##
kono
parents:
diff changeset
19 ## You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
20 ## along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
21 ## <http://www.gnu.org/licenses/>.
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 include $(top_srcdir)/fragment.am
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 # Need this library to both be part of libstdc++.a, and installed
kono
parents:
diff changeset
26 # separately too.
kono
parents:
diff changeset
27 # 1) separate libsupc++.la
kono
parents:
diff changeset
28 toolexeclib_LTLIBRARIES = libsupc++.la
kono
parents:
diff changeset
29
kono
parents:
diff changeset
30 # 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
kono
parents:
diff changeset
31 noinst_LTLIBRARIES = libsupc++convenience.la
kono
parents:
diff changeset
32
kono
parents:
diff changeset
33 std_HEADERS = \
kono
parents:
diff changeset
34 cxxabi.h exception initializer_list new typeinfo
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 bits_HEADERS = \
kono
parents:
diff changeset
37 atomic_lockfree_defines.h cxxabi_forced.h \
kono
parents:
diff changeset
38 exception_defines.h exception_ptr.h hash_bytes.h nested_exception.h exception.h cxxabi_init_exception.h
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 headers = $(std_HEADERS) $(bits_HEADERS)
kono
parents:
diff changeset
41
kono
parents:
diff changeset
42 if GLIBCXX_HOSTED
kono
parents:
diff changeset
43 c_sources = \
kono
parents:
diff changeset
44 cp-demangle.c
kono
parents:
diff changeset
45 endif
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 sources = \
kono
parents:
diff changeset
48 array_type_info.cc \
kono
parents:
diff changeset
49 atexit_arm.cc \
kono
parents:
diff changeset
50 atexit_thread.cc \
kono
parents:
diff changeset
51 bad_alloc.cc \
kono
parents:
diff changeset
52 bad_array_length.cc \
kono
parents:
diff changeset
53 bad_array_new.cc \
kono
parents:
diff changeset
54 bad_cast.cc \
kono
parents:
diff changeset
55 bad_typeid.cc \
kono
parents:
diff changeset
56 class_type_info.cc \
kono
parents:
diff changeset
57 del_op.cc \
kono
parents:
diff changeset
58 del_ops.cc \
kono
parents:
diff changeset
59 del_opnt.cc \
kono
parents:
diff changeset
60 del_opv.cc \
kono
parents:
diff changeset
61 del_opvs.cc \
kono
parents:
diff changeset
62 del_opvnt.cc \
kono
parents:
diff changeset
63 dyncast.cc \
kono
parents:
diff changeset
64 eh_alloc.cc \
kono
parents:
diff changeset
65 eh_arm.cc \
kono
parents:
diff changeset
66 eh_aux_runtime.cc \
kono
parents:
diff changeset
67 eh_call.cc \
kono
parents:
diff changeset
68 eh_catch.cc \
kono
parents:
diff changeset
69 eh_exception.cc \
kono
parents:
diff changeset
70 eh_globals.cc \
kono
parents:
diff changeset
71 eh_personality.cc \
kono
parents:
diff changeset
72 eh_ptr.cc \
kono
parents:
diff changeset
73 eh_term_handler.cc \
kono
parents:
diff changeset
74 eh_terminate.cc \
kono
parents:
diff changeset
75 eh_tm.cc \
kono
parents:
diff changeset
76 eh_throw.cc \
kono
parents:
diff changeset
77 eh_type.cc \
kono
parents:
diff changeset
78 eh_unex_handler.cc \
kono
parents:
diff changeset
79 enum_type_info.cc \
kono
parents:
diff changeset
80 function_type_info.cc \
kono
parents:
diff changeset
81 fundamental_type_info.cc \
kono
parents:
diff changeset
82 guard.cc \
kono
parents:
diff changeset
83 guard_error.cc \
kono
parents:
diff changeset
84 hash_bytes.cc \
kono
parents:
diff changeset
85 nested_exception.cc \
kono
parents:
diff changeset
86 new_handler.cc \
kono
parents:
diff changeset
87 new_op.cc \
kono
parents:
diff changeset
88 new_opnt.cc \
kono
parents:
diff changeset
89 new_opv.cc \
kono
parents:
diff changeset
90 new_opvnt.cc \
kono
parents:
diff changeset
91 new_opa.cc \
kono
parents:
diff changeset
92 new_opant.cc \
kono
parents:
diff changeset
93 new_opva.cc \
kono
parents:
diff changeset
94 new_opvant.cc \
kono
parents:
diff changeset
95 del_opa.cc \
kono
parents:
diff changeset
96 del_opant.cc \
kono
parents:
diff changeset
97 del_opsa.cc \
kono
parents:
diff changeset
98 del_opva.cc \
kono
parents:
diff changeset
99 del_opvant.cc \
kono
parents:
diff changeset
100 del_opvsa.cc \
kono
parents:
diff changeset
101 pbase_type_info.cc \
kono
parents:
diff changeset
102 pmem_type_info.cc \
kono
parents:
diff changeset
103 pointer_type_info.cc \
kono
parents:
diff changeset
104 pure.cc \
kono
parents:
diff changeset
105 si_class_type_info.cc \
kono
parents:
diff changeset
106 tinfo.cc \
kono
parents:
diff changeset
107 tinfo2.cc \
kono
parents:
diff changeset
108 vec.cc \
kono
parents:
diff changeset
109 vmi_class_type_info.cc \
kono
parents:
diff changeset
110 vterminate.cc
kono
parents:
diff changeset
111
kono
parents:
diff changeset
112 if ENABLE_VTABLE_VERIFY
kono
parents:
diff changeset
113 if !VTV_CYGMIN
kono
parents:
diff changeset
114 vtv_sources = \
kono
parents:
diff changeset
115 vtv_stubs.cc
kono
parents:
diff changeset
116 endif
kono
parents:
diff changeset
117 endif
kono
parents:
diff changeset
118
kono
parents:
diff changeset
119 libsupc___la_SOURCES = $(sources) $(c_sources) $(vtv_sources)
kono
parents:
diff changeset
120 libsupc__convenience_la_SOURCES = $(sources) $(c_sources) $(vtv_sources)
kono
parents:
diff changeset
121
kono
parents:
diff changeset
122 cp-demangle.c:
kono
parents:
diff changeset
123 rm -f $@
kono
parents:
diff changeset
124 $(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
kono
parents:
diff changeset
125 cp-demangle.lo: cp-demangle.c
kono
parents:
diff changeset
126 $(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
kono
parents:
diff changeset
127 cp-demangle.o: cp-demangle.c
kono
parents:
diff changeset
128 $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
kono
parents:
diff changeset
129
kono
parents:
diff changeset
130
kono
parents:
diff changeset
131 # Use special rules for the C++17 sources so that the proper flags are passed.
kono
parents:
diff changeset
132 new_opa.lo: new_opa.cc
kono
parents:
diff changeset
133 $(LTCXXCOMPILE) -std=gnu++1z -c $<
kono
parents:
diff changeset
134 new_opant.lo: new_opant.cc
kono
parents:
diff changeset
135 $(LTCXXCOMPILE) -std=gnu++1z -c $<
kono
parents:
diff changeset
136 new_opva.lo: new_opva.cc
kono
parents:
diff changeset
137 $(LTCXXCOMPILE) -std=gnu++1z -c $<
kono
parents:
diff changeset
138 new_opvant.lo: new_opvant.cc
kono
parents:
diff changeset
139 $(LTCXXCOMPILE) -std=gnu++1z -c $<
kono
parents:
diff changeset
140 del_opa.lo: del_opa.cc
kono
parents:
diff changeset
141 $(LTCXXCOMPILE) -std=gnu++1z -c $<
kono
parents:
diff changeset
142 del_opant.lo: del_opant.cc
kono
parents:
diff changeset
143 $(LTCXXCOMPILE) -std=gnu++1z -c $<
kono
parents:
diff changeset
144 del_opsa.lo: del_opsa.cc
kono
parents:
diff changeset
145 $(LTCXXCOMPILE) -std=gnu++1z -c $<
kono
parents:
diff changeset
146 del_opva.lo: del_opva.cc
kono
parents:
diff changeset
147 $(LTCXXCOMPILE) -std=gnu++1z -c $<
kono
parents:
diff changeset
148 del_opvant.lo: del_opvant.cc
kono
parents:
diff changeset
149 $(LTCXXCOMPILE) -std=gnu++1z -c $<
kono
parents:
diff changeset
150 del_opvsa.lo: del_opvsa.cc
kono
parents:
diff changeset
151 $(LTCXXCOMPILE) -std=gnu++1z -c $<
kono
parents:
diff changeset
152
kono
parents:
diff changeset
153 # AM_CXXFLAGS needs to be in each subdirectory so that it can be
kono
parents:
diff changeset
154 # modified in a per-library or per-sub-library way. Need to manually
kono
parents:
diff changeset
155 # set this option because CONFIG_CXXFLAGS has to be after
kono
parents:
diff changeset
156 # OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
kono
parents:
diff changeset
157 # as the occasion call for it.
kono
parents:
diff changeset
158 AM_CXXFLAGS = \
kono
parents:
diff changeset
159 $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
kono
parents:
diff changeset
160 $(XTEMPLATE_FLAGS) \
kono
parents:
diff changeset
161 $(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS)
kono
parents:
diff changeset
162
kono
parents:
diff changeset
163 AM_MAKEFLAGS = \
kono
parents:
diff changeset
164 "gxx_include_dir=$(gxx_include_dir)"
kono
parents:
diff changeset
165
kono
parents:
diff changeset
166
kono
parents:
diff changeset
167 # Use special rules for pulling things out of libiberty. These
kono
parents:
diff changeset
168 # objects should be compiled with the "C" compiler, not the C++
kono
parents:
diff changeset
169 # compiler, and also should not use the C++ includes.
kono
parents:
diff changeset
170 C_INCLUDES = -I.. -I$(toplevel_srcdir)/libiberty -I$(toplevel_srcdir)/include
kono
parents:
diff changeset
171 C_COMPILE = \
kono
parents:
diff changeset
172 $(CC) $(DEFS) $(C_INCLUDES) \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
173 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
111
kono
parents:
diff changeset
174
kono
parents:
diff changeset
175 # LTCOMPILE is copied from LTCXXCOMPILE below.
kono
parents:
diff changeset
176 LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=compile \
kono
parents:
diff changeset
177 $(CC) $(DEFS) $(C_INCLUDES) \
kono
parents:
diff changeset
178 $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
179 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS)
111
kono
parents:
diff changeset
180
kono
parents:
diff changeset
181 # Libtool notes
kono
parents:
diff changeset
182
kono
parents:
diff changeset
183 # 1) In general, libtool expects an argument such as `--tag=CXX' when
kono
parents:
diff changeset
184 # using the C++ compiler, because that will enable the settings
kono
parents:
diff changeset
185 # detected when C++ support was being configured. However, when no
kono
parents:
diff changeset
186 # such flag is given in the command line, libtool attempts to figure
kono
parents:
diff changeset
187 # it out by matching the compiler name in each configuration section
kono
parents:
diff changeset
188 # against a prefix of the command line. The problem is that, if the
kono
parents:
diff changeset
189 # compiler name and its initial flags stored in the libtool
kono
parents:
diff changeset
190 # configuration file don't match those in the command line, libtool
kono
parents:
diff changeset
191 # can't decide which configuration to use, and it gives up. The
kono
parents:
diff changeset
192 # correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
kono
parents:
diff changeset
193 # CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
kono
parents:
diff changeset
194 # attempt to infer which configuration to use.
kono
parents:
diff changeset
195 #
kono
parents:
diff changeset
196 # The second tag argument, `--tag disable-shared` means that libtool
kono
parents:
diff changeset
197 # only compiles each source once, for static objects. In actuality,
kono
parents:
diff changeset
198 # glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
kono
parents:
diff changeset
199 # the libtool command that is used create the object, which is
kono
parents:
diff changeset
200 # suitable for shared libraries. The `--tag disable-shared` must be
kono
parents:
diff changeset
201 # placed after --tag CXX lest things CXX undo the affect of
kono
parents:
diff changeset
202 # disable-shared.
kono
parents:
diff changeset
203
kono
parents:
diff changeset
204 # 2) Need to explicitly set LTCXXCOMPILE so that EXTRA_CXX_FLAGS is
kono
parents:
diff changeset
205 # last. (That way, things like -O2 passed down from the toplevel can
kono
parents:
diff changeset
206 # be overridden by --enable-debug.)
kono
parents:
diff changeset
207 LTCXXCOMPILE = \
kono
parents:
diff changeset
208 $(LIBTOOL) --tag CXX --tag disable-shared \
kono
parents:
diff changeset
209 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
kono
parents:
diff changeset
210 --mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
kono
parents:
diff changeset
211 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(EXTRA_CXX_FLAGS)
kono
parents:
diff changeset
212
kono
parents:
diff changeset
213 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
kono
parents:
diff changeset
214
kono
parents:
diff changeset
215 # 3) We'd have a problem when building the shared libstdc++ object if
kono
parents:
diff changeset
216 # the rules automake generates would be used. We cannot allow g++ to
kono
parents:
diff changeset
217 # be used since this would add -lstdc++ to the link line which of
kono
parents:
diff changeset
218 # course is problematic at this point. So, we get the top-level
kono
parents:
diff changeset
219 # directory to configure libstdc++-v3 to use gcc as the C++
kono
parents:
diff changeset
220 # compilation driver.
kono
parents:
diff changeset
221 CXXLINK = \
kono
parents:
diff changeset
222 $(LIBTOOL) --tag CXX --tag disable-shared \
kono
parents:
diff changeset
223 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
kono
parents:
diff changeset
224 --mode=link $(CXX) \
kono
parents:
diff changeset
225 $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
kono
parents:
diff changeset
226
kono
parents:
diff changeset
227 # Install notes
kono
parents:
diff changeset
228 # We have to have rules modified from the default to counteract SUN make
kono
parents:
diff changeset
229 # prepending each of $(*_HEADERS) with VPATH below.
kono
parents:
diff changeset
230 stddir = $(gxx_include_dir)
kono
parents:
diff changeset
231 bitsdir = $(gxx_include_dir)/bits
kono
parents:
diff changeset
232
kono
parents:
diff changeset
233 install-stdHEADERS: $(std_HEADERS)
kono
parents:
diff changeset
234 @$(NORMAL_INSTALL)
kono
parents:
diff changeset
235 $(mkinstalldirs) $(DESTDIR)$(stddir)
kono
parents:
diff changeset
236 @list='$(std_HEADERS)'; for p in $$list; do \
kono
parents:
diff changeset
237 q=`echo $$p | sed -e 's,.*/,,'`; \
kono
parents:
diff changeset
238 if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
kono
parents:
diff changeset
239 echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(stddir)/$$q"; \
kono
parents:
diff changeset
240 $(INSTALL_DATA) $$d$$p $(DESTDIR)$(stddir)/$$q; \
kono
parents:
diff changeset
241 done
kono
parents:
diff changeset
242
kono
parents:
diff changeset
243 install-bitsHEADERS: $(bits_HEADERS)
kono
parents:
diff changeset
244 @$(NORMAL_INSTALL)
kono
parents:
diff changeset
245 $(mkinstalldirs) $(DESTDIR)$(bitsdir)
kono
parents:
diff changeset
246 @list='$(bits_HEADERS)'; for p in $$list; do \
kono
parents:
diff changeset
247 q=`echo $$p | sed -e 's,.*/,,'`; \
kono
parents:
diff changeset
248 if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
kono
parents:
diff changeset
249 echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(bitsdir)/$$q"; \
kono
parents:
diff changeset
250 $(INSTALL_DATA) $$d$$p $(DESTDIR)$(bitsdir)/$$q; \
kono
parents:
diff changeset
251 done
kono
parents:
diff changeset
252
kono
parents:
diff changeset
253 uninstall-stdHEADERS:
kono
parents:
diff changeset
254 @$(NORMAL_UNINSTALL)
kono
parents:
diff changeset
255 list='$(std_HEADERS)'; for p in $$list; do \
kono
parents:
diff changeset
256 q=`echo $$p | sed -e 's,.*/,,'`; \
kono
parents:
diff changeset
257 rm -f $(DESTDIR)$(stddir)/$$q; \
kono
parents:
diff changeset
258 done
kono
parents:
diff changeset
259
kono
parents:
diff changeset
260 uninstall-bitsHEADERS:
kono
parents:
diff changeset
261 @$(NORMAL_UNINSTALL)
kono
parents:
diff changeset
262 list='$(bits_HEADERS)'; for p in $$list; do \
kono
parents:
diff changeset
263 q=`echo $$p | sed -e 's,.*/,,'`; \
kono
parents:
diff changeset
264 rm -f $(DESTDIR)$(bitsdir)/$$q; \
kono
parents:
diff changeset
265 done
kono
parents:
diff changeset
266
kono
parents:
diff changeset
267
kono
parents:
diff changeset
268 # By adding these files here, automake will remove them for 'make clean'
kono
parents:
diff changeset
269 CLEANFILES = stamp-*
kono
parents:
diff changeset
270