Compaq C++ README | |
April 2001 |
This is the README for Version cxx-VERSION of the Compaq C++ compiler for Linux Alpha.
Compaq Computer Corporation
Houston, Texas
© 2001 Compaq Computer Corporation
COMPAQ, the Compaq logo, and Alpha, DEC, Ladebug, OpenVMS, Tru64 UNIX, and VMS are registered in the U.S. Patent and Trademark Office. All other product names mentioned herein may be trademarks or registered trademarks of their respective companies.
Compaq shall not be liable for technical or editorial errors or omissions contained herein. The information in this document is provided as is without warranty of any kind and is subject to change without notice. The warranties for Compaq products are set forth in the express limited warranty statements accompanying such products. Nothing herein should be construed as constituting an additional warranty.
Confidential computer software. Valid license from Compaq required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.
Contents |
cxx is the Compaq C++ compiler for Linux Alpha. It is a port of the same compiler that is available on the Compaq Tru64tm UNIX® and OpenVMS Alpha platforms. The compiler produces excellent optimized code for the Alpha architecture, particularly for floating-point intensive applications.
There are some specific limitations and differences relative to the C++ compiler for Tru64 UNIX, including:
The C++ compiler accepts some gcc extensions, but is primarily a ISO standard C++ compiler. The following enhancements have been made for compatibility with the GNU C++ compiler:
The Compaq C++ compiler is not link-compatible with the GNU C++ compiler. This means that object files or libraries produced with one compiler cannot be linked with object files or libraries produced with the other. The GCC documentation, "info gcc trouble Interoperation" states:
|
The following item, specified in the C++ International Standard, is not supported in Version 6.3 but will be supported in a future version:
Compaq C++ has been tested primarily under the Red Hat 6.2
Linux distribution for Alpha. It should, however, work on all
distributions with GNU libc 2.1.n and Linux kernel 2.2 or
later.
4 Contents of the Compaq C++ CD-ROM
The Compaq C++ CD-ROM contains the following software components:
Each of the components listed above is installed using the supplied Red
Hat Package Manager (RPMtm) files. Documentation files are
also provided on the CD-ROM.
5 Downloading and Installing the Kits
The Compaq C++ installation kits are available on the CD-ROM distribution and from the Compaq C++ download site after you have completed the
registration form
.
5.1 Prerequisites
Compaq C++ requires the following GNU/Linux components:
The following are optional:
When Compaq C++ was originally released, support for the Compaq C++ compiler was not included in the development tools provided by all current Linux distributions. Compaq provides replacement development tools for those distributions. Current Linux distributions should already include support for Compaq C++.
If your Linux distribution does not support Compaq C++ and Compaq does not provide suitable development tools for your distribution, you can obtain the latest version of the binutils sources that support Compaq C++ from ftp://ftp.varesearch.com/pub/support/hjl/binutils/ .
To install this version on your system, you must first build a source and binary RPM by entering a command in the following format:
rpm -ta binutils-version.tar.gz |
You can also download the latest version of gdb and build with the
libiberty
provided by the latest binutils to obtain a debugger that supports
Compaq C++.
5.2 Installation Requirements
Compaq C++ requires the following components:
The following are optional:
The versioning for libots, CPML, and Ladebug is consistent across Compaq C, C++, and Fortran compiler products. If you have already installed these packages and the packages on the download page or the distribution compact disc are not newer, there is no need to install them again. The Ladebug debugger shipped with the initial releases of Compaq C and Fortran did not support C++.
For better performance of math library routines, you should link against the cpml library instead of libm . Specifying -lm on the command line causes the cxx driver to pass -lcpml -lm to the linker. The cpml library comes in two different packages, only one of which can be installed on a given system:
The Tru64 UNIX Ladebug debugger has been ported to Linux Alpha. Ladebug is the recommended debugger for Compaq compilers. The GNU debugger (gdb) does not support Compaq C++. Compaq provides a replacement version that has minimal support for Compaq C++. You need this version only if you plan to debug Compaq C++ programs from gdb.
If you encounter problems with the Ladebug debugger, try using the -gall option. |
The installation is straightforward with rpm -i if this is the first time the package is being installed, or with rpm -U if the package is being upgraded. The libots package should be installed before either of the cpml packages - the nature of the dependency between them is not handled by rpm 's installation-order dependency checks. You can install the other packages in any order. If you have previously installed a pre-release version of the compiler with a different package name, you should erase that package (using rpm -e ) before installing the cxx package. If you are installing a Beta kit and RPM complains about the package being older, add -oldpackage to the command line.
For example, to install on an EV6 system running RedHat 6.1, on which you have not previously installed a Compaq compiler, begin by installing updated binutils (and optionally gdb), because RedHat 6.1 did not support the Compaq C++ Compiler:
rpm -U compaq_rh61_binutils-VERSION.alpha.rpm rpm -U compaq_rh61_gdb-VERSION.alpha.rpm |
Then enter the following commands:
rpm -i libots-VERSION.alpha.rpm rpm -i cpml_ev6-VERSION.alpha.rpm rpm -i ladebug-VERSION.alpha.rpm rpm -i ccc-VERSION.alpha.rpm rpm -i cxx-VERSION.alpha.rpm |
Packages other than libots contain documentation files that you can list by entering a command in the following format after the package is installed:
rpm -qd package-name |
To list the files before the package is installed, enter a command in the following format:
rpm -qdp package-name |
The command line for invoking the compiler and linker is mostly
compatible with both the
gcc
compiler and the Tru64 UNIX compiler. Where possible,
command-line options for
gcc
are translated to near-equivalents for the compiler. Options that do
not have Tru64 UNIX equivalents are silently ignored by
default. Overall, there is a reasonable probability that a makefile
that works on Linux Alpha using the
g++
compiler can be used to build the same application with the
cxx
compiler by changing only the compiler invocation command from
g++
to
cxx
. This change causes
cxx
to compile
.cxx
and
.cpp
files and
ccc
to compile
.c
files.
6.1 Simple Optimization
Having successfully built your application with cxx , you might want to try making it run faster.
Specifying the -fast option at the end of your compiler options is a good first step. By default, the -fast option tells the compiler to generate the fastest code for the machine on which the compiler is running. If you compile on an advanced processor like EV6 (for example, a DS10 machine), the code might produce "Illegal instruction" traps if you try to run it on an older machine. If you want to try some quick tuning but want to make sure the result will run on any Alpha machine, specify -fast -arch generic . You might also want to try adding -O4 to enable optimizations that could further improve performance. Be aware however, that under some conditions, these optimizations could degrade performance.
The
cxx(1)
reference page and
Using Compaq C++ for Tru64 UNIX and Linux Alpha
contain more information about optimization controls and tuning. See
the documentation section for the location and status of the
documentation in this kit.
6.2 Using GNU Development Tools with Compaq C++
In binutils, some tools demangle by default; others require that you specify the --demangle option. To use the Compaq demangler, you must also specify the --style=compaq option. The --style option was added in binutils version 2.9.5 or later and has been ported to version 2.9.1 in the released kits.
Affected tools are: ld , objdump , gprof , nm , and addr2line .
To use the Compaq demangler in gdb, specify the command
set demangle-style compaq
.
7 Documentation
The following documentation is provided in HTML format on the installed system under the directory /usr/doc/cxx-VERNOSPIN .
The
cxx(1)
reference page is derived from the
cxx(1)
reference page for Tru64 UNIX. It has been edited
significantly to reflect differences between Tru64 UNIX and
Linux Alpha behaviors.
8 Redistributing Run-Time Libraries with Applications
Users with a valid license are permitted to redistribute the libots and cpml Run-Time library packages included in the product, as follows.
If the application is linked with the -non_shared option ( -static in gcc terms), or is linked against the archive library ( .a ) form of these libraries, no redistribution is necessary (although it is permitted).
If the application is linked -call_shared ( -dynamic in gcc terms) and depends on libots.so and/or libcpml.so , then it is necessary for you to provide these libraries along with your application. The libraries should be redistributed in the form of the original RPMs (or updated versions of them) as provided by Compaq, and the users of the application should be advised to install them on the systems that will run the application.
If you redistribute
cpml_ev6
, you need to caution your users that it should only be installed on an
EV6 or newer version of the Alpha processor. The
cpml_ev5
package can be installed on any version of the Alpha
processor, but will not provide maximum performance on EV6 or newer
processors.
9 Release Notes
The following sections contain information about the current release.
9.1 Enahancements, Changes, and Problems Corrected in Version V6.3A: V6.3-010
This section describes known problems and restrictions for the Linux
Alpha operating system.
10.1 Known Problems
Known problems are as follows:
Restrictions are as follows;
#include <wctype.h> int main() { wint_t w = L'a'; #pragma message save #pragma message disable incompatibleprm towupper(w); // This statement causes the error #pragma message restore return 0; } |
The following are restrictions:
For information about downloading updates to Compaq C++, Compaq Ladebug, CPML, and related products for Linux Alpha systems, please see the following Web page:
For information about other third-party products for the Linux Alpha platform, please see the following Web page:
http://www.alphalinux.org/
13 Suggestion/Problem Reporting
The University of New Hampshire (UNH), in partnership with Compaq, is developing an innovative support network for Alpha Linux developers. UNH supports a web site and forums for Alpha Linux developers to exchange information and ask questions. Please report any problems with Compaq C++ for Alpha Linux and its components at the UNH website:
http://www.iol.unh.edu/linux/alpha/development
UNH has a direct connection to Compaq's compiler and tools development organization for fast resolution of identified technical problems. You may not receive a personal reply to your query, but we appreciate your input on the product.
Contents |