Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Regarding qcc compilation flags to generate dependency files: (7 Items)
   
Regarding qcc compilation flags to generate dependency files  
Hi All,

please help me in generating dependecy files using proper flags with qcc
compiler.

why the -M flag is not working as expected with qcc ?

what is the flag in qcc similar to gcc's -M.

The compiler version, I am using is 4.2.4,gcc_ntox86        (default).

The problem is, if I compile simple "hello world" program using qcc
qcc -M -o hello hello.c is generating an executable ( not understandalbe)
file

but gcc -M -o hello.dep hello.c is generating proper dependency file as
follows

hello.o: hello.c /usr/qnx640/target/qnx6/usr/include/stdio.h \
  /usr/qnx640/target/qnx6/usr/include/sys/platform.h \
  /usr/qnx640/target/qnx6/usr/include/sys/compiler_gnu.h \
  /usr/qnx640/target/qnx6/usr/include/sys/cdefs.h \
  /usr/qnx640/target/qnx6/usr/include/x86/platform.h \
  /usr/qnx640/target/qnx6/usr/include/_pack64.h \
  /usr/qnx640/target/qnx6/usr/include/sys/target_nto.h \
  /usr/qnx640/target/qnx6/usr/include/_packpop.h
~
Please help in this regard.

Thanks,
Ramakrishna.
Re: Regarding qcc compilation flags to generate dependency files  
Rama Krishna wrote:
> Hi All,
> 
> please help me in generating dependecy files using proper flags with qcc
> compiler.
> 
> why the -M flag is not working as expected with qcc ?

Please read the qcc documentation. The -M option to qcc means generate a 
mapfile.

http://www.qnx.com/developers/docs/6.4.1/neutrino/utilities/q/qcc.html

Regards,

Ryan Mansfield
Re: Regarding qcc compilation flags to generate dependency files  
Thanks for your reply.

is it possible to generate dependency files using 4.2.4,gcc_ntox86 compiler ?
Please suggest me what is the flag in qcc similar to the -M flag in gcc.

Regards,
Ramakrishna
Re: Regarding qcc compilation flags to generate dependency files  
Rama Krishna wrote:
> Thanks for your reply.
> 
> is it possible to generate dependency files using 4.2.4,gcc_ntox86 compiler ?
> Please suggest me what is the flag in qcc similar to the -M flag in gcc.

Pass the options through to cc1/ccplus and expand the gcc driver option. 
  The following should be roughly equivalent:

gcc option        	qcc option
==========        	==========
gcc -M            	qcc -Wp,-M -E
gcc -MM            	qcc -Wp,-MM -E
gcc -M -MF<file>     	qcc -Wp,-M,-MF,<file>
gcc -M -MG        	qcc -Wp,-M,-MG -E
gcc -M -MP        	qcc -Wp,-M,-MP -E
gcc -M -MT<target>    	qcc -Wp,-M,-MT,<target> -E
gcc -M -MQ<target>    	qcc -Wp,-M,-MQ,<target> -E
gcc -MD         	qcc -Wp,-MD,<file>
gcc -MMD        	qcc -Wp,-MMD,<file>


Regards,

Ryan Mansfield
Re: Regarding qcc compilation flags to generate dependency files  
Hi Ryan,

Thanks a lot. it is working now.

Regards,
Ramakrishna
Re: Regarding qcc compilation flags to generate dependency files  
I tried -Wp,-MDD, but no .d files were produced.  I know that the flag is being passed to /QNX650.SP1/host/win32/x86/usr
/lib/gcc/arm-unknown-nto-qnx6.5.0eabi/4.4.2/cc1plus.exe, and is being accepted (because I try giving it bad flags, and 
cc1plus.exe complains).

Any idea why it is not producing .d files?
RE: Regarding qcc compilation flags to generate dependency files  
IIRC, you need to explicitly pass -Wp,-MD,dummy.d if you are using qcc/QCC as the compiler driver.

________________________________________
From: Chuck Messenger [community-noreply@qnx.com]
Sent: October-23-13 6:20 PM
To: general-toolchain
Subject: Re: Regarding qcc compilation flags to generate dependency files

I tried -Wp,-MDD, but no .d files were produced.  I know that the flag is being passed to /QNX650.SP1/host/win32/x86/usr
/lib/gcc/arm-unknown-nto-qnx6.5.0eabi/4.4.2/cc1plus.exe, and is being accepted (because I try giving it bad flags, and 
cc1plus.exe complains).

Any idea why it is not producing .d files?



_______________________________________________

General
http://community.qnx.com/sf/go/post106188
To cancel your subscription to this discussion, please e-mail general-toolchain-unsubscribe@community.qnx.com