Ryan Mansfield(deleted)
|
Re: Info / help on qcc command & invocation of gcc
|
Ryan Mansfield(deleted)
07/24/2008 12:28 PM
post10947
|
Re: Info / help on qcc command & invocation of gcc
tanuj oruganti wrote:
> Hello,
>
> I have a bit of a problem that's been killing me, that I'd appreciate some help with. It is about QNX’s command qcc.
exe that invokes the compiler. I am trying to get a certain commercial static analysis tool to work with Momentics QNX c
++ projects, to analyze them. The problem seems to be that though the underlying default compiler used to build code is
gcc (a compiler supported by the tool), because of it being invoked by the qcc command, the build process is somehow not
visible to the analysis tool. Some questions:
>
> 1. For one, qcc uses the version switch –V and specifies gcc-ntox86 as the version. This neutrino version of the the
gcc compiler (gcc-ntox86), how different is it from gcc?
qcc is a compiler driver. The qcc -Vgcc_ntox86 invokes the underlying
gcc compiler (cc1/ccp1plus)
> 2. So essentially the underlying compiler is gcc-ntox86, a different compiler and not the generic gcc?
The qcc driver is different then the gcc driver -- that is the binary
called 'gcc'.
>
> 3. Or is that particular -V specification publicly available?
qcc -V is a publicly available option.
>
> 4. Are the compiler switches (except for –V, let’s say) for qcc and gcc-ntox the same as gcc?
The qcc and gcc drivers have different options but share a small subset
of common options.
>
> 5. Would it be the same thing to build a QNX c++ project using gcc, in order to be able to use the analysis tool, as
with gcc-ntox86? What would be the difference (sorry if I'm repeating a Q)?
Calling qcc -Vgcc_ntox86 is not the same as calling gcc or any of the
canonically named versions of the gcc drivers (e.g
i386-pc-nto-qnx6.3.0-gcc or ntox86-gcc). By default qcc -Vgcc_ntox86
compile against the Dinkumware C++ library, and the gcc drivers link
against the GNU libstdc++ library
>
> 6. How could I call the gcc compiler by modifying the qcc compilation command on the command line (directly or through
the makefile) ?
>
> qcc -g -Vgcc_ntox86 -w9 -g -Vgcc_ntox86 hello.c -o hello
ntox86-gcc -g hello.c -o hello
>
> In other words, how can I build with gcc via the qcc command?
If you want to use the gcc compiler, not the gcc driver, use qcc
-Vgcc_ntox86
>
> 7. Also, how can I build with gcc-ntox86 directly?
Use the gcc driver (either ntox86-gcc or i386-pc-nto-qnx6.3.0-gcc).
> 8. What is the best case scenario for me if I want to be as close as possible to a QNX qcc / ntox gcc build of my
project, that is visible to my analysis tool (assuming there is no option of modification on the tool side).
The gcc drivers will probably be easier to use; qcc has supports a few
number of the standard gcc options, and there's some conflict between
the meaning of options between the qcc driver and the gcc driver.
Regards,
Ryan Mansfield
|
|
|