Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - qcc error with option -Wp,-MD and multiple source files: (3 Items)
   
qcc error with option -Wp,-MD and multiple source files  
Hi, 

I'm trying to compile multiple source files with qcc and automatic dependency rules generation. 

A simple test setup with 2 empty 2 files, each including a single header and using: 

C:/QNX650/host/win32/x86/usr/bin/qcc -Vgcc_ntoppc -c -O -Wc,-Wall -Wp,-MD -EB c1.c c2.c

gives me: 

cc1: error: C:/QNX650/target/qnx6/usr/include: No such file or directory
cc: C:/QNX650/host/win32/x86/usr/lib/gcc/powerpc-unknown-nto-qnx6.5.0/4.4.2/cc1
caught signal 1

the (seemingly) equivalent: 

C:\Temp\ctest>C:/QNX650/host/win32/x86/usr/bin/ntoppc-gcc.exe -c -O -Wall -MD -EB c1.c c2.c

works and creates c1.d / c1.o and c2.d / c2.o as expected. 

Can anybody help me out how to get it working with qcc.exe ? 

Thanks. 
Christopher

Re: qcc error with option -Wp,-MD and multiple source files  
On 11-05-06 10:19 AM, Christopher Pohl wrote:
> Hi,
>
> I'm trying to compile multiple source files with qcc and automatic
> dependency rules generation.
>
> A simple test setup with 2 empty 2 files, each including a single header
> and using:
>
> C:/QNX650/host/win32/x86/usr/bin/qcc -Vgcc_ntoppc -c -O -Wc,-Wall
> -Wp,-MD -EB c1.c c2.c
>
> gives me:
>
> cc1: error: C:/QNX650/target/qnx6/usr/include: No such file or directory
> cc:
> C:/QNX650/host/win32/x86/usr/lib/gcc/powerpc-unknown-nto-qnx6.5.0/4.4.2/cc1
> caught signal 1
>
> the (seemingly) equivalent:
>
> C:\Temp\ctest>C:/QNX650/host/win32/x86/usr/bin/ntoppc-gcc.exe -c -O
> -Wall -MD -EB c1.c c2.c
>
> works and creates c1.d / c1.o and c2.d / c2.o as expected.
>
> Can anybody help me out how to get it working with qcc.exe ?

The gcc driver does some expansion of the arg and -MD option gets down 
to the processor as "-MD <filename>.d". Since you're passing -MD 
directly to the preprocessor there is no expansion and the preprocessor 
is treating the following option as the argument. You could the 
expansion if you're compiling a single source file and name the dep file 
yourself. i.e. -Wp,-MD,c1.d but this won't work if you're compiling 
multiple source files per invocation.

Regards,

Ryan Mansfield
Re: qcc error with option -Wp,-MD and multiple source files  
Thanks, Ryan. 

> You could the  expansion if you're compiling a single source file and 
> name the dep file yourself. i.e. -Wp,-MD,c1.d 

That works. 

> but this won't work if you're compiling multiple source files per invocation.

We've been explicitly trying to compile multiple source files per invocation since that makes a huge performance 
difference. 

Christopher.