Is g++ sensitive to its name?
Tue Sep 23 22:15:00 GMT 2003
We're seeing an odd problem with an install of GCC 3.3.1 here, and it's making us wonder if g++ is sensitive at all to the name used to invoke it - that is, if it's behavior changes any depending on what name was used to invoke it. We have it installed using special name prefixes that allow us to have builds of the compiler for different versions of Solaris installed in the same directory. For example g++ is fully qualified as "sparc-sun-solaris2.7-g++" for Solaris 7, and we have similar ones for Solaris 2.6 and 8. In addition, we have them hard linked to simpler names. In this case, there is a hard link to it named g++.5.7-3.3.1.
So, the problem we're seeing is that g++ is invoked via the link (g++.5.7-3.3.1), it compiles C code using cc1 rather than cc1plus. However, when we invoke it using sparc-sun-solaris2.7-g++, it uses cc1plus (which is what we would expect). In addition, even when using cc1, it still defines all the preprocessor macros that normally get defined for C++ code.
Has anyone seen anything like this before? Any ideas as to what might actually be going on or where to look to resolve this?
More information about the Gcc-help