gcc/libstdc++-v3/libsupc++/Makefile.am
Xinliang David Li 351502e271 backport: r195034 | dnovillo | 2013-01-08 12:50:44 -0800 (Tue, 08 Jan 2013) | 5 lines
Merged revisions 195034,195219,195245,195357,195374,195428,195599,195673,195809 via svnmerge from 
svn+ssh://gcc.gnu.org/svn/gcc/branches/google/integration

........  r195034 | dnovillo | 2013-01-08 12:50:44 -0800 (Tue, 08 Jan 2013) | 5 lines
  
  
  Merged revisions 194529-194531,194533,194536-194539,194546,194552,194554,194556-194560,194566-194567,194571-194576,194578-194579,194581-194584,194586-194589,194591-194594,194597,194604-194614,194616-194618,194620-194622,194625-194626,194628-194631,194633-194637,194639-194652,194655-194656,194658-194660,194663,194665-194666,194668-194672,194675-194676,194679-194683,194685,194687,194691-194692,194696,194700,194703-194706,194709,194712,194714,194717,194721-194722,194724,194726,194729-194734,194736,194738,194742-194745,194749,194751-194753,194756,194760,194762-194764,194767-194770,194773-194807,194809,194811,194815-194820,194822,194827-194829,194832-194834,194836-194840,194842-194853,194855-194858,194860-194863,194865-194870,194873,194878-194879,194881,194885-194899,194901,194903,194905-194906,194909-194910,194913-194914,194916-194920,194924,194927-194930,194936,194939-194942,194945-194950,194952-194954,194957-194958,194960-194962,194964-194969,194971-194975,194977-194980,194983 via svnmerge from 
  svn+ssh://gcc.gnu.org/svn/gcc/trunk
........  r195219 | dnovillo | 2013-01-15 13:49:35 -0800 (Tue, 15 Jan 2013) | 4 lines
  
  Merged revisions 194984,194986,194989-194992,194994,194998-194999,195002,195004-195009,195012-195013,195015,195017-195020,195023-195025,195027-195029,195033,195035-195036,195038-195039,195043,195045-195057,195060,195062,195064-195067,195072,195074-195078,195080-195089,195091-195098,195102-195107,195109-195110,195112-195113,195115,195119,195123-195125,195128 via svnmerge from 
  svn+ssh://gcc.gnu.org/svn/gcc/trunk
........  r195245 | ppluzhnikov | 2013-01-16 10:23:31 -0800 (Wed, 16 Jan 2013) | 3 lines
  
  For b/8016816, rename __google_stl_debug_string_dangling to __google_stl_debug_dangling_string to match __google_stl_debug_dangling_vector
........  r195357 | ppluzhnikov | 2013-01-21 19:33:28 -0800 (Mon, 21 Jan 2013) | 3 lines
  
  Add lightweight checks for front()/back() on empty vector.
  Google ref b/7939186
........  r195374 | ppluzhnikov | 2013-01-22 06:58:23 -0800 (Tue, 22 Jan 2013) | 5 lines
  
  Set destructed vector into an invalid state, such that
  subsequent calls to begin(), end(), size(), etc. all throw logic_error.
  
  Google ref b/7248326
........  r195428 | ppluzhnikov | 2013-01-24 07:33:13 -0800 (Thu, 24 Jan 2013) | 4 lines
  
  Catch use of destructed strings.
  
  Google ref: b/5430313
........  r195599 | dnovillo | 2013-01-30 18:24:39 -0800 (Wed, 30 Jan 2013) | 4 lines
  
  Merged revisions 195130-195134,195136-195137,195140-195147,195150-195152,195155,195158,195160-195167,195169,195172,195174,195177,195179,195184-195186,195189-195191,195194-195195,195197-195198,195203,195205,195207-195213,195215-195218,195220,195223-195231,195233,195238-195244,195247-195251,195253,195256-195257,195259-195260,195262,195266,195270-195271,195273-195277,195280-195281,195286,195288-195293,195295-195297,195299,195301-195304,195309-195314,195317-195322,195324-195326,195329-195335,195338,195341-195343,195346-195348,195350,195354-195355,195360,195364,195366-195368,195370,195375,195378,195381-195383,195386-195389,195391,195396,195398-195399,195404,195406-195414,195417,195420-195421,195423-195424,195426,195430,195432-195433,195436-195438,195441,195443,195446,195451,195459,195461-195462,195464,195467,195470-195471,195473-195475,195477-195479,195482,195485-195488,195491-195494,195500,195502-195509,195513 via svnmerge from 
  svn+ssh://gcc.gnu.org/svn/gcc/trunk
