Nokia Networks Home

Nokia nmake Product Builder

Quick Links

Related Products

Does HP's aCC Softbench compiler work with Nokia nmake?

aCC Supports -I-

major update 08/05/1998

At the request of the nmake Team, HP has implemented support for -I- in their aCC compiler. The Lucent Team provided technical consultation and reviewed HP's work for this feature, and we would like to thank HP for their cooperation and hard work in implementing this for us.

With this new feature nmake cpp is not needed when using aCC (see the nmake cpp faq for more information.) If you are having problems using aCC check to see if your version supports -I-. We strongly recommend using versions of aCC with -I- support, this will eliminate a lot of problems users have when using aCC with nmake.

How do I know if my version of aCC supports -I-?
Versions of aCC which support -I- describe the option in the man page. If you see -I- in your man page then you have a good version of the compiler.
My version of aCC supports -I- but our compiles still use nmake cpp.
If you upgrade aCC and your previous version did not support -I- nmake may still be working as if you were using the old version. You need to probe your new aCC compiler. See below for details.
I want to upgrade aCC from HP, what version do I ask for?
In general you should be able to ask for the latest version to get -I- support. But if you need more information one of our users who has aCC with -I- support reported the following version string from aCC for HP-UX 11.x:
$ what /opt/aCC/bin/aCC
    HP aC++ B3910B A.03.10
    HP aC++ B3910B A.03.04 (970930) Support Library
And aCC for HP-UX 10.20:
$ what /opt/aCC/bin/aCC
    HP aC++ B3910B A.01.12
    HP aC++ B3910B A.01.01 Support Library
We have upgraded aCC, now what?
If you have been using an old version of aCC then nmake must re-probe the compiler to learn it supports -I-. Once this is done the compiles will no longer use nmake cpp.
  1. Find your current probe files. The following commands will show you the paths to your probe files:
    $ probe -k C make aCC
    $ probe -k C pp aCC
  2. Backup your current probe files just to be safe. Move the files found above to a new filename, like *.old. Move the files, do not copy them; the original filenames need to be gone for the probing to take place.
  3. Probe the new compiler using the following commands (these may take several minutes):
    $ probe C make aCC
    $ probe C pp aCC
  4. Now if you look at the new make probe file you should see -I- listed with CC.DIALECT. This indicates the compiler has native support for -I-. You can list the new make probe file by running the following command:
    $ probe -l C make aCC

Old aCC Information

The following information was put together before aCC supported -I- and all below references to aCC imply this older version. This information will be left here for those who have been unable to upgrade, but we do strongly recommend everyone using aCC upgrade to the latest version with -I- support.

compile-time instantiation

The HP Softbench compiler (sometimes called aCC, check if aCC is linked to CC) Version A.01.05 introduced a new method for template instantiation, compile-time instantiation. When this option is in effect (which it is by default), nmake cpp works and provides correct viewpathing for #include "..." files. To get this to work, you need to modify the probe/C/pp so the include pragmas read:

    #pragma pp:include "/opt/aCC/include"
    #pragma pp:include "/opt/aCC/include/iostream"
    #pragma pp:include "/usr"
    #pragma pp:include "/usr/include"

The probe/C/make file should be modified to include the following for CC.STDINCLUDE:

    CC.STDINCLUDE = /opt/aCC/include          \
	            /opt/aCC/include/iostream \
	            /usr                      \

You also need to include -D-L in CCFLAGS:

    CCFLAGS = -D-L

We plan to extend probe so that aCC works automatically with nmake in the case of compile-time instantiation.

link-time instantiation

There is a bigger issue when using the HP Softbench aCC (check if CC is linked to aCC) compiler with nmake when using the compiler's link-time instantiation.

To fully understand the problem you might first want to see why nmake comes with its own cpp.

The problems arise when the compiler is recursively invoked during link-time instantiation. The first problem is that, since aCC does not accept an alternate cpp, nmake uses a shell wrapper (ppcc) that preprocesses the program to create a .i file, calls aCC to compile the .i file, and then deletes the .i file. At link time aCC is called with the .i file as argument. This call fails because the .i file no longer exists. The second problem is that, even if we could get aCC to be called with the original .c file instead of the .i file as an argument, we have no way to cause nmake cpp to be called in to properly preprocess the file.

The only workaround at this time is to use the native preprocessor instead of nmake cpp, and to have all source code in the same VPATH node, or use compile-time instantiation as described above. [Note: HP has made compile-time instantiation the default mode and is now recommending its use.]

If you must use aCC's link-time instantiation this is how to use it with nmake:

Warning: It seems some projects have "fixed" this problem by modifying the make probe file for this compiler and adding -I- to the CC.DIALECT setting. Yes, if you do this the compile errors will go away, but this has the exact same affect as setting nativepp=-1! You are just telling nmake the native preprocessor supports viewpathing and the -I- argument, which it doesn't. When nmake sees this it uses the native preprocessor instead of its own. So don't fool yourself into thinking you've fixed anything. It is safer to use nativepp, understand the issues, and do not use viewpathing.

Last Update: Friday,12-Aug-2016 10:44:23 EDT