summaryrefslogtreecommitdiffstats
path: root/contrib/libstdc++/libsupc++/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libstdc++/libsupc++/Makefile.am')
-rw-r--r--contrib/libstdc++/libsupc++/Makefile.am34
1 files changed, 21 insertions, 13 deletions
diff --git a/contrib/libstdc++/libsupc++/Makefile.am b/contrib/libstdc++/libsupc++/Makefile.am
index e37613f..0a741de 100644
--- a/contrib/libstdc++/libsupc++/Makefile.am
+++ b/contrib/libstdc++/libsupc++/Makefile.am
@@ -49,7 +49,7 @@ OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
CONFIG_CXXFLAGS = \
- @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@
+ @EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @DEBUG_FLAGS@
# Warning flags to use.
WARN_CXXFLAGS = \
@@ -58,21 +58,23 @@ WARN_CXXFLAGS = \
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+GCC_INCLUDES = -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include
INCLUDES = \
- -I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include \
- $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
+ $(GCC_INCLUDES) $(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
headers = \
exception new typeinfo cxxabi.h exception_defines.h
-sources = \
+c_sources = \
cxa_demangle.c \
+ dyn-string.c
+
+sources = \
del_op.cc \
del_opnt.cc \
del_opv.cc \
del_opvnt.cc \
- dyn-string.c \
eh_alloc.cc \
eh_aux_runtime.cc \
eh_catch.cc \
@@ -92,34 +94,40 @@ sources = \
tinfo2.cc \
vec.cc
-libsupc___la_SOURCES = $(sources)
-libsupc__convenience_la_SOURCES = $(sources)
+libsupc___la_SOURCES = $(sources) $(c_sources)
+libsupc__convenience_la_SOURCES = $(sources) $(c_sources)
glibcppinstalldir = @gxx_include_dir@
glibcppinstall_HEADERS = $(headers)
LIBSUPCXX_CXXFLAGS = $(LIBSUPCXX_PICFLAGS)
-# Use special rules for pulling things out of libiberty.
+# 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_COMPILE = \
+ $(CC) $(DEFS) $(GCC_INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
cxa_demangle.c:
rm -f $@
$(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
cxa_demangle.lo: cxa_demangle.c
$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
cxa_demangle.o: cxa_demangle.c
- $(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+ $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
dyn-string.c:
rm -f $@
$(LN_S) $(toplevel_srcdir)/libiberty/dyn-string.c $@
dyn-string.lo: dyn-string.c
$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
dyn-string.o: dyn-string.c
- $(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+ $(C_COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
# LTCOMPILE is copied from LTCXXCOMPILE below.
-LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared \
- --mode=compile $(CC) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared --mode=compile $(CC) \
+ $(DEFS) $(GCC_INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
OpenPOWER on IntegriCloud