Operating System - HP-UX
1828490 Members
2233 Online
109978 Solutions
New Discussion

Compiling with HPC/ANSI C

 
Alain Coutu
Occasional Contributor

Compiling with HPC/ANSI C

We are trying to recompile an application using the HP C/ANSI C compiler under HP-UX 10.2. The application was originally compiled with the HP C compiler under HP-UX 9.03. We are passing options using the -Wx arg1[,arg2,...,argn] option where x is the compiler (suffix ccom). Where can I find documentation of what the options are? I searched the HP documentation and came out empty. I really need some help here as I cannot move forward until this issue is solved.
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: Compiling with HPC/ANSI C

Christopher Caldwell
Honored Contributor

Re: Compiling with HPC/ANSI C

man cc for cc specific options.
man ld for cc options passed to ld
Alain Coutu
Occasional Contributor

Re: Compiling with HPC/ANSI C

I had already look though the documentation online and available with the compiler. I may have misstated my question. I'm trying to find the documentation for the options passed using arg1, arg2,...argn of the -Wx arg1[,arg2,...,argn] compile option
Christopher Caldwell
Honored Contributor

Re: Compiling with HPC/ANSI C

-Wx,arglist Pass the comma-separated argument[s] in arglist to subprocess x. The -W option specification allows additional, implementation-specific options to be recognized by the compiler driver.

The x can assume one of the following values:

d Driver
p Preprocessor
c Compiler
a Assembler
l Linker

So to find out what options are available, you have to check the man page for x. Example: for the linker (l)
man ld

I use
cc -Wl,+vnocompatwarnings
to suppress compatibility warnings

You'll find +vnocompatwarnings documented in the man page for ld.
Alain Coutu
Occasional Contributor

Re: Compiling with HPC/ANSI C

The option we used is -Wc,-Nd3500,-Ns7000 -Wp,
-H250000. They do say that some of these arguments are implementation specific. Also, the example in the cc +help does mention that
-Wp, -H250000 increase the define table size. But for -Wc, I look everywhere I could think of but couldn't find any references or descriptions of the arguments. Is there another place I could look or is it a lost cause? This option was used under HP-UX 9.03 using HP C/ANSI C version and we are trying to recompile under HP-UX 10.2 using HP C/ANSI C version 10.32.30.
Kenneth Platz
Esteemed Contributor

Re: Compiling with HPC/ANSI C

Alain,

You can try checking the man pages and/or help entries for the assembler (as), linker (ld), and/or C preprocessor (cpp). These will give you appropriate options to use for -Wa, -Wl, and -Wp, respectively. You can also find information on -Wc options via the ANSI C online help (cc +help).

I hope this helps.
I think, therefore I am... I think!