HP aC++/HP ANSI C A.06.28 Release (769149-001, March 2014)
Syntax:
export CXX_MAP_FILE=file path
Example:
export CXX_MAP_FILE=/home/src/my_option.map
The above example specifies that HP aC++ should use mapping file from file path specified using
CXX_MAP_FILE.
Defining the Mapping Rules:
The following syntax is for defining the rules in the mapping file:
LHS => RHS
NOTE: Ensure to use a space before and after "=>".
where:
• LHS is the third party compiler option
• 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.
Use the following example to disable the use of the mapping file set the above environment variable
to NULL:
• export CXX_MAP_FILE=
• export CXX_MAP_FILE=""
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.
• -rpath-link $1 =>
Deletes -rpath-link and the arguments from the command line.
• --gccopt $1=$2 => -hpopt $2
Replaces "--gccopt option=name" at the command line with "-hpopt name".
• -gccopt $1 => +xyz
Replaces "-gccopt optionarg" at the command-line with "+xyz".
• -Bstatic => -a archive -noshared
Replaces "-Bstatic" with "-a archive -noshared".
CXX_MAP_FILE mapping environment variable for easy migration 15