Supporting --enable-version-specific-runtime-libs

markh@landmark.com markh@landmark.com
Mon Oct 16 10:04:00 GMT 2000


Benjamin,

   First, let me point out that I have not submitted patch files for
   generated files 'configure', 'Makefile.in', 'config.h.in', or
   'src/Makefile.in'.  I have assumed that you will be generating these
   new files based on the source file changes I am submitting.  Is that
   assumption correct?

   Below are the three items you requested.

1) Here is the entry for ChangeLog that you requested.  You didn't
   specify that you wanted a patch file.  Let me know if you would
   prefer that and I will send it instead.

2000-10-14   Mark Harig <mharig@landmark.com>

	* configure.in: Added support for processing the configuration
	switches "--with-gxx-include-dir" and
	"--enable-version-specific-runtime-libs"

	* Makefile.am: Deleted the obsolete macro definition of
	"gxx_include_dir".

	* src/Makefile.am: Added conditional code for supporting the
	installation of libraries and header files into
	compiler version-specific directories.

        * docs/configopts.html: Added documentation for the
	"--enable-version-specific-runtime-libs" and
	"--with-gxx-include-dir" configuration switches.

2) Why did I change USE_LIBDIR to USING_CROSS_COMPILER?  I changed it
   because I couldn't easily make sense of the connection between (not)
   specifying the configuration switch '--with-cross-host' and
   USE_LIBDIR.

   Here is the new version of the cross-compiler / multilib /
   version-specific run-time-libs conditional code in src/Makefile.in.
   If '--with-cross-host' is specified at configuration, then
   USING_CROSS_COMPILER is defined.  (Similarly, if
   '--enable-version-specific-runtime-libs' is specified, then
   VERSION_SPECIFIC_LIBS is defined.)

   Note: automake would not support using indentation of the code for
   readability.  If you add indentation to Makefile.am, then the
   generated Makefile.in lacks the lines that were indented.  That's a
   problem for automake for another time. :)

# Cross compiler and multilib support.
# Install a library built with a cross compiler in tooldir, not libdir.
if USING_CROSS_COMPILER
toolexecdir = $(exec_prefix)/$(target_alias)
toolexeclibdir = $(exec_prefix)/$(target_alias)/lib$(MULTISUBDIR)
else
if VERSION_SPECIFIC_LIBS
gcc_version = @gcc_version@
toolexecdir = $(libdir)/gcc-lib/$(target_alias)
toolexeclibdir = $(toolexecdir)/$(gcc_version)
else
toolexeclibdir = $(libdir)$(MULTISUBDIR)
endif
endif

   Consider if we revert to using USE_LIBDIR, but continue to support
   version-specific run-time libraries.  Our code in Makefile.in would
   be the following:

# Cross compiler and multilib support.
# Install a library built with a cross compiler in tooldir, not libdir.
if USE_LIBDIR
if VERSION_SPECIFIC_LIBS
gcc_version = @gcc_version@
toolexecdir = $(libdir)/gcc-lib/$(target_alias)
toolexeclibdir = $(toolexecdir)/$(gcc_version)
else
toolexeclibdir = $(libdir)$(MULTISUBDIR)
endif
else
toolexecdir = $(exec_prefix)/$(target_alias)
toolexeclibdir = $(exec_prefix)/$(target_alias)/lib$(MULTISUBDIR)
endif

   When I attempt to read the code that follows the comments, it's not
   nearly as clear that the final else-clause is selected when the user
   has specified '--with-cross-host' during configuration.  In fact,
   the comments appear to indicate the opposite, or at least they did
   to me.  That's why I switched the variable name and usage, so that
   the next time someone has to make a change, they'll more easily be
   able to follow the connection between configure.in, Makefile.am, and
   Makefile.in.

   If you would still prefer to have USE_LIBDIR, let me know, or feel
   free to make the changes to configure.in, Makefile.am, and
   Makefile.in.

3) Here is the patch for docs\configopts.html to add documentation for
   the "new" switches.  It is mostly borrowed from the documentation
   that gcc 2.95.2 provides for these options.

=========== libstdc++-2.90.8/docs/configopts.html patch ============

*** configopts.html	Mon Oct 16 12:16:07 2000
--- configopts.html.new	Mon Oct 16 12:47:56 2000
***************
*** 87,92 ****
--- 87,104 ----
          the global namespace.
       </P>
  
+  <DT><TT>--enable-version-specific-runtime-libs  </TT>
+  <DD><P>Specify that run-time libraries should be installed in the
+        compiler-specific subdirectory (i.e.,
+        <TT>$(libdir)/gcc-lib/$(target_alias)/$(gcc_version)</TT>)
+        instead of <TT>$(libdir)</TT>.  This option is useful if you
+        intend to use several versions of gcc in parallel.  In addition,
+        libstdc++'s include files will be installed in
+        <TT>$(libdir)/gcc-lib/$(target_alias)/$(gcc_version)/include/g++</TT>,
+        unless you also specify
+        <TT>--with-gxx-include-dir=_dirname_</TT> during configuration.
+      </P>
+ 
   <DT><TT>--enable-threads  </TT>
   <DD><P>This is an abbreviated form of <TT>'--enable-threads=yes'</TT>
          (described next).
***************
*** 116,121 ****
--- 128,139 ----
          set to <TT> '../..' </TT>, so that building
          the complete GCC sources with libstdc++-v3 in place works
          transparently.
+      </P>
+ 
+  <DT><TT>--with-gxx-include-dir=_dirname_ </TT>
+  <DD><P>Specify the installation directory for g++ header files. The
+         default is <TT>$(prefix)/include/g++</TT>.  Normally, you
+         should not need to use this option.
       </P>
  
  <!--

========= end of docs/configopts.html patch ==============

-- 
## Mark Harig
## Landmark Systems, Reston, Virginia, USA
## Email: mharig@landmark.com


More information about the Libstdc++ mailing list