HP-UX uses cc -y and cc -g (-y and -g options) C compilation


 
Thread Tools Search this Thread
Operating Systems HP-UX HP-UX uses cc -y and cc -g (-y and -g options) C compilation
# 1  
Old 07-10-2017
HP-UX uses cc -y and cc -g (-y and -g options) C compilation

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

Code:
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?

Thank You in advance.

Moderator's Comments:
Mod Comment Use code tags please, thanks.

Last edited by zaxxon; 07-10-2017 at 08:03 AM.. Reason: code tags
# 2  
Old 07-10-2017
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)
Code:
swlist -l product | grep -i compiler

The default (bundled) C-compiler has got a man page
Code:
man cc_bundled

It does not have -y and -g options.
See also this URL (that I googled).

Last edited by MadeInGermany; 07-10-2017 at 03:20 PM.. Reason: URL
This User Gave Thanks to MadeInGermany For This Post:
# 3  
Old 07-11-2017
Thank you for our reply.

I agree with your answer, but we were compiling pro*c source code by using makefile on unix, that has cc -y option and it was compiling as expected.

Please guide me on it.
# 4  
Old 07-11-2017
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?
# 5  
Old 07-11-2017
Hi Vbe,

Thank You for your response , as it as Pro*c code , so -y for oracle library linking only.

but I am confused what to map it for linux to make it compatible for linux
# 6  
Old 07-11-2017
Have you used the ansi option of gcc?
# 7  
Old 07-12-2017
See.. These are the parameters passed to the makefile on HP-UX.

I have to make it compatible with linux.
Code:
#### Shell unix
#
SHELL = / bin / sh

#### Compilation options:
#
OPTIONS_COMPIL =  -y-g

#### Options of linking :
#
OPTIONS_LINK = -xnolib -Bstatic

#### Compiler to use:
#
# HP / SUN
# By default we take the ANSI compiler of softbench (HP)
# To use the SUN compiler to pass as argument to make
# CC = "/ usr / ucb / cc -Xa" (ANSI + KERIGHAN mode)
#
#CC = cc -Aa
CC =/usr/bin/cc -Ae 

PROC=proc define=PROC define=__hpux 

#### Link editor
#
LD = $(CC)

#### Link editor for purification
#
PURIFY = purify /opt/SUNWspro/bin/cc -Xa

#### Archieving objects in liabraries
#
AR = ar

#### Lint (Syntactic analysis)
#
LINT = lint

#### Lint object linker
#
LDLINT = $(LINT)

#### Archieving lint object
#
ARLINT = $(LINT)

#### Generator of dependencies
#
DEPEND = makedepend

#### Command rm
#
RM = rm -f


Last edited by vbe; 07-12-2017 at 03:40 AM.. Reason: code tags not icode...
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Ubuntu

Kernel boot options removed by fault, no boot options

Hello Everyone, First of all, I highly appreciate all Linux forum members and whole Linux community. http://forums.linuxmint.com/images/smilies/icon_wink.gif. I wish you the best for all of you ! I will try to be short and concise: I am using Linux Mint 10 for 2 months on 2 ws, and all went... (3 Replies)
Discussion started by: cdt
3 Replies

2. Shell Programming and Scripting

Compilation

Hi All, Do we have a way to compile a shell program? I am using ksh/bash/sh and not CSH. Cheers Ravi (12 Replies)
Discussion started by: panyam
12 Replies

3. AIX

VIM compilation

Hi, I tried to compile vim on AIX OS. I tried all version from 6.4 to 7.2 and the effect is the same. ./configuration --prefix=/home/me OK make The make try to compile first file buffer.c ane it gived me message like this gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_ATHENA ... (2 Replies)
Discussion started by: marcintom.aviva
2 Replies

4. AIX

Problem in compilation.

Hi, I am executing the below mentioned code:- proc SQLCHECK=SEMANTICS iname=CDBInteractor.pc parse=none code=cpp cpp_suffix=cpp g++ -c main.cpp g++ -o pre_request_engine main.o -I/oracle/oracle/app/product/10g/precomp -L/oracle/oracle/app/product/10g/lib32 -lnsl -ldl And... (2 Replies)
Discussion started by: tushar_tus
2 Replies

5. Programming

C Compilation problem

Dear all I am new to C programming In response to the post cat get_time.c #include <stdlib.h> #include <sys/time.h> main() { struct timeval tv; struct timezone tz; struct tm *tm; gettimeofday(&tv, &tz); tm=localtime(&tv.tv_sec); printf("... (2 Replies)
Discussion started by: on9west
2 Replies

6. AIX

Compilation problem

hi, I first want to apologize for my poor english ! I'm a newbe on Unix system and I have to install NRPE on an AIX 5.3. I have downloaded the NRPE Source code and i need to compile them... the problem is, when I do a: ./configure --enable-command-args --disable-ssl it returns me :... (1 Reply)
Discussion started by: Cyr1us
1 Replies

7. UNIX for Dummies Questions & Answers

Compilation

Hi All, We have a C program existing in one of the folders which I have to modify a lil bit, When I'm trying to compile the program using GCC or CC command its showing as ksh: gcc: not found is that mean there is no compiler or do I have to verify for something, please advice Thank... (2 Replies)
Discussion started by: diggermf
2 Replies

8. UNIX for Dummies Questions & Answers

Compilation Options

hi, currently I have Fedora Core 7 and I use the Compiler ported with FC7. i.e "cc src.c". but I am unable to explore the Compilation Options that can be passed with cc... like cc -c and options like that.. but when I tried man cc, I did not find any mnaual page for CC.. so now how do... (2 Replies)
Discussion started by: compbug
2 Replies
Login or Register to Ask a Question