Building GCC/libraries to support "guiding declarations"

James W. Durkin jwd@graphics.cornell.edu
Tue Dec 14 14:17:00 GMT 1999


Although this is a rather specific question, I guess it generalizes to

  "How do you build new versions of the GCC libraries after successfully
   building and installing the compiler, WITHOUT doing yet another `make
   bootstrap'?"

According to the INFO pages documenting GCC's C++ compiler options, in
order to properly support the -fguiding-decls compiler flag, I need to
take into account the following:

  "Like all options that change the ABI, all C++ code, *including
   libgcc.a* must be built with the same setting of this option."

I guess this implies that I need to build new versions of the GCC
libraries that include any C++ code.  Certainly libstdc++.  And (I
guess) libgcc too.  Now what's the best way to accomplish this?

Using GCC 2.95.2 and doing the configure/build in a directory outside
the source tree (as suggested by the latest installation
instructions), it would seems that overriding the compiler flags
(e.g., LIBCXXFLAGS) on the make invocation would do the trick.  That
doesn't seem to work though -- the flags aren't propagated down into
the compilation of the library code (using GNU make 3.78.1).

Modifying the top-level makefile that is created by "configure" to set
these flags seems to fair better, but I'm not convinced that all the
necessary flags are getting set and passed down into the bowels of the
GCC build.

Does anyone have a suggestion/solution on how to build new versions of
these libraries with appropriate control of the compiler flags used on
the library's source code?

-- 
James Durkin
jwd@graphics.cornell.edu



More information about the Gcc-help mailing list