Hello Experts,
Would you please let me know what "-y " option does with cc compiler on HP-UX?
As I am migrating application from HP-UX to RHEL 5 , at the time of running makefile make -f makefilename on Rhel 5, it is throwing error
cc: unrecognized option '-y'
<command line>:1:2: error: missing '(' after predicate
main_demon_ipt.pc: In function �main�:
main_demon_ipt.pc:812: warning: return type of �main� is not �int�
make: *** [main_demon_ipt.o] Error 1
(May be it is because of gcc compiler used on Rhel5 not cc).
To map cc -y from HP-UX to Linux, I would request what "-y" is doing on HP_UX?
The options are specific to the C-compiler.
On HP-UX /usr/ccs/bin/cc is usually a link to the active one.
The following might find the installed C-compiler(s)
swlist -l product | grep -i compiler
The default (bundled) C-compiler has got a man page
man cc_bundled
It does not have -y and -g options.
See also this URL (that I googled).
Pro*c needs a true ansi-C which is not the default on HP ( K&R ) as HP ( dont know if still true as I have no recent boxes to look at...) needed a compiler for recompiling the kernel, so the ansi-C was an option ( $$ ) but I remember an package with special C-libs for oracle ( free when you had support...) which let you relink oracle stuff without having to buy the extra compiler, so would cc -y be for ansi?
I think you can remove the -g option, or perhaps change it to "-ggdb", a popular debugging format for gcc allowing you see symbols when the executable or library is used with gdb, the gnu debugger.
The -y option I'm having more trouble finding. It may refer to "static debugging info", if the HP-UX fortran manpage is relevant, or it may be a corruption of -Y, for "default location for libraries" which I doubt since no folder follows it. So remove it.