This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libstdc++-v3 + libstdc++ + libio + CVS gcc



Last week Martin suggested integrating libstdc++-v3 into the CVS gcc
repository, and using a configure-time switch to choose between
libstdc++-v2 (the default) or libstdc++-v3. Here's a patch that
implements this, using --enable-libstdcxx-v3 as a starting point.

I was not able to do this in such a way that both can be configured
and built, but only one installed. Sorry Jason. If you can figure it
out, please let me know. I'm also starting to think that this may not
be such a great idea, but I suppose we can get into it later if it
becomes an issue.

the goal:

 	libstdc++-v3 is placed in the CVS gcc hierarchy. This would be
 	the beginning of a transitional state, so that libstdc++-v2 and
	libstdc++-v3 would co-exist in the same source tree. Configuration
	options, passed by --enable-libstdcxx-v3 will select which
        library is installed.

 	it should be possible to configure both libstdc++-v2 and
	libstdc++-v3, but only install one of them. 
	(I've looked at this, and can't see how to accomplish this
	given the current top-level cygnus script. I'm also not convinced that
	this is such a wise idea.)

 	the default configuration must not change, ie. must remain
	libstdc++-v2

	current CVS directory names must not be changed. Thus, the
	directory names in question will be "libstdc++," "libio," and
	"libstdc++-v3"

	libstdc++-v3 is to be built with namespaces enabled. This is
	currently passed achieved with passing -fhonor-std in on the
	library compiles, and then recompiling libgcc.a : however,
	weird dependency issues between libstdc++ and libgcc make this
	complicated. Choices are:

	  Perhaps flag_honor_std should be enabled by default?
	  (This would change existing behavior though.)

	  Perhaps --enable flag should flip a switch and define this?
	  Could do something ugly and define
	  int flag_honor_std = _GPP_ENABLE_NAMESPACES;
          Where this macro is determined at configure time, as
          config.h is included in gcc/cp/decl2.c

	  Perhaps the relevant autoconf hackery should go into the gcc
	  configure.in and cp/Make-lang.in files and "-fhonor-std"
	  should just be passed as a flag when building the relevant
	  g++/cc1plus items. This is easier to to to. (This is also
	  what was done. Note that this approach is what
	  --enable-new-gxx-abi also uses.)


the patches:

(to follow as 3 separate patches, to the ./, ./gcc, and ./gcc/cp
directories.)



-benjamin

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]