[libstdc++] Make use of runtime demangler
Franz Sirl
Franz.Sirl-kernel@lauterbach.com
Sat May 4 01:08:00 GMT 2002
On Wednesday 01 May 2002 02:17, Phil Edwards wrote:
> On Wed, May 01, 2002 at 02:03:54AM +0200, Franz Sirl wrote:
> > On Wednesday 01 May 2002 01:41, Phil Edwards wrote:
> > > Actually, we shouldn't even need the -I switches, since we're not
> > > adding them back in anywhere else, I /think/. There are probably some
> > > multilib issues here.
> >
> > We need at least -I.. to get at config.h and I don't see any multilib
> > issues here, since -I.. will be $target_alias/$multilibdir/libstdc++-v3/
>
> libstdc++-v3/config.h isn't used directly. It gets created by configure,
> but is only used once by include/Makefile.am to construct the builddir's
> include/<triplet>/bits/c++config.h, by basically cat'ing it together with
> some other stuff.
>
> So we don't need to worry about finding our config.h, we only need to find
> libiberty's config.h.
But why should we rely on libiberty's config.h if we have a local one too?
I's cc'ed a few people discussing a similar patch on gcc-patches right now.
Kaveh, do you really need the extra check for stdlib.h on your platform? On
Linux the stuff in acinclude handles that, so only a new check for string.h
is missing.
Appended the last version of the solution me and Phil aggreed on, minus our
divergence on which config.h to use :-).
Franz.
* libsupc++/Makefile.am (DEFS): New.
(LTCOMPILE): Use COMPILE + DEBUG_FLAGS.
(LTCXXCOMPILE): Use CXXCOMPILE + DEBUG_FLAGS.
* src/Makefile.am (DEFS): New.
(LTCXXCOMPILE): Use CXXCOMPILE + DEBUG_FLAGS.
-------------- next part --------------
Index: libsupc++/Makefile.am
===================================================================
RCS file: /cvsroot/gcc/gcc/libstdc++-v3/libsupc++/Makefile.am,v
retrieving revision 1.29.8.1
diff -u -p -r1.29.8.1 Makefile.am
--- libsupc++/Makefile.am 1 Apr 2002 22:09:28 -0000 1.29.8.1
+++ libsupc++/Makefile.am 4 May 2002 08:02:04 -0000
@@ -55,6 +55,9 @@ CONFIG_CXXFLAGS = \
WARN_CXXFLAGS = \
@WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
+# we need DEFS without -I$(srcdir) and -I.
+DEFS = @DEFS@ -I..
+
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
@@ -118,8 +121,7 @@ dyn-string.o: dyn-string.c
# LTCOMPILE is copied from LTCXXCOMPILE below.
LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared \
- --mode=compile $(CC) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+ --mode=compile $(COMPILE) @DEBUG_FLAGS@
# AM_CXXFLAGS needs to be in each subdirectory so that it can be
@@ -136,7 +138,7 @@ AM_CXXFLAGS = \
# libstdc++ libtool notes
-# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# 1) Need to explicitly set LTCXXCOMPILE so that DEBUG_FLAGS is
# last. (That way, things like -O2 passed down from the toplevel can
# be overridden by --enable-debug.)
@@ -156,8 +158,7 @@ AM_CXXFLAGS = \
# We have to put --tag disable-shared after --tag CXX lest things
# CXX undo the affect of disable-shared.
LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
- --mode=compile $(CXX) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+ --mode=compile $(CXXCOMPILE) @DEBUG_FLAGS@
# 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
Index: src/Makefile.am
===================================================================
RCS file: /cvsroot/gcc/gcc/libstdc++-v3/src/Makefile.am,v
retrieving revision 1.103.2.2
diff -u -p -r1.103.2.2 Makefile.am
--- src/Makefile.am 25 Mar 2002 21:02:24 -0000 1.103.2.2
+++ src/Makefile.am 4 May 2002 08:02:04 -0000
@@ -47,6 +47,9 @@ CONFIG_CXXFLAGS = \
WARN_CXXFLAGS = \
@WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
+# we need DEFS without -I$(srcdir) -I.
+DEFS = @DEFS@ -I..
+
# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
@@ -122,7 +125,7 @@ AM_CXXFLAGS = \
# libstdc++ libtool notes
-# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# 1) Need to explicitly set LTCXXCOMPILE so that DEBUG_FLAGS is
# last. (That way, things like -O2 passed down from the toplevel can
# be overridden by --enable-debug.)
@@ -138,8 +141,7 @@ AM_CXXFLAGS = \
# 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
-LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
- $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXXCOMPILE) @DEBUG_FLAGS@
# 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
More information about the Libstdc++
mailing list