........  r195673 | dnovillo | 2013-02-01 11:04:53 -0800 (Fri, 01 Feb 2013) | 4 lines
  
  Merged revisions 195515-195517,195520,195525-195526,195530,195532-195541,195543-195548,195550-195555,195558-195560,195562,195568-195579,195582,195584-195585,195591,195598,195600,195603-195604,195607-195610,195613-195623,195627,195632,195634,195637-195638 via svnmerge from 
  svn+ssh://gcc.gnu.org/svn/gcc/trunk
........  r195809 | dnovillo | 2013-02-06 08:42:29 -0800 (Wed, 06 Feb 2013) | 4 lines
  
  Merged revisions 195640,195642,195646-195647,195660,195665-195669,195675-195676,195682-195686,195690-195694,195696-195703,195706-195707,195709,195713,195717,195719,195721-195723,195729 via svnmerge from 
  svn+ssh://gcc.gnu.org/svn/gcc/trunk
........

From-SVN: r195825
2013-02-06 22:55:05 +00:00

255 lines
8.1 KiB
Makefile

## Makefile for the GNU C++ Support library.
##
## Copyright (C) 2000-2013 Free Software Foundation, Inc.
##
## Process this file with automake to produce Makefile.in.
##
## This file is part of GCC.
##
## GCC is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3, or (at your option)
## any later version.
##
## GCC is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with GCC; see the file COPYING3. If not see
## <http://www.gnu.org/licenses/>.
include $(top_srcdir)/fragment.am
# Need this library to both be part of libstdc++.a, and installed
# separately too.
# 1) separate libsupc++.la
toolexeclib_LTLIBRARIES = libsupc++.la
# 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
noinst_LTLIBRARIES = libsupc++convenience.la
std_HEADERS = \
cxxabi.h exception initializer_list new typeinfo
bits_HEADERS = \
atomic_lockfree_defines.h cxxabi_forced.h \
exception_defines.h exception_ptr.h hash_bytes.h nested_exception.h
headers = $(std_HEADERS) $(bits_HEADERS)
if GLIBCXX_HOSTED
c_sources = \
cp-demangle.c
endif
sources = \
array_type_info.cc \
atexit_arm.cc \
atexit_thread.cc \
bad_alloc.cc \
bad_cast.cc \
bad_typeid.cc \
class_type_info.cc \
del_op.cc \
del_opsz.cc \
del_opnt.cc \
del_opv.cc \
del_opvnt.cc \
dyncast.cc \
eh_alloc.cc \
eh_arm.cc \
eh_aux_runtime.cc \
eh_call.cc \
eh_catch.cc \
eh_exception.cc \
eh_globals.cc \
eh_personality.cc \
eh_ptr.cc \
eh_term_handler.cc \
eh_terminate.cc \
eh_tm.cc \
eh_throw.cc \
eh_type.cc \
eh_unex_handler.cc \
enum_type_info.cc \
function_type_info.cc \
fundamental_type_info.cc \
guard.cc \
guard_error.cc \
hash_bytes.cc \
nested_exception.cc \
new_handler.cc \
new_op.cc \
new_opnt.cc \
new_opv.cc \
new_opvnt.cc \
pbase_type_info.cc \
pmem_type_info.cc \
pointer_type_info.cc \
pure.cc \
si_class_type_info.cc \
tinfo.cc \
tinfo2.cc \
vec.cc \
vmi_class_type_info.cc \
vterminate.cc
libsupc___la_SOURCES = $(sources) $(c_sources)
libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
cp-demangle.c:
rm -f $@
$(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
cp-demangle.lo: cp-demangle.c
$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
cp-demangle.o: cp-demangle.c
$(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
# Use special rules for the C++0x sources so that the proper flags are passed.
eh_ptr.lo: eh_ptr.cc
$(LTCXXCOMPILE) -std=gnu++0x -c $<
eh_ptr.o: eh_ptr.cc
$(CXXCOMPILE) -std=gnu++0x -c $<
eh_throw.lo: eh_throw.cc
$(LTCXXCOMPILE) -std=gnu++0x -c $<
eh_throw.o: eh_throw.cc
$(CXXCOMPILE) -std=gnu++0x -c $<
guard.lo: guard.cc
$(LTCXXCOMPILE) -std=gnu++0x -c $<
guard.o: guard.cc
$(CXXCOMPILE) -std=gnu++0x -c $<
atexit_thread.lo: atexit_thread.cc
$(LTCXXCOMPILE) -std=gnu++0x -c $<
atexit_thread.o: atexit_thread.cc
$(CXXCOMPILE) -std=gnu++0x -c $<
nested_exception.lo: nested_exception.cc
$(LTCXXCOMPILE) -std=gnu++0x -c $<
nested_exception.o: nested_exception.cc
$(CXXCOMPILE) -std=gnu++0x -c $<
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
# modified in a per-library or per-sub-library way. Need to manually
# set this option because CONFIG_CXXFLAGS has to be after
# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
# as the occasion call for it.
AM_CXXFLAGS = \
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
$(XTEMPLATE_FLAGS) \
$(WARN_CXXFLAGS) $(OPTIMIZE_CXXFLAGS) $(CONFIG_CXXFLAGS) \
$($(@)_no_omit_frame_pointer)
AM_MAKEFLAGS = \
"gxx_include_dir=$(gxx_include_dir)"
# Use special rules for pulling things out of libiberty. These
# objects should be compiled with the "C" compiler, not the C++
# compiler, and also should not use the C++ includes.
C_INCLUDES = -I.. -I$(toplevel_srcdir)/libiberty -I$(toplevel_srcdir)/include
C_COMPILE = \
$(CC) $(DEFS) $(C_INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
# LTCOMPILE is copied from LTCXXCOMPILE below.
LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared $(LIBTOOLFLAGS) --mode=compile \
$(CC) $(DEFS) $(C_INCLUDES) \
$(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
# Libtool notes
# 1) In general, libtool expects an argument such as `--tag=CXX' when
# using the C++ compiler, because that will enable the settings
# detected when C++ support was being configured. However, when no
# such flag is given in the command line, libtool attempts to figure
# it out by matching the compiler name in each configuration section
# against a prefix of the command line. The problem is that, if the
# compiler name and its initial flags stored in the libtool
# configuration file don't match those in the command line, libtool
# can't decide which configuration to use, and it gives up. The
# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
# attempt to infer which configuration to use.
#
# The second tag argument, `--tag disable-shared` means that libtool
# only compiles each source once, for static objects. In actuality,
# glibcxx_lt_pic_flag and glibcxx_compiler_shared_flag are added to
# the libtool command that is used create the object, which is
# suitable for shared libraries. The `--tag disable-shared` must be
# placed after --tag CXX lest things CXX undo the affect of
# disable-shared.
# 2) Need to explicitly set LTCXXCOMPILE so that EXTRA_CXX_FLAGS is
# last. (That way, things like -O2 passed down from the toplevel can
# be overridden by --enable-debug.)
LTCXXCOMPILE = \
$(LIBTOOL) --tag CXX --tag disable-shared \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CXX) $(TOPLEVEL_INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(EXTRA_CXX_FLAGS)
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
# 3) We'd have a problem when building the shared libstdc++ object if
# the rules automake generates would be used. We cannot allow g++ to
# be used since this would add -lstdc++ to the link line which of
# course is problematic at this point. So, we get the top-level
# directory to configure libstdc++-v3 to use gcc as the C++
# compilation driver.
CXXLINK = \
$(LIBTOOL) --tag CXX --tag disable-shared \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXX) \
$(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LTLDFLAGS) -o $@
# Install notes
# We have to have rules modified from the default to counteract SUN make
# prepending each of $(*_HEADERS) with VPATH below.
stddir = $(gxx_include_dir)
bitsdir = $(gxx_include_dir)/bits
install-stdHEADERS: $(std_HEADERS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(stddir)
@list='$(std_HEADERS)'; for p in $$list; do \
q=`echo $$p | sed -e 's,.*/,,'`; \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(stddir)/$$q"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(stddir)/$$q; \
done
install-bitsHEADERS: $(bits_HEADERS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bitsdir)
@list='$(bits_HEADERS)'; for p in $$list; do \
q=`echo $$p | sed -e 's,.*/,,'`; \
if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(bitsdir)/$$q"; \
$(INSTALL_DATA) $$d$$p $(DESTDIR)$(bitsdir)/$$q; \
done
uninstall-stdHEADERS:
@$(NORMAL_UNINSTALL)
list='$(std_HEADERS)'; for p in $$list; do \
q=`echo $$p | sed -e 's,.*/,,'`; \
rm -f $(DESTDIR)$(stddir)/$$q; \
done
uninstall-bitsHEADERS:
@$(NORMAL_UNINSTALL)
list='$(bits_HEADERS)'; for p in $$list; do \
q=`echo $$p | sed -e 's,.*/,,'`; \
rm -f $(DESTDIR)$(bitsdir)/$$q; \
done
# Google-specific pessimization
eh_terminate.lo_no_omit_frame_pointer = -fno-omit-frame-pointer
eh_throw.lo_no_omit_frame_pointer = -fno-omit-frame-pointer
vterminate.lo_no_omit_frame_pointer = -fno-omit-frame-pointer