Using HP Code Advisor in Application Builds: [HP Code Advisor] White Paper
9
Method 3: Using compiler wrappers
It is common in several build environments for compilers to be invoked through wrappers. Since
cadvise will not be able to recognize this wrapper as a supported compiler, you need to use the –
compiler to specify the name of the actual compiler being used from within the wrapper.
For example:
If the compiler wrapper being used is a shell script named my_aCC, which performs other
operations and then invokes aCC for the actual compilation, then cadvise should be prefixed
to myaCC as follows
$cadvise –pdb YourApplication.pdb –compiler aCC my_aCC <compiler-
options>
• In case your compiler wrapper also sets some compiler options, then instead of modifying the
make file modify the wrapper, such that cadvise is invoked from within the wrapper where it has
visibility to all compiler options being used.
For example:
If the compiler wrapper appends the 64-bit mode compilation option while it invokes the
compiler within itself as shown below:
$ cat my_aCC_bit_64bit
#! /bin/ksh
aCC +DD64 $@
The +DD64 option is then visible to cadvise from outside the wrapper. Therefore, you can
modify the wrapper as:
$ cat my_aCC_bit_64bit
#! /bin/ksh
cadvise –pdb YourApplication.pdb aCC +DD64 $@
For more information
www.hp.com/go/cadvise
© Copyright 2009 Hewlett-Packard Development Company, L.P. The information
contained herein is subject to change without notice. The only warranties for HP
products and services are set forth in the express warranty statements
accompanying such products and services. Nothing herein should be construed as
constituting an additional warranty. HP shall not be liable for technical or editorial
errors or omissions contained herein.
Linux is a U.S. registered trademark of Linus Torvalds. Microsoft and Windows are
U.S. registered trademarks of Microsoft Corporation. UNIX is a registered
trademark of The Open Group.
September 2009