HP aC++ Release Notes Version A.03.95 (5900-1789; September 2011)

HP aC++ Release Notes
New Features in Version A.03.70
Chapter 114
The mapping file is a text file that defines the mapping rules. The compiler reads the mapping file and
applies the specified replacements to the options on the command line. This minimizes the need to make
Makefile or script changes. By default, the path for the mapping file is set to the following location:
/opt/aCC/lib/option.map
You may either define the mapping rules in this file or set the mapping file path to an alternate location. To
specify an alternate location, set the CXX_MAP_FILE environment variable, like the following example:
export CXX_MAP_FILE=/home/src/my_option.map (sh/ksh)
setenv CXX_MAP_FILE /home/src/my_option.map (csh)
where:
my_option.map is the name of the new mapping file.
To disable the use of the mapping file (in spite of having one in the default location), set the above
environment variable to NULL, like the following example:
export CXX_MAP_FILE= (sh/ksh)
export CXX_MAP_FILE="" (sh/ksh)
setenv CXX_MAP_FILE "" (csh)
Defining the Mapping Rules:
Following is the syntax for defining the rules in the mapping file:
LHS => RHS (Note the space before and after "=>")
Where:
LHS is the third party compiler optio.
RHS is the HP aC++ compiler option
To define rules for options that have arguments, use the $<number> wildcard. For example, $1 for the first
argument, and $2 for the second. If the third party compiler option (LHS) does not match with any HP aC++
option, leave the RHS blank.
Example Rules:
The following example rules map gcc compiler options to corresponding HP aC++ compiler options. The
same rules can be used for mapping options from any third party compiler. The syntax for the rule becomes
as follows:
gcc_option => hp_option
-Wtraditional =>
Ignores (removes) -Wtraditional, a gcc option from the command line.
-shared => -b
Replaces -shared with -b at the command line.