Re: strange choice of compiler on HP-UX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andreas Schwab wrote:
> Joao Miguel Ferreira writes:
> > Question: How do I tell the tools to use only aCC for both types of
> > files, when compiling on an HPUX (we also build on Linux/gcc and
> > Solaris/gcc) ?

If the optional native HP ANSI C compiler is installed and 'cc' is a
symlink to it then compiling C files with 'cc' and C++ files with
'aCC' should be fine, right?  If not then it would be the code with
the errors for not creating the proper external declarations.

As I read your issue what you are really asking is to force C code to
be compiled as C++ and name mangled in the same way avoiding the need
for extern "C" declarations.

> ./configure CC=foo CXX=bar

*I* would probably use the following and code in the appropriate
 extern C declarations.

  ./configure CC=cc CFLAGS="-Ae -g" CXX=aCC CXXFLAGS="-g"

But if you simply want to call C files C++ and force using the aCC C++
compiler for C files too then this should do it.

  ./configure CC=aCC CXX=aCC

> > PS: the cc is a link in /usr/bin that point to /opt/ansic/bin/cc !!! I
> > am not root of this system :-(
> 
> You don't need to be root to change PATH.

Since on HP-UX with the optional HP ANSI C compiler installed 'cc' is
a symlink in /usr/bin and also /bin on HP-UX is a symlink to /usr/bin
resulting in a single large bin directory with everything in it all in
one place so it would be difficult to change this by adjusting PATH.

Bob


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux